Skip to content

Pin git below 6 so Danger loads in CI - #1012

Merged
numbata merged 2 commits into
masterfrom
fix/pin-git-below-6-for-danger
Nov 3, 2026
Merged

numbata merged 2 commits into
masterfrom
fix/pin-git-below-6-for-danger

Conversation

@numbata

@numbata numbata commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Danger check that runs on every pull request fails in CI before it reviews anything, so contributors get no automated feedback. This change keeps the bundle on a version of the git library that Danger can load, so the check runs again. Contributors and maintainers need no change to their workflow.

Root cause

CI runs bundle exec danger. With no upper bound on git, the bundle resolves git 6, which removed the Git::Base constant. Danger 9.6.1 references that constant while it loads (scm_source/git_repo.rb:209), so the job exits with uninitialized constant Git::Base before any pull request is checked. See the failing run on #1011: https://github.com/ruby-grape/grape-swagger/actions/runs/41628597475/job/125892119818

What changes

git is capped below 6 in the test group of the Gemfile, next to danger, with a comment explaining why. The gem is only used by Danger, so the constraint does not reach the gem's runtime or the supported Grape and Ruby matrix.

Drawbacks and nuances

Alternatives considered

  • Wait for a Danger release that supports git 6. This leaves the check broken for every open PR in the meantime, with no release date to plan around.
  • Point danger at the upstream fix branch. Depending on an unreviewed, unmerged pull request from a fork would be less stable than a one-line cap.
  • Pin danger itself. The failure comes from git 6, and an older Danger does not guarantee it avoids the same constant.

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Danger Report

No issues found.

View run

@numbata
numbata merged commit 65d0d9b into master Nov 3, 2026
33 checks passed
@numbata
numbata deleted the fix/pin-git-below-6-for-danger branch November 3, 2026 11:57
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