Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/danger-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Danger Comment

on:
workflow_run:
workflows: [Danger]
types: [completed]

jobs:
comment:
uses: numbata/danger-pr-comment/.github/workflows/[email protected]
secrets: inherit
28 changes: 10 additions & 18 deletions .github/workflows/danger.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
---
name: danger
on: pull_request
name: Danger

on:
pull_request:
types: [opened, reopened, edited, synchronize]

jobs:
danger:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 100
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.4
bundler-cache: true
- name: Run Danger
run: |
# the token is public, has public_repo scope and belongs to the grape-bot user owned by @dblock, this is ok
TOKEN=$(echo -n Z2hwX2lYb0dPNXNyejYzOFJyaTV3QUxUdkNiS1dtblFwZTFuRXpmMwo= | base64 --decode)
DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose
uses: numbata/danger-pr-comment/.github/workflows/[email protected]
secrets: inherit
with:
ruby-version: '3.4'
bundler-cache: true
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* [#2648](https://github.com/ruby-grape/grape/pull/2648): Remove deprecated ParamsBuilders extensions - [@ericproulx](https://github.com/ericproulx).
* [#2645](https://github.com/ruby-grape/grape/pull/2645): Endpoints are compiled when API is compiled - [@ericproulx](https://github.com/ericproulx).
* [#2647](https://github.com/ruby-grape/grape/pull/2647): Explicit kwargs for `namespace` and `route_param` - [@ericproulx](https://github.com/ericproulx).
* [#2651](https://github.com/ruby-grape/grape/pull/2651): Migrate Danger to use danger-pr-comment workflow - [@dblock](https://github.com/dblock).
* Your contribution here.

#### Fixes
Expand Down
5 changes: 4 additions & 1 deletion Dangerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# frozen_string_literal: true

danger.import_dangerfile(gem: 'ruby-grape-danger')
danger.import_dangerfile(gem: 'danger-pr-comment')

changelog.check!
toc.check!
5 changes: 4 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@ group :development do
end

group :test do
gem 'danger', require: false
gem 'danger-changelog', require: false
gem 'danger-pr-comment', require: false
gem 'danger-toc', require: false
gem 'rack-contrib', require: false
gem 'rack-test', '~> 2.1'
gem 'rspec', '~> 3.13'
gem 'ruby-grape-danger', '~> 0.2', require: false
gem 'simplecov', '~> 0.21', require: false
gem 'simplecov-lcov', '~> 0.8', require: false
gem 'test-prof', require: false
Expand Down