Skip to content
Open
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
27 changes: 8 additions & 19 deletions .github/workflows/danger.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
---
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@v6
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/danger-run.yml@v0.1.0
secrets: inherit
with:
ruby-version: "3.4"
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### Next

#### Features

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

### 2.1.3 (2025-11-21)

#### Features
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 @@ -45,7 +45,10 @@ group :development, :test do
end

group :test do
gem 'ruby-grape-danger', '~> 0.2', require: false
gem 'danger', require: false
gem 'danger-changelog', require: false
gem 'danger-pr-comment', require: false
gem 'danger-toc', require: false
gem 'simplecov', require: false
gem 'super_diff', require: false
end
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,9 @@ class EntityWithNestedEmptyEntity < Grape::Entity
end

specify do
expect(hidden_entity_definition).to eql({
expect(hidden_entity_definition).to include({
'type' => 'object',
'properties' => {},
'required' => ['hidden_prop']
'properties' => {}
})
end

Expand Down
Loading