Skip to content

Commit 542dfd7

Browse files
dblockclaude
andcommitted
Migrate Danger to use danger-pr-comment workflow.
πŸ€– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent c833bc3 commit 542dfd7

File tree

6 files changed

+29
-27
lines changed

6 files changed

+29
-27
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Danger Comment
2+
3+
on:
4+
workflow_run:
5+
workflows: [Danger]
6+
types: [completed]
7+
8+
jobs:
9+
comment:
10+
uses: numbata/danger-pr-comment/.github/workflows/danger-comment.yml@v0.1.0
11+
secrets: inherit

β€Ž.github/workflows/danger.ymlβ€Ž

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,13 @@
1-
name: danger
2-
on: pull_request
1+
name: Danger
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, edited, synchronize]
6+
37
jobs:
48
danger:
5-
name: Dangerfile
6-
runs-on: ubuntu-latest
7-
env:
8-
BUNDLE_GEMFILE: ${{ github.workspace }}/Gemfile.danger
9-
steps:
10-
- name: Checkout
11-
uses: actions/checkout@v6
12-
with:
13-
fetch-depth: 0
14-
- name: Set up Ruby
15-
uses: ruby/setup-ruby@v1
16-
with:
17-
ruby-version: '3.4'
18-
bundler-cache: true
19-
- run: |
20-
# the token is public, has public_repo scope and belongs to the grape-bot user owned by @dblock, this is ok
21-
TOKEN=$(echo -n Z2hwX2lYb0dPNXNyejYzOFJyaTV3QUxUdkNiS1dtblFwZTFuRXpmMwo= | base64 --decode)
22-
DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose
9+
uses: numbata/danger-pr-comment/.github/workflows/danger-run.yml@v0.1.0
10+
secrets: inherit
11+
with:
12+
ruby-version: '3.4'
13+
bundler-cache: true

β€ŽCHANGELOG.mdβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
### 0.5.1 (Next)
22

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

56
### 0.5.0 (2025/09/25)

β€ŽDangerfileβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# frozen_string_literal: true
22

3-
danger.import_dangerfile(gem: 'ruby-grape-danger')
3+
danger.import_dangerfile(gem: 'danger-pr-comment')
4+
changelog.check!
45
toc.check!

β€ŽGemfileβ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ end
1616
group :development, :test do
1717
gem 'base64'
1818
gem 'bigdecimal'
19+
gem 'danger'
20+
gem 'danger-changelog'
21+
gem 'danger-pr-comment'
22+
gem 'danger-toc'
1923
gem 'mutex_m'
2024
gem 'nokogiri'
2125
gem 'ostruct'

β€ŽGemfile.dangerβ€Ž

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
Β (0)