Skip to content

Fixed app version bump check false positives on stale PR branches#26396

Merged
kevinansfield merged 1 commit intomainfrom
fix/app-bump-check-false-positive
Feb 13, 2026
Merged

Fixed app version bump check false positives on stale PR branches#26396
kevinansfield merged 1 commit intomainfrom
fix/app-bump-check-false-positive

Conversation

@kevinansfield
Copy link
Member

What this fixes

  • Uses merge-base to detect monitored app file changes instead of directly diffing base SHA to head SHA.
  • Fetches main without shallow depth in CI so merge-base can always be resolved.

Why

The old diff strategy could include unrelated changes from main when a PR branch was behind, causing false-positive failures in the app version bump job.

Example failure:
https://github.com/TryGhost/Ghost/actions/runs/21980583293/job/63501979159

Testing

Ran the script with PR_BASE_SHA=2171ae59932382033c8384398a30af7017198008 and PR_COMPARE_SHA=9d946fb7c099f7c0c2c898aa5916dcd74e5bfb32.
Result: No app changes detected. Skipping version bump check.

ref https://github.com/TryGhost/Ghost/actions/runs/21980583293/job/63501979159

The check now diffs merge-base..head and fetches main history so only PR-introduced app changes are validated.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 13, 2026

Walkthrough

This pull request updates two GitHub workflow infrastructure files. The check-app-version-bump.js script modifies how changed files are computed by using merge-base between the base and compare SHAs instead of diffing directly from the base SHA, and adds error handling for when merge-base cannot be determined. The ci.yml workflow file changes the git fetch command for the main branch from a shallow fetch with depth limit to a full fetch without tags, enabling access to the complete commit history.

🚥 Pre-merge checks | ✅ 3 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: fixing false positives in the app version bump check for stale PR branches, which aligns with the core purpose of the changeset.
Description check ✅ Passed The description is directly related to the changeset, explaining what was fixed (merge-base usage), why it was needed (false positives on stale branches), and providing testing evidence.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/app-bump-check-false-positive

No actionable comments were generated in the recent review. 🎉


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kevinansfield kevinansfield requested a review from sagzy February 13, 2026 09:05
@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.77%. Comparing base (37c0d72) to head (c03c77d).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #26396      +/-   ##
==========================================
- Coverage   72.78%   72.77%   -0.01%     
==========================================
  Files        1562     1562              
  Lines      120942   120950       +8     
  Branches    14573    14571       -2     
==========================================
- Hits        88032    88027       -5     
- Misses      31875    31905      +30     
+ Partials     1035     1018      -17     
Flag Coverage Δ
admin-tests 52.41% <ø> (-0.02%) ⬇️
e2e-tests 72.77% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kevinansfield kevinansfield merged commit 94df3bb into main Feb 13, 2026
36 checks passed
@kevinansfield kevinansfield deleted the fix/app-bump-check-false-positive branch February 13, 2026 14:27
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.

2 participants