Skip to content

Router sends the comment's API url, not html_url - #776

Merged
don-petry merged 1 commit into
mainfrom
fix/router-comment-api-url
Jul 18, 2026
Merged

don-petry merged 1 commit into
mainfrom
fix/router-comment-api-url

Conversation

@don-petry

Copy link
Copy Markdown
Contributor

Companion to petry-projects/.github-private#1293 (the persona runtime).

The runner fetches the summoning comment's body with gh api "$COMMENT_URL" to learn what the persona was asked. gh api cannot fetch a github.com browser url, so the router must pass the comment's .url (API), not .html_url. The API response still carries .html_url if a human-facing link is ever needed.

No ordering dependency with #1293: the runner's prompt degrades gracefully when the body fetch fails ("proceed from the item's title/body/diff"), so the soak works either way — this just makes the body-read actually succeed.

Single-field change; the value flows unchanged through the existing client_payload[comment_url] dispatch. actionlint clean.

🤖 Generated with Claude Code

The persona runner (combsmith/.github-private#1293) fetches the summoning
comment's body with `gh api "$COMMENT_URL"` to learn what the persona was asked.
`gh api` cannot fetch a github.com browser url, so the router must pass the
comment's `.url` (API), not `.html_url`. The API response still carries
`.html_url` if a human-facing link is ever wanted.

No ordering dependency with #1293: the runner's prompt degrades gracefully when
the body fetch fails ("proceed from the item's title/body/diff"), so the soak
works either way; this makes the body-read actually succeed.

Verification
- actionlint (CI ignores): clean.
- Single-field change; the value flows unchanged through the existing
  `client_payload[comment_url]` dispatch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 18, 2026 06:37
@don-petry
don-petry requested a review from a team as a code owner July 18, 2026 06:37
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@don-petry, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 39 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7bcc14fa-f3d4-4b21-b914-ace6b8c8edc8

📥 Commits

Reviewing files that changed from the base of the PR and between 06562d3 and ac71adc.

📒 Files selected for processing (1)
  • .github/workflows/persona-mention-reusable.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/router-comment-api-url

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.

@sonarqubecloud

Copy link
Copy Markdown

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) July 18, 2026 06:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the reusable Persona Mention Router workflow to pass the GitHub API URL for the summoning comment (instead of the browser html_url), so the downstream persona runner can successfully fetch the comment body via gh api and accurately determine what was asked.

Changes:

  • Switch COMMENT_URL from ${{ github.event.comment.html_url }} to ${{ github.event.comment.url }} (API URL).
  • Add inline documentation explaining why the API URL is required for gh api-based fetching.

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated review — APPROVED ✓

Risk: LOW
Reviewed commit: ac71adcaf8faff926635c75a795df80890eb714c
Review mode: triage-approved (single reviewer)

Summary

Single-field fix in the reusable persona-mention router: COMMENT_URL now passes the comment's API url (.url) instead of the browser url (.html_url), so the downstream persona runner's 'gh api "$COMMENT_URL"' body-fetch can actually succeed. The value flows unchanged through the existing client_payload[comment_url] dispatch. Triage assessment (low-risk) confirmed.

Linked issue analysis

No linked issues. This is a companion to petry-projects/.github-private#1293 (the persona runtime), as documented in the PR body. No ordering dependency: the runner degrades gracefully when the body fetch fails, so this change is safe to merge independently.

Findings

  • Verified against the full workflow at the head SHA: COMMENT_URL is set via env (not inline interpolation) and flows unchanged into client_payload[comment_url] — no script-injection surface, no permission changes.
  • Correctness confirmed: for issue_comment and pull_request_review_comment events, github.event.comment.url is the REST API url that gh api can fetch; .html_url is not fetchable by gh api.
  • Non-blocking note: discussion_comment payloads carry no REST .url field (discussions have no REST comments API), so COMMENT_URL will be empty for discussion mentions. This is not a regression — .html_url was equally unfetchable by gh api — and the runner's prompt explicitly degrades gracefully to the item's title/body/diff.
  • Secret scan: the run_secret_scanning MCP tool was not available in this run; the gitleaks CI check passed. No secrets in the diff (comment + context-field swap only).

CI status

All checks green: Lint, ShellCheck, Agent Security Scan, Secret scan (gitleaks), CodeQL (actions), SonarCloud (quality gate passed, 0 issues), Persona-mention Tests (lint + bats), Dependency Hardening Tests, AgentShield — all SUCCESS. Skipped checks are conditional jobs (dependabot, mention triggers, ecosystem-specific audits) and expected.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

@don-petry
don-petry merged commit 2e0c890 into main Jul 18, 2026
30 checks passed
@don-petry
don-petry deleted the fix/router-comment-api-url branch July 18, 2026 06:41

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated review — APPROVED ✓

Risk: LOW
Reviewed commit: ac71adcaf8faff926635c75a795df80890eb714c
Review mode: triage-approved (single reviewer)

Summary

Single-field fix in the reusable persona-mention router: COMMENT_URL now passes the summoning comment's API url (.url) instead of the browser url (.html_url), so the downstream persona runner's 'gh api "$COMMENT_URL"' body-fetch can succeed. The value flows unchanged through the existing client_payload[comment_url] dispatch. Triage low-risk assessment confirmed.

Linked issue analysis

No linked issues. The PR body documents this as a companion to petry-projects/.github-private#1293 (persona runtime) with no ordering dependency: the runner degrades gracefully to the item's title/body/diff when the body fetch fails, so this is safe to merge independently.

Findings

  • Diff is one context-field swap plus an inline comment explaining the why; COMMENT_URL is set via env (not inline script interpolation), so no script-injection surface and no permission changes.
  • Correctness confirmed: for issue_comment and pull_request_review_comment events, github.event.comment.url is the REST API url that gh api can fetch; .html_url is a browser url gh api cannot fetch.
  • Non-blocking note: discussion_comment payloads carry no REST .url field, so COMMENT_URL will be empty for discussion mentions. Not a regression (.html_url was equally unfetchable by gh api) and the runner degrades gracefully.
  • Secret scan: the run_secret_scanning MCP tool was not available in this run; the gitleaks CI check passed and the diff contains no secret material.
  • A prior automated review already approved this exact SHA; nothing has changed since, and this confirmation review reaches the same conclusion.

CI status

All checks green at head SHA ac71adc: Lint, ShellCheck, Agent Security Scan, Secret scan (gitleaks), CodeQL (actions), SonarCloud (quality gate passed, 0 new issues), Persona-mention Tests (lint + bats), Dependency Hardening Tests, AgentShield, CodeRabbit status SUCCESS. Skipped checks are conditional jobs (dependabot, mention triggers, ecosystem-specific audits) and expected.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

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.

3 participants