Skip to content

Commit e6d8455

Browse files
Merge pull request #1774 from shipwright-io/sascha-fix-issue-close
Fix gh command that closes the issue when all vulnerabilities are fixed
2 parents a3db753 + 9537c71 commit e6d8455

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/report-release-vulnerabilities.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ assignees="$(dyff json OWNERS | jq -r '.approvers | join(",")')"
111111
issues="$(gh issue list --label release-vulnerabilities --json number)"
112112

113113
if [ "$(jq length <<<"${issues}")" == "0" ]; then
114-
115114
if [ "${hasVulnerabilities}" == "true" ]; then
116115
# create new issue
117116
echo "[INFO] Creating new issue"
@@ -133,7 +132,9 @@ else
133132
--add-assignee "${assignees}" \
134133
--body-file /tmp/report.md
135134
else
136-
gh issue close --reason "No vulnerabilities found in the latest release ${RELEASE_TAG}"
135+
gh issue close "${issueNumber}" \
136+
--comment "No vulnerabilities found in the latest release ${RELEASE_TAG}" \
137+
--reason completed
137138
fi
138139
fi
139140

.github/workflows/report-release-vulnerabilities.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ name: Report release vulnerabilities
55
on:
66
schedule:
77
- cron: '0 4 * * *' # 4:00 am UTC = 1 hour after base image build
8+
release:
9+
types:
10+
- edited
11+
- published
812
workflow_dispatch: {}
913
jobs:
1014
report-vulnerabilities:

0 commit comments

Comments
 (0)