feat(pr): auto-dispatch release after package merge#5
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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)
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. Comment |
There was a problem hiding this comment.
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 \ |
There was a problem hiding this comment.
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>
| python scripts/github/pr_manager.py \ | |
| $(POETRY_ENV) python scripts/github/pr_manager.py \ |
| 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) |
There was a problem hiding this comment.
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>
| match = re.fullmatch(r"release/(?P<version>\d+\.\d+\.\d+)", head) | |
| match = re.fullmatch(r"release/(?P<version>\d+\.\d+\.\d+)", version) |
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.
Written for commit dde46ff. Summary will update on new commits.