Skip to content

feat: instruct reviewer to include GitHub permalinks#959

Open
jesseturner21 wants to merge 1 commit intoaws:mainfrom
jesseturner21:feat/review-permalink-links
Open

feat: instruct reviewer to include GitHub permalinks#959
jesseturner21 wants to merge 1 commit intoaws:mainfrom
jesseturner21:feat/review-permalink-links

Conversation

@jesseturner21
Copy link
Copy Markdown
Contributor

Summary

  • Adds instruction to the review prompt to include GitHub permalinks when referencing specific lines of code
  • Makes review comments easier to navigate — click the link to jump straight to the relevant code

Test plan

  • Trigger workflow_dispatch and verify the reviewer includes links like https://github.com/aws/agentcore-cli/blob/<sha>/path/file.ts#L42-L50 in comments

Instructs the reviewer to include GitHub permalinks when referencing
specific lines of code, making comments easier to navigate.
@jesseturner21 jesseturner21 requested a review from a team April 24, 2026 19:36
@github-actions github-actions Bot added the size/xs PR size: XS label Apr 24, 2026
@github-actions github-actions Bot added the agentcore-harness-reviewing AgentCore Harness review in progress label Apr 24, 2026
@jesseturner21
Copy link
Copy Markdown
Contributor Author

The new instruction says 'include a GitHub permalink' but doesn't specify the format. Without guidance, the reviewer may generate branch-based URLs (e.g. /blob/feat/review-permalink-links/path/file.ts#L42) which rot when the branch is force-pushed, rebased, or deleted after merge — a common outcome for PR branches. The test plan in the PR description explicitly expects SHA-based URLs (/blob/<sha>/...), but the prompt itself doesn't ask for that.

A couple of options:

  1. Tighten the wording to require a commit SHA, e.g.: 'When referencing specific lines of code, include a GitHub permalink that uses the PR head commit SHA (e.g. https://github.com/<owner>/<repo>/blob/<sha>/path/file.ts#L42-L50), not a branch name, so the link doesn't rot after merge or force-push.'

  2. Additionally, mention that for PRs from forks the permalink should point to the fork's repo at that SHA (since the code at that SHA lives in the fork, not in aws/agentcore-cli). The reviewer can get both the head SHA and head repo from gh pr view <pr> --json headRefOid,headRepositoryOwner,headRepository.

Without this, the feature will work for the happy path but produce broken links after branches are deleted post-merge.

@github-actions github-actions Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant