Skip to content

Commit 679f7e4

Browse files
committed
Generate 7 alphanumeric characters instead of a full UUID.
1 parent 4c3d446 commit 679f7e4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

homu/server.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
import os
3131
import traceback
3232
from retrying import retry
33-
import uuid
33+
import random
34+
import string
3435

3536
import bottle
3637
bottle.BaseRequest.MEMFILE_MAX = 1024 * 1024 * 10
@@ -242,7 +243,9 @@ def rollup(user_gh, state, repo_label, repo_cfg, repo):
242243
base_ref = rollup_states[0].base_ref
243244

244245
base_sha = repo.ref('heads/' + base_ref).object.sha
245-
branch_name = 'rollup-' + str(uuid.uuid4())
246+
branch_name = 'rollup-' + ''.join(
247+
random.choice(string.digits + string.ascii_lowercase) for _ in range(7)
248+
)
246249
utils.github_set_ref(
247250
user_repo,
248251
'heads/' + branch_name,

0 commit comments

Comments
 (0)