From 1f88ea64a34c87d1e302fadeda67c66d524ed332 Mon Sep 17 00:00:00 2001 From: Andrey Subbota Date: Wed, 15 Apr 2026 16:05:55 +0200 Subject: [PATCH 1/6] Switch to danger-pr-comment for PR checks Replace ruby-grape-danger with danger-pr-comment to align with the grape repo's two-workflow approach: one workflow runs Danger, another posts the results as PR comments. --- .github/workflows/danger-comment.yml | 11 +++++++++++ .github/workflows/danger.yml | 13 +++++++++++++ Dangerfile | 4 +++- Gemfile | 4 +++- 4 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/danger-comment.yml create mode 100644 .github/workflows/danger.yml diff --git a/.github/workflows/danger-comment.yml b/.github/workflows/danger-comment.yml new file mode 100644 index 00000000..8e15cb6c --- /dev/null +++ b/.github/workflows/danger-comment.yml @@ -0,0 +1,11 @@ +name: Danger Comment + +on: + workflow_run: + workflows: [Danger] + types: [completed] + +jobs: + comment: + uses: numbata/danger-pr-comment/.github/workflows/danger-comment.yml@v0.1.0 + secrets: inherit diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml new file mode 100644 index 00000000..bd89a888 --- /dev/null +++ b/.github/workflows/danger.yml @@ -0,0 +1,13 @@ +name: Danger + +on: + pull_request: + types: [opened, reopened, edited, synchronize] + +jobs: + danger: + uses: numbata/danger-pr-comment/.github/workflows/danger-run.yml@v0.1.0 + secrets: inherit + with: + ruby-version: '3.4' + bundler-cache: true diff --git a/Dangerfile b/Dangerfile index 82881902..f7693875 100644 --- a/Dangerfile +++ b/Dangerfile @@ -1,3 +1,5 @@ # frozen_string_literal: true -danger.import_dangerfile(gem: 'ruby-grape-danger') +danger.import_dangerfile(gem: 'danger-pr-comment') + +changelog.check! diff --git a/Gemfile b/Gemfile index eef58cd9..45af7366 100644 --- a/Gemfile +++ b/Gemfile @@ -23,6 +23,8 @@ group :test do gem 'guard-bundler' gem 'guard-rspec' gem 'rb-fsevent' - gem 'ruby-grape-danger', '~> 0.2', require: false + gem 'danger', require: false + gem 'danger-changelog', require: false + gem 'danger-pr-comment', require: false gem 'simplecov', require: false end From 76dd890d841edb2c07d2deeb43968cb825bb7805 Mon Sep 17 00:00:00 2001 From: Andrey Subbota Date: Wed, 15 Apr 2026 16:08:33 +0200 Subject: [PATCH 2/6] Fix Bundler/OrderedGems rubocop offense Sort danger gems alphabetically within the test group. --- Gemfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 45af7366..c3a69c50 100644 --- a/Gemfile +++ b/Gemfile @@ -18,13 +18,13 @@ end group :test do gem 'coveralls_reborn', require: false + gem 'danger', require: false + gem 'danger-changelog', require: false + gem 'danger-pr-comment', require: false gem 'growl' gem 'guard' gem 'guard-bundler' gem 'guard-rspec' gem 'rb-fsevent' - gem 'danger', require: false - gem 'danger-changelog', require: false - gem 'danger-pr-comment', require: false gem 'simplecov', require: false end From bb29422be1015f51960b1d7d4b1414b4c2bdff13 Mon Sep 17 00:00:00 2001 From: Andrey Subbota Date: Wed, 15 Apr 2026 16:11:20 +0200 Subject: [PATCH 3/6] Add CHANGELOG entry for #400 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cce65c22..e5c0b149 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ #### Features +* [#400](https://github.com/ruby-grape/grape-entity/pull/400): Switch to danger-pr-comment for PR checks - [@numbata](https://github.com/numbata). * Your contribution here. #### Fixes From ad73ea56b9a31311f44be4840f5ed9df767a6221 Mon Sep 17 00:00:00 2001 From: Andrey Subbota Date: Wed, 15 Apr 2026 16:14:06 +0200 Subject: [PATCH 4/6] Fix CHANGELOG formatting for danger-changelog compliance Inline breaking change marker, remove extra period in description, and add missing @ prefix to author link. --- CHANGELOG.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5c0b149..412d1644 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,8 +29,7 @@ #### Fixes -**Breaking change:** -* [#352](https://github.com/ruby-grape/grape-entity/pull/369): Remove `FetchableObject` behavior. - [@danielvdao](https://github.com/danielvdao). +* [#352](https://github.com/ruby-grape/grape-entity/pull/369): **Breaking change:** Remove `FetchableObject` behavior - [@danielvdao](https://github.com/danielvdao). * [#371](https://github.com/ruby-grape/grape-entity/pull/371): Allow default exposed value to be `false` or any empty data - [@norydev](https://github.com/norydev). @@ -38,7 +37,7 @@ #### Fixes -* [#366](https://github.com/ruby-grape/grape-entity/pull/366): Don't suppress regular ArgumentError exceptions - [splattael](https://github.com/splattael). +* [#366](https://github.com/ruby-grape/grape-entity/pull/366): Don't suppress regular ArgumentError exceptions - [@splattael](https://github.com/splattael). * [#363](https://github.com/ruby-grape/grape-entity/pull/338): Fix typo - [@OuYangJinTing](https://github.com/OuYangJinTing). * [#361](https://github.com/ruby-grape/grape-entity/pull/361): Require 'active_support/core_ext' - [@pravi](https://github.com/pravi). From e590c1652a366c9cde80ca7092d30849d1897311 Mon Sep 17 00:00:00 2001 From: Andrey Subbota Date: Wed, 15 Apr 2026 16:18:11 +0200 Subject: [PATCH 5/6] Add missing CHANGELOG entries for #389 and #385 in 1.0.2 Both PRs were included in the 1.0.2 release but their CHANGELOG entries were missing. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 412d1644..a8d4b2e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ * [#394](https://github.com/ruby-grape/grape-entity/pull/394): Add `Entity.[]` for Grape >= 3.2 param type compatibility - [@numbata](https://github.com/numbata). * [#388](https://github.com/ruby-grape/grape-entity/pull/388): Drop ruby-head from test matrix - [@numbata](https://github.com/numbata). +* [#389](https://github.com/ruby-grape/grape-entity/pull/389): **Breaking change:** Block arity detection - [@numbata](https://github.com/numbata). +* [#385](https://github.com/ruby-grape/grape-entity/pull/385): Drop multijson dependency - [@ericproulx](https://github.com/ericproulx). * [#384](https://github.com/ruby-grape/grape-entity/pull/384): Fix `inspect` to correctly handle `nil` values - [@fcce](https://github.com/fcce). ### 1.0.1 (2024-04-10) From 3ce391773c9e6058fecce9704baa2ae8d6502304 Mon Sep 17 00:00:00 2001 From: Andrey Subbota Date: Wed, 15 Apr 2026 16:20:20 +0200 Subject: [PATCH 6/6] Fix CHANGELOG formatting issues - Fix mismatched PR numbers in links for #369 and #363 - Remove bold markdown in breaking change markers that danger-changelog cannot parse --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8d4b2e3..f434ffc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ * [#394](https://github.com/ruby-grape/grape-entity/pull/394): Add `Entity.[]` for Grape >= 3.2 param type compatibility - [@numbata](https://github.com/numbata). * [#388](https://github.com/ruby-grape/grape-entity/pull/388): Drop ruby-head from test matrix - [@numbata](https://github.com/numbata). -* [#389](https://github.com/ruby-grape/grape-entity/pull/389): **Breaking change:** Block arity detection - [@numbata](https://github.com/numbata). +* [#389](https://github.com/ruby-grape/grape-entity/pull/389): Block arity detection (breaking change) - [@numbata](https://github.com/numbata). * [#385](https://github.com/ruby-grape/grape-entity/pull/385): Drop multijson dependency - [@ericproulx](https://github.com/ericproulx). * [#384](https://github.com/ruby-grape/grape-entity/pull/384): Fix `inspect` to correctly handle `nil` values - [@fcce](https://github.com/fcce). @@ -31,7 +31,7 @@ #### Fixes -* [#352](https://github.com/ruby-grape/grape-entity/pull/369): **Breaking change:** Remove `FetchableObject` behavior - [@danielvdao](https://github.com/danielvdao). +* [#369](https://github.com/ruby-grape/grape-entity/pull/369): Remove `FetchableObject` behavior (breaking change) - [@danielvdao](https://github.com/danielvdao). * [#371](https://github.com/ruby-grape/grape-entity/pull/371): Allow default exposed value to be `false` or any empty data - [@norydev](https://github.com/norydev). @@ -40,7 +40,7 @@ #### Fixes * [#366](https://github.com/ruby-grape/grape-entity/pull/366): Don't suppress regular ArgumentError exceptions - [@splattael](https://github.com/splattael). -* [#363](https://github.com/ruby-grape/grape-entity/pull/338): Fix typo - [@OuYangJinTing](https://github.com/OuYangJinTing). +* [#363](https://github.com/ruby-grape/grape-entity/pull/363): Fix typo - [@OuYangJinTing](https://github.com/OuYangJinTing). * [#361](https://github.com/ruby-grape/grape-entity/pull/361): Require 'active_support/core_ext' - [@pravi](https://github.com/pravi).