Skip to content

Update make release for PR-only workflow#2

Merged
jabawack81 merged 3 commits into
mainfrom
feature/pr-release-workflow
Apr 9, 2026
Merged

Update make release for PR-only workflow#2
jabawack81 merged 3 commits into
mainfrom
feature/pr-release-workflow

Conversation

@jabawack81

@jabawack81 jabawack81 commented Apr 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Split make release into two steps for branch-protected main
  • make release: bumps version, creates release branch + PR
  • make tag VERSION=x.y.z: tags the merged commit and pushes to trigger CI

Test plan

  • Run make help — verify release and tag targets listed
  • Run make menu — verify options 6, 7, 8 show correctly

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores

    • Release process now creates a release branch and opens a GitHub PR to main instead of creating/pushing a release tag.
    • New separate tag step requires a VERSION and creates+pushed the v tag after main is updated.
    • Interactive prompt and direct tag push removed; menu/options updated to reflect “release = create PR” and a selectable “tag” entry.
  • Documentation

    • README updated to describe the new make release and make tag behaviors.

main is now protected — all changes require PRs. Split the
release flow into two steps:

- make release: bumps version on a release branch, runs CI,
  commits, pushes, and creates a PR via gh
- make tag VERSION=x.y.z: after PR is merged, checks out main,
  pulls, tags, and pushes the tag to trigger the GitHub Actions
  release build

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Apr 9, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@jabawack81 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 21 minutes and 44 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 21 minutes and 44 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 287e2517-4bd4-4370-aa5c-dfffdbe34c28

📥 Commits

Reviewing files that changed from the base of the PR and between 8629064 and 7547f7c.

📒 Files selected for processing (2)
  • .github/workflows/build.yml
  • .github/workflows/release.yml
📝 Walkthrough

Walkthrough

The Makefile's release workflow was changed: make release now creates/pushes a release/v<version> branch and opens a GitHub PR to main; it no longer creates/pushes annotated tags. A new make tag target was added to create and push v<VERSION> tags after merge. Menu/help text updated.

Changes

Cohort / File(s) Summary
Makefile (release/tag workflow)
Makefile
release target now fast-forwards main, creates release/v<version>, updates package/manifest, runs CI, commits, pushes branch, and opens a PR via gh pr create --base main; removed interactive tag creation and direct tag pushes. Added new public tag target that requires VERSION, checks out/pulls main, creates v$(VERSION) tag and pushes it to origin. Updated .PHONY, menu option text/numbering, and help output.
Documentation
README.md
Updated release command docs: make release described as PR-creating version bump; added documentation for make tag to tag and push merged releases.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant Dev as Developer
participant Make as Makefile
participant Git as Git (local)
participant Origin as Remote (origin)
participant GH as GitHub (gh CLI)

rect rgba(200,230,255,0.5)
Dev->>Make: run `make release`
Make->>Git: checkout main, fast-forward, verify clean
Make->>Git: create `release/v<version>` branch, update files, commit
Make->>Origin: push branch `release/v<version>`
Make->>GH: `gh pr create --base main`
GH->>Dev: open PR
end

rect rgba(200,255,200,0.5)
Dev->>Make: run `make tag VERSION=x.y.z`
Make->>Git: checkout main, pull latest
Make->>Git: create tag `v${VERSION}`
Make->>Origin: push tag `v${VERSION}`
end

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I nudged a branch, then hopped away,
A PR blooms where tags once lay.
Later I’ll tap a tiny bell —
v1.2.3 — and tag it well. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Update make release for PR-only workflow' clearly and specifically summarizes the main change: converting the release process to a PR-based workflow rather than direct tagging.
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.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/pr-release-workflow

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

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

Inline comments:
In `@Makefile`:
- Around line 131-132: The README still describes make release as "tag and push"
— update the README.md text that documents the release process so it reflects
the new two-step flow: change the description for the make release entry to
state it "bumps the version and creates a PR" and update the make tag entry to
state it "tags the merged release and pushes" (i.e., replace the old phrasing
around the "make release" and "make tag" entries so they match the Makefile help
output).
- Around line 118-120: The Makefile currently runs git push --tags which pushes
all local tags; change it to push only the newly created tag by replacing the
git push --tags line with a single-tag push (e.g., git push origin
"v$(VERSION)") so only v$(VERSION) is sent to the remote after `@git` tag
"v$(VERSION)"; ensure the tag push uses the same remote name used elsewhere
(origin) or a remote variable if one exists.
- Line 114: The Makefile's command target "tag" should be declared phony to
avoid collisions with any filesystem entry named "tag"; update the .PHONY
declaration so it includes "tag" (i.e., add "tag" to the existing .PHONY list)
so that the tag target (which runs git operations) always executes regardless of
a file named "tag" in the repository.
- Around line 102-103: The release branch is being created from the current HEAD
(BRANCH variable + git checkout -b "$$BRANCH") which can be a feature branch;
change the flow to first update main and create the release off the updated
main: fetch remote, checkout main, hard-reset or pull to match origin/main (so
local main is clean and up-to-date), then set BRANCH="release/v$$VERSION" and
run git checkout -b "$$BRANCH" to create the release branch from that updated
main.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: b9507d25-e9e1-48e6-a5db-97048564d9ec

📥 Commits

Reviewing files that changed from the base of the PR and between 7df1d24 and 6530ed7.

📒 Files selected for processing (1)
  • Makefile

Comment thread Makefile
Comment thread Makefile
Comment thread Makefile
jabawack81 and others added 2 commits April 10, 2026 00:14
- Add tag to .PHONY declaration
- Create release branch from updated main (checkout + pull --ff-only
  + clean working tree check) instead of current HEAD
- Push only the new tag (git push origin v$VERSION) instead of all
  local tags (git push --tags) to avoid triggering stale releases
- Update README make targets to match new two-step release flow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
build.yml: runs lint + test + build on PRs and pushes to main
(provides the status check required by branch protection).

release.yml: runs on v* tag push only, builds both Chrome zip
and Firefox xpi, creates GitHub Release with install notes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jabawack81

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Apr 9, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@jabawack81 jabawack81 merged commit fc6c6bc into main Apr 9, 2026
1 check passed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

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

Inline comments:
In `@Makefile`:
- Around line 119-120: The tag target currently runs a plain git pull (after git
checkout main) which can create a merge commit; update the tag target to use a
fast-forward-only pull by changing the git pull invocation to include --ff-only
so it mirrors the release target and prevents accidental local merge commits
from being tagged.
- Around line 102-106: The release recipe in the Makefile must fail fast: add
"set -eu" at the start of the shell command list for the release target so any
failing git operation (e.g., the git checkout, git pull, or git checkout -b
steps referenced by BRANCH, git checkout, git pull, git status, git checkout -b)
will abort the recipe immediately; update the recipe to run "set -eu" before
executing the existing BRANCH=... and git commands.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3a994803-2804-4023-ba0f-f059cac6ddc6

📥 Commits

Reviewing files that changed from the base of the PR and between 6530ed7 and 8629064.

📒 Files selected for processing (2)
  • Makefile
  • README.md
✅ Files skipped from review due to trivial changes (1)
  • README.md

Comment thread Makefile
Comment on lines +102 to +106
BRANCH="release/v$$VERSION"; \
git checkout main; \
git pull --ff-only origin main; \
if [ -n "$$(git status --porcelain)" ]; then echo "Working tree not clean"; exit 1; fi; \
git checkout -b "$$BRANCH"; \

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

find . -name "Makefile" -type f | head -5

Repository: internetblacksmith/github-pr-dashboard

Length of output: 92


🏁 Script executed:

cat -n ./Makefile | head -120

Repository: internetblacksmith/github-pr-dashboard

Length of output: 5783


Add fail-fast to the release recipe to prevent continuing after git errors.

The recipe runs as a single shell command list with backslash continuations. Without set -e, failures on lines 103 (git checkout), 104 (git pull), or 106 (git checkout -b) will not exit the script, allowing subsequent operations like package.json modifications to proceed on the wrong branch or state. Add set -eu at the recipe start.

Suggested fix
 release:
-	`@CURRENT`=$$(node -p "require('./package.json').version"); \
+	`@set` -eu; \
+	CURRENT=$$(node -p "require('./package.json').version"); \
 	MAJOR=$$(echo $$CURRENT | cut -d. -f1); \
 	MINOR=$$(echo $$CURRENT | cut -d. -f2); \
 	PATCH=$$(echo $$CURRENT | cut -d. -f3); \
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Makefile` around lines 102 - 106, The release recipe in the Makefile must
fail fast: add "set -eu" at the start of the shell command list for the release
target so any failing git operation (e.g., the git checkout, git pull, or git
checkout -b steps referenced by BRANCH, git checkout, git pull, git status, git
checkout -b) will abort the recipe immediately; update the recipe to run "set
-eu" before executing the existing BRANCH=... and git commands.

Comment thread Makefile
Comment on lines +119 to +120
@git checkout main
@git pull

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, let's locate and read the Makefile around lines 119-120
fd -name "Makefile" -type f | head -5

Repository: internetblacksmith/github-pr-dashboard

Length of output: 312


🏁 Script executed:

# Read the Makefile to see full context around lines 119-120
wc -l Makefile

Repository: internetblacksmith/github-pr-dashboard

Length of output: 94


🏁 Script executed:

# Get context around lines 119-120
sed -n '100,135p' Makefile

Repository: internetblacksmith/github-pr-dashboard

Length of output: 1873


Use --ff-only pull in tag to avoid tagging unintended local merges.

Line 120 uses plain git pull, which can create a merge commit if the local main branch diverges from upstream. That merge commit would then be tagged and pushed, bypassing the intended "merged-main-only" release path. The release target already uses --ff-only for this same operation; the tag target should match.

Suggested fix
 	`@git` checkout main
-	`@git` pull
+	`@git` pull --ff-only origin main
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@git checkout main
@git pull
`@git` checkout main
`@git` pull --ff-only origin main
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Makefile` around lines 119 - 120, The tag target currently runs a plain git
pull (after git checkout main) which can create a merge commit; update the tag
target to use a fast-forward-only pull by changing the git pull invocation to
include --ff-only so it mirrors the release target and prevents accidental local
merge commits from being tagged.

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