From e94f301d80db72d85ae8f3b927c78e67c81cdc43 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Thu, 26 Oct 2023 22:45:16 +0200 Subject: [PATCH 1/2] explicit wishlist message --- store/app.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/store/app.py b/store/app.py index 97bdbe12..5bf68c62 100644 --- a/store/app.py +++ b/store/app.py @@ -291,9 +291,7 @@ def add_to_wishlist(): new_branch = f"add-to-wishlist-{slug}" try: # Get the commit base for the new branch, and create it - commit_sha = repo.get_branch( - repo.default_branch - ).commit.sha + commit_sha = repo.get_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 ?") @@ -328,6 +326,10 @@ def add_to_wishlist(): Proposed by **{session['user']['username']}** +Website: {website} +Upstream repo: {upstream} +Description: {description} + - [ ] Confirm app is self-hostable and generally makes sense to possibly integrate in YunoHost - [ ] Confirm app's license is opensource/free software (or not-totally-free, case by case TBD) - [ ] Description describes concisely what the app is/does @@ -355,7 +357,7 @@ Proposed by **{session['user']['username']}** ) else: letters = string.ascii_lowercase + string.digits - csrf_token = ''.join(random.choice(letters) for i in range(16)) + csrf_token = "".join(random.choice(letters) for i in range(16)) session["csrf_token"] = csrf_token return render_template( "wishlist_add.html", From 93055b60030b325812f342c9d2b5f102356e50d8 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Thu, 26 Oct 2023 23:25:25 +0200 Subject: [PATCH 2/2] make the PR URL clickable when submitting an app to wishlist --- store/app.py | 2 +- store/templates/wishlist_add.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/store/app.py b/store/app.py index 5bf68c62..ac1fb8ca 100644 --- a/store/app.py +++ b/store/app.py @@ -346,7 +346,7 @@ Description: {description} url = f"https://github.com/YunoHost/apps/pull/{pr.number}" successmsg = _( - "Your proposed app has succesfully been submitted. It must now be validated by the YunoHost team. You can track progress here: %(url)s", + "Your proposed app has succesfully been submitted. It must now be validated by the YunoHost team. You can track progress here: %(url)s", url=url, ) return render_template( diff --git a/store/templates/wishlist_add.html b/store/templates/wishlist_add.html index 5c66e9cc..df02d59c 100644 --- a/store/templates/wishlist_add.html +++ b/store/templates/wishlist_add.html @@ -16,7 +16,7 @@ {% else %}