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
10 changes: 10 additions & 0 deletions .github/workflows/danger-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Danger Comment
on:
workflow_run:
workflows: [Danger]
types: [completed]

jobs:
comment:
uses: numbata/danger-pr-comment/.github/workflows/danger-comment.yml@main
Copy link

Copilot AI Dec 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow references "numbata/danger-pr-comment" repository, but the PR description states the changes "reuse shared workflows from the ruby-grape/danger repository". This inconsistency between the description and the actual implementation should be clarified. Either the workflow reference should be updated to use the ruby-grape organization repository, or the PR description should be corrected to match the actual repository being used.

Suggested change
uses: numbata/danger-pr-comment/.github/workflows/danger-comment.yml@main
uses: ruby-grape/danger/.github/workflows/danger-comment.yml@main

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Dec 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow references use @main which always pulls the latest version of the shared workflow. This could introduce unexpected breaking changes or behavior modifications. Consider pinning to a specific version tag or commit SHA for more stable and predictable builds.

Suggested change
uses: numbata/danger-pr-comment/.github/workflows/danger-comment.yml@main
uses: numbata/danger-pr-comment/.github/workflows/danger-comment.yml@v1

Copilot uses AI. Check for mistakes.
secrets: inherit
26 changes: 8 additions & 18 deletions .github/workflows/danger.yml
Original file line number Diff line number Diff line change
@@ -1,21 +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@v4
with:
fetch-depth: 100
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
rubygems: latest
- 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@main
Copy link

Copilot AI Dec 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow references "numbata/danger-pr-comment" repository, but the PR description states the changes "reuse shared workflows from the ruby-grape/danger repository". This inconsistency between the description and the actual implementation should be clarified. Either the workflow reference should be updated to use the ruby-grape organization repository, or the PR description should be corrected to match the actual repository being used.

Suggested change
uses: numbata/danger-pr-comment/.github/workflows/danger-run.yml@main
uses: ruby-grape/danger/.github/workflows/danger-run.yml@main

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Dec 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow references use @main which always pulls the latest version of the shared workflow. This could introduce unexpected breaking changes or behavior modifications. Consider pinning to a specific version tag or commit SHA for more stable and predictable builds.

Suggested change
uses: numbata/danger-pr-comment/.github/workflows/danger-run.yml@main
uses: numbata/danger-pr-comment/.github/workflows/danger-run.yml@v1

Copilot uses AI. Check for mistakes.
secrets: inherit
with:
ruby-version: "3.2"
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#### Fixes

* Your contribution here.
* [#88](https://github.com/ruby-grape/grape-swagger-entity/pull/88): Update danger workflows - [@numbata](https://github.com/numbata).

### 0.7.0 (2025/08/02)

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ end

group :test do
gem 'grape-entity', grape_entity_spec
gem 'ruby-grape-danger', '~> 0.2.1', require: false
gem 'ruby-grape-danger', '~> 0.3.0', require: false
gem 'simplecov', require: false
end
2 changes: 1 addition & 1 deletion lib/grape-swagger/entity/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def parse_nested(entity_name, entity_options, parent_model = nil)
.map(&:nested_exposures)
.flatten
.each_with_object({}) do |value, memo|
memo[value.attribute] = value.send(:options)
memo[value.attribute] = value.send(:options)
end

properties, required = parse_grape_entity_params(params, nested_entities.last)
Expand Down