From f6b51f2608a4c9fe4e6753afa49873880455a7e7 Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Mon, 23 Nov 2026 23:09:27 -0500 Subject: [PATCH] Upgrade danger-pr-comment and skip empty Danger comments Use the danger/danger-pr-comment 0.3.0 reusable workflows, pinned by commit, with comment-empty disabled so clean pull requests no longer get a "No issues found" comment while existing reports are still updated. Allow stacked pull request targets, declare the comment workflow's permissions, and cancel superseded Danger runs. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_011Gr21iR4JxWxGGyXdJ3uc9 --- .github/workflows/danger-comment.yml | 12 ++++++++++-- .github/workflows/danger.yml | 11 +++++++++-- CHANGELOG.md | 1 + 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/danger-comment.yml b/.github/workflows/danger-comment.yml index 8e15cb6..6be45aa 100644 --- a/.github/workflows/danger-comment.yml +++ b/.github/workflows/danger-comment.yml @@ -5,7 +5,15 @@ on: workflows: [Danger] types: [completed] +permissions: + actions: read + issues: write + pull-requests: write + jobs: comment: - uses: numbata/danger-pr-comment/.github/workflows/danger-comment.yml@v0.1.0 - secrets: inherit + name: Post Review Comment + uses: danger/danger-pr-comment/.github/workflows/danger-comment.yml@645e89bcc7be89ee7e8362166110b05cbced8e59 # v0.3.0 + with: + base-branch: '*' + comment-empty: false diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index bd89a88..6449af5 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -4,10 +4,17 @@ on: pull_request: types: [opened, reopened, edited, synchronize] +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: danger: - uses: numbata/danger-pr-comment/.github/workflows/danger-run.yml@v0.1.0 - secrets: inherit + name: Review Pull Request + uses: danger/danger-pr-comment/.github/workflows/danger-run.yml@645e89bcc7be89ee7e8362166110b05cbced8e59 # v0.3.0 with: ruby-version: '3.4' bundler-cache: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 06837c5..f955027 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### 0.4.1 (Next) +* [#16](https://github.com/mongoid/mongoid-observers/pull/16): Upgrade danger-pr-comment to 0.3.0 from the `danger` organization and skip empty Danger report comments - [@dblock](https://github.com/dblock). * Your contribution here. * [#11](https://github.com/mongoid/mongoid-observers/pull/11): Add Appraisal-managed Rails integration tests for observer initialization, persisted callbacks and model reloading - [@dblock](https://github.com/dblock).