forgejo: use ISSUE_TOKEN instead of FORGE_TOKEN
This commit is contained in:
parent
6d964453be
commit
7042c2131d
3 changed files with 10 additions and 10 deletions
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
# expects:
|
||||
# env variable FORGEJO_TOKEN
|
||||
# env variable ISSUE_TOKEN
|
||||
# file out_of_date
|
||||
|
||||
IFS='
|
||||
|
@ -20,7 +20,7 @@ does_it_exist() {
|
|||
result="$(curl --silent -X 'GET' \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues?state=open&q=$query&type=issues" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: Basic $FORGEJO_TOKEN"
|
||||
-H "Authorization: token $ISSUE_TOKEN"
|
||||
)"
|
||||
|
||||
if [ "$result" == "[]" ]; then
|
||||
|
@ -40,7 +40,7 @@ is_it_old() {
|
|||
result="$(curl --silent -X 'GET' \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues?state=open&q=$query&type=issues" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: Basic $FORGEJO_TOKEN"
|
||||
-H "authorization: token $ISSUE_TOKEN"
|
||||
)"
|
||||
|
||||
result_title="$(echo $result | jq -r '.[].title' )"
|
||||
|
@ -64,7 +64,7 @@ update_title() {
|
|||
result=$(curl --silent -X 'PATCH' \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues/$id" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: Basic $FORGEJO_TOKEN" \
|
||||
-H "authorization: token $ISSUE_TOKEN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d "{
|
||||
\"title\": \"$repo/$name: upgrade to $upstream_version\"
|
||||
|
@ -83,7 +83,7 @@ create_issue() {
|
|||
result=$(curl --silent -X 'POST' \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: Basic $FORGEJO_TOKEN" \
|
||||
-H "authorization: token $ISSUE_TOKEN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d "{
|
||||
\"title\": \"$repo/$name: upgrade to $upstream_version\",
|
||||
|
@ -131,7 +131,7 @@ if [ -f not_in_anitya ]; then
|
|||
result="$(curl --silent -X 'GET' \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues?state=open&q=$query&type=issues" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: Basic $FORGEJO_TOKEN"
|
||||
-H "authorization: token $ISSUE_TOKEN"
|
||||
)"
|
||||
|
||||
if [ "$result" == "[]" ]; then
|
||||
|
@ -139,7 +139,7 @@ if [ -f not_in_anitya ]; then
|
|||
result=$(curl --silent -X 'POST' \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: Basic $FORGEJO_TOKEN" \
|
||||
-H "authorization: token $ISSUE_TOKEN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d "{
|
||||
\"title\": \"Add missing $repo packages to anitya\",
|
||||
|
@ -155,7 +155,7 @@ if [ -f not_in_anitya ]; then
|
|||
result=$(curl --silent -X 'PATCH' \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues/$result_id" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: Basic $FORGEJO_TOKEN" \
|
||||
-H "authorization: token $ISSUE_TOKEN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d "{
|
||||
\"body\": \"- [ ] $(sed '{:q;N;s/\n/\\n- [ ] /g;t q}' not_in_anitya)\"
|
||||
|
|
|
@ -12,7 +12,7 @@ jobs:
|
|||
image: alpine:latest
|
||||
env:
|
||||
downstream: https://ayakael.net/api/packages/forge/alpine/edge/qubes-r4.2
|
||||
FORGEJO_TOKEN: ${{ secrets.forgejo_token }}
|
||||
ISSUE_TOKEN: ${{ secrets.issue_token }}
|
||||
LABEL_NUMBER: 9
|
||||
CHECK_LATEST: 0
|
||||
steps:
|
||||
|
|
|
@ -12,7 +12,7 @@ jobs:
|
|||
image: alpine:latest
|
||||
env:
|
||||
downstream: https://ayakael.net/api/packages/forge/alpine/edge/qubes-r4.3
|
||||
FORGEJO_TOKEN: ${{ secrets.forgejo_token }}
|
||||
ISSUE_TOKEN: ${{ secrets.issue_token }}
|
||||
LABEL_NUMBER: 9
|
||||
CHECK_LATEST: 1
|
||||
steps:
|
||||
|
|
Loading…
Add table
Reference in a new issue