Skip to content

Comments

feat(pr): auto-dispatch release after package merge#5

Merged
marlon-costa-dc merged 1 commit intomainfrom
release/0.11.0
Feb 20, 2026
Merged

feat(pr): auto-dispatch release after package merge#5
marlon-costa-dc merged 1 commit intomainfrom
release/0.11.0

Conversation

@marlon-costa-dc
Copy link
Contributor

@marlon-costa-dc marlon-costa-dc commented Feb 20, 2026

Automate release workflow dispatch after package PR merge when branch maps to semver.


Summary by cubic

Automatically dispatches the workspace release workflow after a package PR is merged when the branch name maps to a semver version (e.g., 0.11.0-dev or release/0.11.0). Adds flags to control this behavior and optionally include the root repo in PR automation.

  • New Features
    • PR manager infers tag (vX.Y.Z) from head and, on successful merge with PR_RELEASE_ON_MERGE=1, triggers .github/workflows/release.yml if present. It skips dispatch if the release already exists.
    • New flags: PR_RELEASE_ON_MERGE=1 (default) and PR_INCLUDE_ROOT=1 (default). Makefile/base.mk pass --release-on-merge to pr_manager and update help text.

Written for commit dde46ff. Summary will update on new commits.

@gemini-code-assist
Copy link

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link

coderabbitai bot commented Feb 20, 2026

Warning

Rate limit exceeded

@marlon-costa-dc has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 10 minutes and 59 seconds before requesting another review.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch release/0.11.0

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.

@marlon-costa-dc marlon-costa-dc merged commit b0ef90b into main Feb 20, 2026
1 of 2 checks passed
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 4 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="Makefile">

<violation number="1" location="Makefile:481">
P1: Bare `python` invocation bypasses workspace venv. The `pr` target lacks `$(ENFORCE_WORKSPACE_VENV)` and this direct script call doesn't use `$(POETRY_ENV)` like the `$(ORCHESTRATOR)` does. This could run `pr_manager.py` under system Python, missing workspace dependencies.</violation>
</file>

<file name="scripts/github/pr_manager.py">

<violation number="1" location="scripts/github/pr_manager.py:87">
P2: Inconsistent `-dev` suffix handling: the `release/` branch path matches against the original `head` (with `-dev` still present), so `release/X.Y.Z-dev` branches will never produce a tag. Apply `removesuffix` consistently or match the stripped `version` variable in the second regex as well.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

--make-arg "PR_RELEASE_ON_MERGE=$(PR_RELEASE_ON_MERGE)" \
$(SELECTED_PROJECTS)
$(Q)if [ "$(PR_INCLUDE_ROOT)" = "1" ]; then \
python scripts/github/pr_manager.py \
Copy link

@cubic-dev-ai cubic-dev-ai bot Feb 20, 2026

Choose a reason for hiding this comment

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

P1: Bare python invocation bypasses workspace venv. The pr target lacks $(ENFORCE_WORKSPACE_VENV) and this direct script call doesn't use $(POETRY_ENV) like the $(ORCHESTRATOR) does. This could run pr_manager.py under system Python, missing workspace dependencies.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At Makefile, line 481:

<comment>Bare `python` invocation bypasses workspace venv. The `pr` target lacks `$(ENFORCE_WORKSPACE_VENV)` and this direct script call doesn't use `$(POETRY_ENV)` like the `$(ORCHESTRATOR)` does. This could run `pr_manager.py` under system Python, missing workspace dependencies.</comment>

<file context>
@@ -471,7 +475,24 @@ pr: ## Manage pull requests for selected projects
+		--make-arg "PR_RELEASE_ON_MERGE=$(PR_RELEASE_ON_MERGE)" \
 		$(SELECTED_PROJECTS)
+	$(Q)if [ "$(PR_INCLUDE_ROOT)" = "1" ]; then \
+		python scripts/github/pr_manager.py \
+			--repo-root "$(CURDIR)" \
+			--action "$(PR_ACTION)" \
</file context>
Suggested change
python scripts/github/pr_manager.py \
$(POETRY_ENV) python scripts/github/pr_manager.py \
Fix with Cubic

version = head.removesuffix("-dev")
if re.fullmatch(r"\d+\.\d+\.\d+", version):
return f"v{version}"
match = re.fullmatch(r"release/(?P<version>\d+\.\d+\.\d+)", head)
Copy link

@cubic-dev-ai cubic-dev-ai bot Feb 20, 2026

Choose a reason for hiding this comment

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

P2: Inconsistent -dev suffix handling: the release/ branch path matches against the original head (with -dev still present), so release/X.Y.Z-dev branches will never produce a tag. Apply removesuffix consistently or match the stripped version variable in the second regex as well.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At scripts/github/pr_manager.py, line 87:

<comment>Inconsistent `-dev` suffix handling: the `release/` branch path matches against the original `head` (with `-dev` still present), so `release/X.Y.Z-dev` branches will never produce a tag. Apply `removesuffix` consistently or match the stripped `version` variable in the second regex as well.</comment>

<file context>
@@ -79,6 +80,41 @@ def _selector(pr_number: str, head: str) -> str:
+    version = head.removesuffix("-dev")
+    if re.fullmatch(r"\d+\.\d+\.\d+", version):
+        return f"v{version}"
+    match = re.fullmatch(r"release/(?P<version>\d+\.\d+\.\d+)", head)
+    if match:
+        return f"v{match.group('version')}"
</file context>
Suggested change
match = re.fullmatch(r"release/(?P<version>\d+\.\d+\.\d+)", head)
match = re.fullmatch(r"release/(?P<version>\d+\.\d+\.\d+)", version)
Fix with Cubic

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