Skip to content

Commit 4471295

Browse files
authored
chore: Try to update existing issues
This automation creates a lot of noise on `dafny-lang/dafny`. Instead of always creating new issues, we create a comment, when possible.
1 parent 808a5b4 commit 4471295

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/nightly.yml

+11-5
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,14 @@ jobs:
9090
env:
9191
GH_TOKEN: ${{ env.GITHUB_AWS_CRYPTO_TOOLS_CI_BOT_ESDK_RELEASE_TOKEN }}
9292
run: |
93-
gh issue create \
94-
--repo "dafny-lang/dafny" \
95-
--title "[PRERELEASE REGRESSION] Dafny prerelease regression from ${{ github.repository }}" \
96-
--body "Failure in ${{ github.workflow_ref }}. \
97-
See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
93+
id=$(gh search issues -R dafny-lang/dafny --match title "[PRERELEASE REGRESSION] Dafny prerelease regression from ${{ github.repository }}" --json number,state -q '[.[] | select( .state=="open" )][0].number')
94+
if [ -n "$id" ]; then
95+
gh issue comment -R dafny-lang/dafny $id \
96+
-b "Another failure in ${{ github.workflow_ref }}. \
97+
See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
98+
else
99+
gh issue create -R dafny-lang/dafny \
100+
-t "[PRERELEASE REGRESSION] Dafny prerelease regression from ${{ github.repository }}" \
101+
-b "Failure in ${{ github.workflow_ref }}. \
102+
See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
103+
fi

0 commit comments

Comments
 (0)