From 690f9e11e9f05b2f1787ba60d46c5d269de66564 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Sun, 27 Oct 2024 14:54:14 -0400 Subject: [PATCH] Add label to created issues --- .forgejo/bin/create_issue.sh | 10 ++++++++-- .forgejo/workflows/check-community.yml | 1 + .forgejo/workflows/check-testing.yml | 1 + .forgejo/workflows/check-user.yml | 1 + 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.forgejo/bin/create_issue.sh b/.forgejo/bin/create_issue.sh index a4526e9..26910b8 100755 --- a/.forgejo/bin/create_issue.sh +++ b/.forgejo/bin/create_issue.sh @@ -87,7 +87,10 @@ create_issue() { -H "authorization: Basic $FORGEJO_TOKEN" \ -H 'Content-Type: application/json' \ -d "{ - \"title\": \"$repo/$name: upgrade to $upstream_version\" + \"title\": \"$repo/$name: upgrade to $upstream_version\". + \"labels\": [ + $LABEL_NUMBER + ] }") return 0 @@ -141,7 +144,10 @@ if [ -f not_in_anitya ]; then -H 'Content-Type: application/json' \ -d "{ \"title\": \"Add missing $repo packages to anitya\", - \"body\": \"- [ ] $(sed '{:q;N;s/\n/\\n- [ ] /g;t q}' not_in_anitya)\" + \"body\": \"- [ ] $(sed '{:q;N;s/\n/\\n- [ ] /g;t q}' not_in_anitya)\", + \"labels\": [ + $LABEL_NUMBER + ] }") else diff --git a/.forgejo/workflows/check-community.yml b/.forgejo/workflows/check-community.yml index a5b98c3..a3d2524 100644 --- a/.forgejo/workflows/check-community.yml +++ b/.forgejo/workflows/check-community.yml @@ -13,6 +13,7 @@ jobs: env: downstream: https://dl-cdn.alpinelinux.org/alpine/edge/community FORGEJO_TOKEN: ${{ secrets.forgejo_token }} + LABEL_NUMER: 4 steps: - name: Environment setup run: apk add grep coreutils gawk curl wget bash nodejs git jq sed diff --git a/.forgejo/workflows/check-testing.yml b/.forgejo/workflows/check-testing.yml index 38377d4..b55147b 100644 --- a/.forgejo/workflows/check-testing.yml +++ b/.forgejo/workflows/check-testing.yml @@ -13,6 +13,7 @@ jobs: env: downstream: https://dl-cdn.alpinelinux.org/alpine/edge/testing FORGEJO_TOKEN: ${{ secrets.forgejo_token }} + LABEL_NUMBER: 4 steps: - name: Environment setup run: apk add grep coreutils gawk curl wget bash nodejs git jq sed diff --git a/.forgejo/workflows/check-user.yml b/.forgejo/workflows/check-user.yml index adcaa29..f07ec6e 100644 --- a/.forgejo/workflows/check-user.yml +++ b/.forgejo/workflows/check-user.yml @@ -13,6 +13,7 @@ jobs: env: downstream: https://ayakael.net/api/packages/forge/alpine/edge/user FORGEJO_TOKEN: ${{ secrets.forgejo_token }} + LABEL_NUMBER: 4 steps: - name: Environment setup run: apk add grep coreutils gawk curl wget bash nodejs git jq sed