Skip to content

Commit

Permalink
Fix gh command that closes the issue when all vulnerabilities are fixed
Browse files Browse the repository at this point in the history
Signed-off-by: Sascha Schwarze <[email protected]>
  • Loading branch information
SaschaSchwarze0 committed Jan 10, 2025
1 parent a3db753 commit 197181d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/report-release-vulnerabilities.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ assignees="$(dyff json OWNERS | jq -r '.approvers | join(",")')"
issues="$(gh issue list --label release-vulnerabilities --json number)"

if [ "$(jq length <<<"${issues}")" == "0" ]; then

if [ "${hasVulnerabilities}" == "true" ]; then
# create new issue
echo "[INFO] Creating new issue"
Expand All @@ -133,7 +132,9 @@ else
--add-assignee "${assignees}" \
--body-file /tmp/report.md
else
gh issue close --reason "No vulnerabilities found in the latest release ${RELEASE_TAG}"
gh issue close "${issueNumber}" \
--comment "No vulnerabilities found in the latest release ${RELEASE_TAG}" \
--reason completed
fi
fi

Expand Down

0 comments on commit 197181d

Please sign in to comment.