From 692dcfb45037e361591f160ca6a2bdf0f8f376c6 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 25 Sep 2023 16:36:06 +0200 Subject: [PATCH] appstore: wishlist PRs are meant to target the default branch --- store/app.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/store/app.py b/store/app.py index a4e06aee..501d2835 100644 --- a/store/app.py +++ b/store/app.py @@ -257,8 +257,8 @@ def add_to_wishlist(): author = InputGitAuthor(config["GITHUB_LOGIN"], config["GITHUB_EMAIL"]) repo = github.get_repo("Yunohost/apps") current_wishlist_rawtoml = repo.get_contents( - "wishlist.toml", ref="app-store" - ) # FIXME : ref=repo.default_branch) + "wishlist.toml", ref=repo.default_branch) + ) current_wishlist_sha = current_wishlist_rawtoml.sha current_wishlist_rawtoml = current_wishlist_rawtoml.decoded_content.decode() new_wishlist = toml.loads(current_wishlist_rawtoml) @@ -289,8 +289,8 @@ def add_to_wishlist(): try: # Get the commit base for the new branch, and create it commit_sha = repo.get_branch( - "app-store" - ).commit.sha # FIXME app-store -> repo.default_branch + repo.default_branch + ).commit.sha repo.create_git_ref(ref=f"refs/heads/{new_branch}", sha=commit_sha) except exception as e: print("... Failed to create branch ?") @@ -335,7 +335,7 @@ Proposed by **{session['user']['username']}** title=message, body=body, head=new_branch, - base="app-store", # FIXME app-store -> repo.default_branch + base=repo.default_branch, ) url = f"https://github.com/YunoHost/apps/pull/{pr.number}"