Skip to content

fix: Release PRs label the Unity package summary#1438

Merged
hatayama merged 2 commits into
v3-betafrom
fix/release-pr-summary-label
Jun 30, 2026
Merged

fix: Release PRs label the Unity package summary#1438
hatayama merged 2 commits into
v3-betafrom
fix/release-pr-summary-label

Conversation

@hatayama

@hatayama hatayama commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Release PR bodies now label the plain root release details as unity-package: <version>.
  • Regenerated v3-beta release PRs no longer look like they contain two same-name package releases.

User Impact

  • Reviewers can tell the Unity package release apart from the project runner release in the release PR summary.
  • release-please can refresh the PR without dropping the Unity package label.

Changes

  • Adds a post-release-please body normalization step to the existing release PR check automation.
  • Covers the body rewrite path and Windows mock command execution in tests.

Verification

  • go test ./internal/automation -run "ReleasePRCheck" -count=1
  • ./scripts/check-go-cli.sh

Review in cubic

Update the release PR automation that runs after release-please so it rewrites a plain root package details summary to identify the Unity package. This keeps regenerated v3-beta release PR bodies from looking like two unlabeled package releases.

Also make the release PR check test mock executable from Windows so the new body update path is covered locally.
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 30a5cff6-8b51-4a23-8c3c-987f3c76b401

📥 Commits

Reviewing files that changed from the base of the PR and between a2824fa and 477ca57.

📒 Files selected for processing (2)
  • cli/internal/automation/release_pr_checks.go
  • cli/internal/automation/release_pr_checks_test.go

📝 Walkthrough

Walkthrough

RunReleasePleasePRChecks gains a new step that fetches the release PR body, detects an unlabeled Unity package version via regex, rewrites it into a unity-package: ... labeled details block, and pushes the update via gh pr edit --body-file before marking the PR as draft. Tests cover the rewrite logic and the full flow, with Windows batch mock support added.

Unity Package Summary Clarification

Layer / File(s) Summary
Regex, struct, and body-clarification helpers
cli/internal/automation/release_pr_checks.go
Adds regexp import, compiled releasePRCheckPlainUnityPackageSummary pattern, releasePullRequestBody struct, clarifyReleasePRCheckBody and clarifyReleasePRCheckUnityPackageSummary helpers, and the call site in RunReleasePleasePRChecks that conditionally edits the PR body and prints a confirmation message.
Test cases and harness extensions
cli/internal/automation/release_pr_checks_test.go
Adds unit tests for labeled/unlabeled Unity summary detection, an integration test asserting body update precedes dispatch, extends releasePRCheckCase with prViewJSON, updates runReleasePRCheckCase defaults and env wiring, adds pr view/pr edit support to Unix and Windows (bat) mocks, and fixes trailing \r in log assertions.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • hatayama/unity-cli-loop#1244: Extends the same RunReleasePleasePRChecks automation and release_pr_checks_test.go harness that this PR builds upon.
  • hatayama/unity-cli-loop#1412: Also modifies RunReleasePleasePRChecks in the same orchestration function, adding a dispatcher minimum sync step before dispatch.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 30.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly reflects the main change: release PRs now label the Unity package summary.
Description check ✅ Passed The description is directly related to the body normalization and test coverage changes in this pull request.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/release-pr-summary-label

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.

@cubic-dev-ai cubic-dev-ai 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.

1 issue found across 2 files

You’re at about 92% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Prompt for AI agents (unresolved 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="cli/internal/automation/release_pr_checks.go">

<violation number="1" location="cli/internal/automation/release_pr_checks.go:292">
P2: Avoid relabeling arbitrary plain `</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread cli/internal/automation/release_pr_checks.go
Skip release PR body rewriting when the Unity package summary is already labeled so repeated automation runs cannot relabel later release-note details blocks.
@hatayama hatayama merged commit 085c13f into v3-beta Jun 30, 2026
10 checks passed
@hatayama hatayama deleted the fix/release-pr-summary-label branch June 30, 2026 00:50
@github-actions github-actions Bot mentioned this pull request Jun 30, 2026
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