Skip to content

ci: replace gh CLI with github-script in release-PR assign step (LAB-899) - #61

Merged
27Bslash6 merged 2 commits into
mainfrom
lab-899-assign-step-github-script
Jul 27, 2026
Merged

ci: replace gh CLI with github-script in release-PR assign step (LAB-899)#61
27Bslash6 merged 2 commits into
mainfrom
lab-899-assign-step-github-script

Conversation

@27Bslash6

@27Bslash6 27Bslash6 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

What

Replaces the gh pr edit release-PR assign step in release.yml with SHA-pinned actions/github-script@ed597411 (v8) calling issues.addAssignees via the app token. Minimal diff: this step only.

Why

The self-hosted cachekit ARC runner has no gh CLI, so the step dies gh: command not found (exit 127) — verified in run 30224112374. This was masked until #58 (LAB-865) fixed the earlier fromJson('') template crash; the step has never once executed successfully. github-script runs on the runner's bundled Node, so there is no CLI dependency to install, and it also drops the hardcoded release-please head-branch name.

outputs.pr is passed raw into env and parsed with JSON.parse in the script — never through template-position fromJson, which GitHub evaluates even when if: is false and which crashed on '' for no-release pushes (the original LAB-865 failure). A bare string expansion of '' in env is harmless.

Behaviour on all three push paths

  1. No-release-PR push (ordinary merge, no open release PR): steps.release.outputs.pr is empty → if: is false → step skipped; the env expansion of the empty string is inert. Job green.
  2. PR-creating/updating push: outputs.pr is the release-please PR JSON → script parses it and assigns 27Bslash6 to that PR number (re-adding an existing assignee is a no-op). Job green, PR assigned.
  3. Release-merge push (release PR merged): outputs.pr is empty, release_created is true → assign step skipped, publish job fires exactly as before. Publish path untouched.

Gates

  • Crypto/protocol panel: n/a — workflow-only change, no wire surface.
  • Docs gate: none — no user-facing behaviour or API changed.

Closes LAB-899. Context: LAB-865 (#58), LAB-764.

Summary by CodeRabbit

  • Chores
    • Improved release automation for more reliable assignment of release pull requests.
    • Updated authentication handling and removed reliance on an external command-line tool in the release process.
    • No changes to customer-facing product functionality.

…899)

The self-hosted cachekit ARC runner has no gh CLI, so the assign step
introduced-then-fixed in LAB-865 dies with exit 127 ('gh: command not
found') on every push that creates or updates a release PR (run
30224112374). Swap it for SHA-pinned actions/github-script calling
issues.addAssignees with the app token — no CLI dependency, no
hardcoded head-branch name, and outputs.pr is parsed in JS from env
rather than template-position fromJson (which evaluates even when if:
is false, the original LAB-865 crash).

Co-authored-by: multica-agent <github@multica.ai>
@kodus-27b

This comment has been minimized.

@27Bslash6 27Bslash6 changed the title LAB-899: ci: replace gh CLI with github-script in release-PR assign step ci: replace gh CLI with github-script in release-PR assign step (LAB-899) Jul 27, 2026
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 55 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8fdf568d-a635-4f62-9971-c8d75dbf7582

📥 Commits

Reviewing files that changed from the base of the PR and between 2ab42cc and 4cd780e.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

Walkthrough

The release workflow now uses actions/github-script and the GitHub App token to assign the generated release pull request via the REST API, replacing the gh CLI command and GH_TOKEN authentication.

Changes

Release workflow

Layer / File(s) Summary
REST-based release PR assignment
.github/workflows/release.yml
The release job parses the release pull request JSON and adds 27Bslash6 as an assignee through github.rest.issues.addAssignees using the App token.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: swapping the release PR assignment step from gh CLI to github-script.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch lab-899-assign-step-github-script

Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 27, 2026
Comment thread .github/workflows/release.yml Outdated
Kody review on #61: JSON.parse + addAssignees threw unhandled on
malformed PR_JSON or API failure, failing the step with a raw stack
trace and no context. Wrap in try/catch and core.setFailed with the
repo, PR_JSON length (parse vs truncation diagnosis without dumping
the multi-KB PR body into logs), and error message. Still fails the
step — assignment failures must stay visible, not warn-and-pass.

Co-authored-by: multica-agent <github@multica.ai>
@kodus-27b

kodus-27b Bot commented Jul 27, 2026

Copy link
Copy Markdown

Kody Review Complete

Great news! 🎉
No issues were found that match your current review configurations.

Keep up the excellent work! 🚀

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug
Performance
Security
Business Logic

Access your configuration settings here.

@27Bslash6

Copy link
Copy Markdown
Contributor Author

@kody start-review

@27Bslash6
27Bslash6 merged commit 9031c74 into main Jul 27, 2026
32 checks passed
@27Bslash6
27Bslash6 deleted the lab-899-assign-step-github-script branch July 27, 2026 08:23
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