Skip to content

Commit

Permalink
chore: Try to update existing issues (#661)
Browse files Browse the repository at this point in the history
This automation creates a lot of noise on dafny-lang/dafny. Instead of always creating new issues, we create a comment, when possible. Same as #660, but from this repo.
  • Loading branch information
fabiomadge authored May 23, 2024
1 parent 9c73845 commit 70c0d14
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/nighly_dafny.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,14 @@ jobs:
env:
GH_TOKEN: ${{ env.GITHUB_AWS_CRYPTO_TOOLS_CI_BOT_ESDK_RELEASE_TOKEN }}
run: |
gh issue create \
--repo "dafny-lang/dafny" \
--title "[PRERELEASE REGRESSION] Dafny prerelease regression from ${{ github.repository }}" \
--body "Failure in ${{ github.workflow_ref }}. \
See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
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')
if [ -n "$id" ]; then
gh issue comment -R dafny-lang/dafny $id \
-b "Another failure in ${{ github.workflow_ref }}. \
See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
else
gh issue create -R dafny-lang/dafny \
-t "[PRERELEASE REGRESSION] Dafny prerelease regression from ${{ github.repository }}" \
-b "Failure in ${{ github.workflow_ref }}. \
See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
fi

0 comments on commit 70c0d14

Please sign in to comment.