Skip to content

Migrate Danger to danger-pr-comment workflow#259

Open
dblock wants to merge 8 commits intomongoid:masterfrom
dblock:danger-pr-comment
Open

Migrate Danger to danger-pr-comment workflow#259
dblock wants to merge 8 commits intomongoid:masterfrom
dblock:danger-pr-comment

Conversation

@dblock
Copy link
Copy Markdown
Collaborator

@dblock dblock commented Dec 31, 2025

Summary

This PR migrates the Danger workflow from the deprecated mongoid-danger gem to the modern danger-pr-comment workflow. This change improves the PR review process by running Danger checks via GitHub Actions and posting comments directly on pull requests.

Changes

GitHub Actions Workflows

  • Added .github/workflows/danger.yml - Runs Danger checks on pull request events
  • Added .github/workflows/danger-comment.yml - Posts Danger comments after checks complete

Dependencies

  • Removed: mongoid-danger gem
  • Added: danger, danger-pr-comment, and danger-changelog gems
  • Added: psych < 5.0 to address compatibility issues
  • Updated: rubocop from ~> 0.49.0 to ~> 1.28

Dangerfile

  • Updated to use danger-pr-comment plugin instead of mongoid-danger
  • Added changelog.check! to verify CHANGELOG.md updates

CI/Test Configuration

  • Updated .github/workflows/test.yml to use Ruby 2.7 as minimum version (was 2.3-2.6)
  • Configured Danger workflow to use Ruby 3.4
  • Enabled bundler caching in Danger workflow

Code Quality

  • Updated .rubocop_todo.yml with latest Rubocop 1.82.1 offenses
  • Fixed Ruby 3.3+ compatibility issues across the codebase
  • Applied Rubocop auto-corrections and code style improvements

Documentation

  • Updated CHANGELOG.md with this PR's changes
  • Removed unreleased 0.8.4 section from CHANGELOG

Test Plan

  • Danger workflow runs successfully on this PR
  • All CI tests pass with updated Ruby versions
  • Changelog check validates CHANGELOG.md updates

References

This follows the same migration pattern as:

🤖 Generated with Claude Code

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
dblock and others added 6 commits December 31, 2025 18:00
- Add racc gem dependency (required for Ruby 3.0+)
- Add psych < 5.0 constraint for compatibility with older gems
- Upgrade rubocop from 0.49.0 to 1.28 (last version supporting Ruby 2.5)

These changes fix LoadError for racc/parser and YAML.safe_load argument
errors when using Ruby 3.3+ with older gem dependencies.
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant