Add helper link to API tokens page

This commit is contained in:
rubenwardy 2020-06-03 16:41:06 +01:00
parent 27d004d299
commit 720457e876
2 changed files with 3 additions and 3 deletions

@ -29,7 +29,7 @@ def webhook():
json = request.json json = request.json
# Get package # 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() package = Package.query.filter(Package.repo.ilike("%{}%".format(gitlab_url))).first()
if package is None: if package is None:
return error(400, "Could not find package, did you set the VCS repo in CDB correctly? Expected {}".format(gitlab_url)) return error(400, "Could not find package, did you set the VCS repo in CDB correctly? Expected {}".format(gitlab_url))

@ -36,7 +36,7 @@ The process is as follows:
### GitHub (manual) ### 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. 2. Copy the access token that was generated.
3. Go to the GitLab repository's settings > Webhooks > Add Webhook. 3. Go to the GitLab repository's settings > Webhooks > Add Webhook.
4. Set the payload URL to `https://content.minetest.net/github/webhook/` 4. Set the payload URL to `https://content.minetest.net/github/webhook/`
@ -50,7 +50,7 @@ The process is as follows:
### GitLab (manual) ### 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. 2. Copy the access token that was generated.
3. Go to the GitLab repository's settings > Webhooks. 3. Go to the GitLab repository's settings > Webhooks.
4. Set the URL to `https://content.minetest.net/gitlab/webhook/` 4. Set the URL to `https://content.minetest.net/gitlab/webhook/`