Compare commits
1
Commits
a77f72f5d6
...
c0aa7fa8f5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0aa7fa8f5 |
@@ -28,6 +28,7 @@ jobs:
|
||||
env:
|
||||
API_BASE: ${{ github.server_url }}/api/v1
|
||||
REPO: ${{ github.repository }}
|
||||
SHA: ${{ github.sha }}
|
||||
# Prefer a PAT with issue write scope (secret: GITEA_TOKEN).
|
||||
# Default GITHUB_TOKEN is usually scoped to this repo only.
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
|
||||
@@ -6,6 +6,8 @@ set -u
|
||||
API_BASE="${API_BASE:?API_BASE is required}"
|
||||
REPO="${REPO:?REPO is required}"
|
||||
TOKEN="${TOKEN:?TOKEN is required}"
|
||||
SHA="${SHA:-}"
|
||||
BASE="${API_BASE%/api/v1}"
|
||||
LABEL="ci-checks"
|
||||
SHOW="${SHOW:-50}"
|
||||
|
||||
@@ -78,6 +80,9 @@ jq -r '[((.body // "") | capture("<!-- ci-check: (?<k>[^ ]+) -->").k), .number]
|
||||
|
||||
while IFS=$'\t' read -r key number; do
|
||||
if ! grep -qF -- "$key"$'\t' "$FINDINGS"; then
|
||||
if [ -n "$SHA" ]; then
|
||||
api POST "/issues/$number/comments" "$(jq -n --arg b "Fixed in [$(printf '%s' "$SHA" | cut -c1-7)]($BASE/commit/$SHA)." '{body: $b}')" > /dev/null
|
||||
fi
|
||||
api PATCH "/issues/$number" '{"state": "closed"}' > /dev/null
|
||||
fi
|
||||
done < "$WORK/keys.tsv"
|
||||
|
||||
Reference in New Issue
Block a user