Is-is-old check query now more specific

This commit is contained in:
Antoine Martin 2024-10-27 14:36:33 -04:00
parent cb761ad598
commit 163710d6fa
Signed by: forge
GPG key ID: D62A472A4AA7D541

View file

@ -34,8 +34,11 @@ is_it_old() {
upstream_version=$3
repo=$4
query="$repo/$name: upgrade to $upstream_version"
query="$(echo $query | sed 's| |%20|g' | sed 's|:|%3A|g' | sed 's|/|%2F|g' )"
result="$(curl --silent -X 'GET' \
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues?state=open&q=$name&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"
)"
@ -107,7 +110,6 @@ if [ -f out_of_date ]; then
fi
id=$(is_it_old $name $downstream_version $upstream_version $repo)
echo $id
if [ "$id" != "0" ] && [ -n "$id" ]; then
echo "Issue for $repo/$name needs updating"