Skip to content

Commit

Permalink
chore: Try to update existing issues
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.
  • Loading branch information
fabiomadge authored Jul 22, 2024
1 parent 808a5b4 commit 4471295
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,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 4471295

Please sign in to comment.