diff options
author | rubenwardy <rw@rubenwardy.com> | 2020-06-03 16:41:06 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2020-06-03 16:41:06 +0100 |
commit | 720457e8768429efb3c9a8107e0e01a3490d75c3 (patch) | |
tree | 06ae85c8f0a61733a9056f36377a98f3cef29c2b /app | |
parent | 27d004d2999dd5a03838d6aa59bdd6e2ff882746 (diff) | |
download | cheatdb-720457e8768429efb3c9a8107e0e01a3490d75c3.tar.xz |
Add helper link to API tokens page
Diffstat (limited to 'app')
-rw-r--r-- | app/blueprints/gitlab/__init__.py | 2 | ||||
-rw-r--r-- | app/flatpages/help/release_webhooks.md | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/blueprints/gitlab/__init__.py b/app/blueprints/gitlab/__init__.py index 18ce8c2..aaccf74 100644 --- a/app/blueprints/gitlab/__init__.py +++ b/app/blueprints/gitlab/__init__.py @@ -29,7 +29,7 @@ def webhook(): json = request.json # Get package - gitlab_url = "gitlab.com/{}/{}".format(json["project"]["namespace"], json["project"]["name"]) + gitlab_url = json["project"]["web_url"].replace("https://", "").replace("http://", "") package = Package.query.filter(Package.repo.ilike("%{}%".format(gitlab_url))).first() if package is None: return error(400, "Could not find package, did you set the VCS repo in CDB correctly? Expected {}".format(gitlab_url)) diff --git a/app/flatpages/help/release_webhooks.md b/app/flatpages/help/release_webhooks.md index b99831b..9554df3 100644 --- a/app/flatpages/help/release_webhooks.md +++ b/app/flatpages/help/release_webhooks.md @@ -36,7 +36,7 @@ The process is as follows: ### GitHub (manual) -1. Create a ContentDB API Token by visiting your profile and clicking "API Tokens: Manage". +1. Create a ContentDB API Token at [Profile > API Tokens: Manage](/user/tokens/). 2. Copy the access token that was generated. 3. Go to the GitLab repository's settings > Webhooks > Add Webhook. 4. Set the payload URL to `https://content.minetest.net/github/webhook/` @@ -50,7 +50,7 @@ The process is as follows: ### GitLab (manual) -1. Create a ContentDB API Token by visiting your profile and clicking "API Tokens: Manage". +1. Create a ContentDB API Token at [Profile > API Tokens: Manage](/user/tokens/). 2. Copy the access token that was generated. 3. Go to the GitLab repository's settings > Webhooks. 4. Set the URL to `https://content.minetest.net/gitlab/webhook/` |