Replace server url info with variables
This commit is contained in:
parent
51d73aa17e
commit
94b837d974
1 changed files with 7 additions and 7 deletions
|
@ -18,7 +18,7 @@ does_it_exist() {
|
|||
query="$(echo $query | sed 's| |%20|g')"
|
||||
|
||||
result="$(curl --silent -X 'GET' \
|
||||
"https://ayakael.net/api/v1/repos/alpine/apkgwatch/issues?state=open&q=$query&type=issues" \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues?state=open&q=$query&type=issues" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: Basic $FORGEJO_TOKEN"
|
||||
)"
|
||||
|
@ -35,7 +35,7 @@ is_it_old() {
|
|||
repo=$4
|
||||
|
||||
result="$(curl --silent -X 'GET' \
|
||||
"https://ayakael.net/api/v1/repos/alpine/apkgwatch/issues?state=open&q=$name&type=issues" \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues?state=open&q=$name&type=issues" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: Basic $FORGEJO_TOKEN"
|
||||
)"
|
||||
|
@ -60,7 +60,7 @@ update_title() {
|
|||
id=$5
|
||||
|
||||
result=$(curl --silent -X 'PATCH' \
|
||||
"https://ayakael.net/api/v1/repos/alpine/apkgwatch/issues/$id" \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues/$id" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: Basic $FORGEJO_TOKEN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
|
@ -79,7 +79,7 @@ create_issue() {
|
|||
repo=$4
|
||||
|
||||
result=$(curl --silent -X 'POST' \
|
||||
'https://ayakael.net/api/v1/repos/alpine/apkgwatch/issues' \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: Basic $FORGEJO_TOKEN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
|
@ -125,7 +125,7 @@ if [ -f not_in_anitya ]; then
|
|||
query="$(echo $query | sed 's| |%20|g')"
|
||||
|
||||
result="$(curl --silent -X 'GET' \
|
||||
"https://ayakael.net/api/v1/repos/alpine/apkgwatch/issues?state=open&q=$query&type=issues" \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues?state=open&q=$query&type=issues" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: Basic $FORGEJO_TOKEN"
|
||||
)"
|
||||
|
@ -133,7 +133,7 @@ if [ -f not_in_anitya ]; then
|
|||
if [ "$result" == "[]" ]; then
|
||||
echo "Creating anitya issue"
|
||||
result=$(curl --silent -X 'POST' \
|
||||
'https://ayakael.net/api/v1/repos/alpine/apkgwatch/issues' \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: Basic $FORGEJO_TOKEN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
|
@ -146,7 +146,7 @@ if [ -f not_in_anitya ]; then
|
|||
echo "Updating anitya issue"
|
||||
result_id="$(echo $result | jq -r '.[].number' )"
|
||||
result=$(curl --silent -X 'PATCH' \
|
||||
"https://ayakael.net/api/v1/repos/alpine/apkgwatch/issues/$result_id" \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues/$result_id" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: Basic $FORGEJO_TOKEN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
|
|
Loading…
Reference in a new issue