Skip to content

Commit

Permalink
small corrections to GitLab premium requests; v2-5-2
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusShepherd committed Sep 14, 2023
1 parent 23b5406 commit 3f10c78
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2-5-1
2-5-2
6 changes: 4 additions & 2 deletions games/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def premium_feature_gitlab_merge_request(
access_expiration: Union[datetime, str],
gitlab_project_id: int,
gitlab_access_token: str,
file_dir: str = "premium",
file_dir: str = "users/premium",
file_stem: Optional[str] = None,
gitlab_url: str = "https://gitlab.com",
source_branch: Optional[str] = None,
Expand All @@ -376,7 +376,9 @@ def premium_feature_gitlab_merge_request(
data_yaml = yaml.safe_dump(data)
now = datetime.utcnow().isoformat(timespec="seconds")
file_content = f"# Generated at {now}Z\n{data_yaml}\n"
file_path = f"{file_dir}/{file_stem or uuid.uuid4()}.yaml"
sand = uuid.uuid4()
file_path = f"{file_dir}/{file_stem or sand}.yaml"
source_branch = source_branch or f"premium-{sand}"

return gitlab_merge_request(
file_path=file_path,
Expand Down

0 comments on commit 3f10c78

Please sign in to comment.