Skip to content

Commit d663c46

Browse files
dblockclaude
andcommitted
Migrate Danger to danger-pr-comment workflow.
Replaces mongoid-danger with danger-pr-comment workflow pattern. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
1 parent be03f14 commit d663c46

File tree

5 files changed

+27
-17
lines changed

5 files changed

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

.github/workflows/danger.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
1-
name: PR Linter
2-
on: [pull_request]
1+
name: Danger
2+
on:
3+
pull_request:
4+
types: [opened, reopened, edited, synchronize]
35
jobs:
46
danger:
5-
runs-on: ubuntu-latest
6-
steps:
7-
- uses: actions/checkout@v3
8-
with:
9-
fetch-depth: 0
10-
- uses: ruby/setup-ruby@v1
11-
with:
12-
ruby-version: 2.7
13-
bundler-cache: true
14-
- run: |
15-
# Personal access token for dangerpr-bot - public, but base64 encoded to avoid tripping up GitHub
16-
TOKEN=$(echo -n Z2hwX0xNQ3VmanBFeTBvYkZVTWh6NVNqVFFBOEUxU25abzBqRUVuaAo= | base64 --decode)
17-
DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose
7+
uses: numbata/danger-pr-comment/.github/workflows/[email protected]
8+
with:
9+
ruby-version: '3.0'
10+
bundler-cache: true
11+
secrets: inherit

CHANGELOG.md

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

3+
* [#49](https://github.com/mongoid/mongoid-scroll/pull/49): Migrate Danger to danger-pr-comment workflow - [@dblock](https://github.com/dblock).
34
* Your contribution here.
45

56
### 2.0.0 (2024/09/07)

Dangerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
danger.import_dangerfile(gem: 'mongoid-danger')
1+
# frozen_string_literal: true
2+
3+
danger.import_plugin('danger-pr-comment')
4+
5+
changelog.check!

Gemfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ end
1313
group :development, :test do
1414
gem 'bundler'
1515
gem 'coveralls_reborn', require: false
16+
gem 'danger', require: false
17+
gem 'danger-changelog', require: false
18+
gem 'danger-pr-comment', require: false
1619
gem 'database_cleaner', '~> 1.8.5'
1720
gem 'faker'
18-
gem 'mongoid-danger', '~> 0.2.0', require: false
1921
gem 'rake'
2022
gem 'rspec', '~> 3.0'
2123
gem 'rspec-its'

0 commit comments

Comments
 (0)