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/danger-comment.yml@v0.1.0
secrets: inherit
31 changes: 11 additions & 20 deletions .github/workflows/danger.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
name: danger
on: pull_request
name: Danger

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

jobs:
danger:
name: Dangerfile
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/Gemfile.danger
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
bundler-cache: true
- 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/danger-run.yml@v0.1.0
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
@@ -1,5 +1,6 @@
### 0.5.1 (Next)

* [#35](https://github.com/ruby-grape/grape-roar/pull/35): Migrate Danger to use danger-pr-comment workflow - [@dblock](https://github.com/dblock).
* Your contribution here.

### 0.5.0 (2025/09/25)
Expand Down
3 changes: 2 additions & 1 deletion Dangerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

danger.import_dangerfile(gem: 'ruby-grape-danger')
danger.import_dangerfile(gem: 'danger-pr-comment')
changelog.check!
toc.check!
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ end
group :development, :test do
gem 'base64'
gem 'bigdecimal'
gem 'danger'
gem 'danger-changelog'
gem 'danger-pr-comment'
gem 'danger-toc'
gem 'mutex_m'
gem 'nokogiri'
gem 'ostruct'
Expand Down
6 changes: 0 additions & 6 deletions Gemfile.danger

This file was deleted.