Skip to content

Commit

Permalink
fix(app_release): Add GitLab token to repo URL
Browse files Browse the repository at this point in the history
  • Loading branch information
cogk committed May 20, 2024
1 parent 752f033 commit 8aced5d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions press/press/doctype/app_release/app_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ def _clone_repo(self):
self.output += self.run(f"git reset --hard {self.hash}")

def _get_repo_url(self, source: "AppSource") -> str:
if source.get("gitlab_access_token"):
return source.repository_url.replace("https://", f"https://oauth2:{source.get_password('gitlab_access_token')}@")

if not source.github_installation_id:
return source.repository_url

Expand Down

0 comments on commit 8aced5d

Please sign in to comment.