aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-23 17:41:59 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-23 17:42:49 +0300
commit71580602c1a9e5d1e451853179a8d01cdb2431ff (patch)
treecbaa89a215af85742daefda4e71394a86318714f /.github/workflows
parentec2924d0d1f21417802c3efd0ed46b9db2c00582 (diff)
ci: mark closed referenced issues pending release
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/label-next-release-issues.yml24
1 files changed, 15 insertions, 9 deletions
diff --git a/.github/workflows/label-next-release-issues.yml b/.github/workflows/label-next-release-issues.yml
index f1e2074e..02e947d1 100644
--- a/.github/workflows/label-next-release-issues.yml
+++ b/.github/workflows/label-next-release-issues.yml
@@ -88,10 +88,7 @@ jobs:
continue
fi
- if [ "$(jq -r '.state' <<<"$data")" != "open" ]; then
- echo "Skipping #$issue because it is not open."
- continue
- fi
+ ISSUE_STATE="$(jq -r '.state' <<<"$data")"
HAS_NEXT_RELEASE_LABEL="$(jq -r --arg label "$NEXT_RELEASE_LABEL" 'any(.labels[].name; . == $label)' <<<"$data")"
if [ "$HAS_NEXT_RELEASE_LABEL" != "true" ]; then
@@ -111,13 +108,22 @@ jobs:
HAS_PENDING_COMMENT="true"
fi
- if [ "$HAS_PENDING_COMMENT" = "true" ]; then
- if ! gh issue close "$issue" --repo "$GITHUB_REPOSITORY" --reason completed; then
+ if [ "$ISSUE_STATE" = "open" ]; then
+ if [ "$HAS_PENDING_COMMENT" = "true" ]; then
+ if ! gh issue close "$issue" --repo "$GITHUB_REPOSITORY" --reason completed; then
+ echo "::warning::Could not close issue #$issue."
+ continue
+ fi
+ elif ! gh issue close "$issue" --repo "$GITHUB_REPOSITORY" --reason completed --comment "$PENDING_COMMENT"; then
echo "::warning::Could not close issue #$issue."
continue
fi
- elif ! gh issue close "$issue" --repo "$GITHUB_REPOSITORY" --reason completed --comment "$PENDING_COMMENT"; then
- echo "::warning::Could not close issue #$issue."
- continue
+ elif [ "$HAS_PENDING_COMMENT" != "true" ]; then
+ if ! gh issue comment "$issue" --repo "$GITHUB_REPOSITORY" --body "$PENDING_COMMENT"; then
+ echo "::warning::Could not comment on closed issue #$issue."
+ continue
+ fi
+ else
+ echo "Skipping pending-release comment for #$issue because it already exists."
fi
done