Skip to content

ci(cd): verify tag commit is reachable from master (#292)#313

Merged
nanotaboada merged 2 commits intomasterfrom
feat/292-verify-tag-reachable-from-master
Apr 11, 2026
Merged

ci(cd): verify tag commit is reachable from master (#292)#313
nanotaboada merged 2 commits intomasterfrom
feat/292-verify-tag-reachable-from-master

Conversation

@nanotaboada
Copy link
Copy Markdown
Owner

@nanotaboada nanotaboada commented Apr 11, 2026

Summary

  • Adds a "Verify tag commit is reachable from master" step to the release job in .github/workflows/maven-cd.yml
  • Placed immediately after "Checkout repository" and before "Extract and validate tag components"
  • Uses git branch -r --contains ${{ github.sha }} to check that the tag commit is an ancestor of origin/master; fails with a descriptive error if not

Test plan

  • Workflow passes on a valid release tag pushed from a merged commit
  • Workflow fails early with ❌ Tag commit ... is not reachable from origin/master if the tag points to an unmerged commit

Closes #292

🤖 Generated with Claude Code


This change is Reviewable

Summary by CodeRabbit

  • Chores
    • Enhanced release verification process to ensure code integrity and prevent unintended releases from unmerged branches.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 11, 2026

Warning

Rate limit exceeded

@nanotaboada has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 19 minutes and 36 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 19 minutes and 36 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8ccc3309-0db5-4e4c-863f-b46f8fba3232

📥 Commits

Reviewing files that changed from the base of the PR and between 02dc7cc and 3a77647.

📒 Files selected for processing (1)
  • .github/workflows/maven-cd.yml

Walkthrough

A verification step was added to the CD workflow to check whether a tag's commit is reachable from the origin/master branch before proceeding with release steps. The workflow now fails early with an error message if the verification fails.

Changes

Cohort / File(s) Summary
CD Workflow Verification
.github/workflows/maven-cd.yml
Added a step that verifies the tag commit is reachable from origin/master using git branch -r --contains, placed after the checkout step. The step exits with code 1 and displays an error message if the check fails.
Documentation
CHANGELOG.md
Documented the new CD workflow verification step that checks tag commit reachability before release.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Assessment against linked issues

Objective Addressed Explanation
Verify tag commit is reachable from master before proceeding with build and publish steps [#292]
Step placed immediately after "Checkout repository" [#292]
Use git branch command or GitHub API to verify reachability [#292]
Fail with descriptive error message if tag commit is not reachable from master [#292]
No regressions on valid release tags from merged commits [#292]

Possibly related PRs

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title follows Conventional Commits format with 'ci(cd):' prefix, is under 80 characters (57 chars), and accurately describes the main change: adding verification that tag commits are reachable from master.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

📋 Issue Planner

Built with CodeRabbit's Coding Plans for faster development and fewer bugs.

View plan used: #292

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/292-verify-tag-reachable-from-master
  • 🛠️ sync documentation: Commit on current branch
  • 🛠️ sync documentation: Create PR
  • 🛠️ enforce http error handling: Commit on current branch
  • 🛠️ enforce http error handling: Create PR
  • 🛠️ idiomatic review: Commit on current branch
  • 🛠️ idiomatic review: Create PR
  • 🛠️ verify api contract: Commit on current branch
  • 🛠️ verify api contract: Create PR

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.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (c231aee) to head (3a77647).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##              master      #313   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity        30        30           
===========================================
  Files              2         2           
  Lines             88        88           
  Branches           8         8           
===========================================
  Hits              88        88           

☔ 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.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/maven-cd.yml:
- Around line 48-51: Replace the substring branch-check that greps for
"origin/master" with an exact ancestry check using git merge-base --is-ancestor:
verify that the commit referenced by github.sha is an ancestor of origin/master
by invoking git merge-base --is-ancestor with github.sha and origin/master and
fail with the same error message if it is not; update the conditional that
currently uses git branch -r ... | grep -q "origin/master" to rely on git
merge-base --is-ancestor (referencing github.sha and origin/master) so
similarly-named branches like origin/master-hotfix do not produce false
positives.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d670e9f5-6d9a-4eea-afd2-4fbb1ff92372

📥 Commits

Reviewing files that changed from the base of the PR and between c231aee and 02dc7cc.

📒 Files selected for processing (2)
  • .github/workflows/maven-cd.yml
  • CHANGELOG.md

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@nanotaboada nanotaboada merged commit 79ed48d into master Apr 11, 2026
12 checks passed
@nanotaboada nanotaboada deleted the feat/292-verify-tag-reachable-from-master branch April 11, 2026 12:41
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.

Verify tag commit is reachable from master before release

1 participant