Skip to content

feat(ng-dev/pr): surface caretaker note comment inline during merge - #3952

Open
mattrbeck wants to merge 4 commits into
angular:mainfrom
mattrbeck:surface-caretaker-note
Open

feat(ng-dev/pr): surface caretaker note comment inline during merge#3952
mattrbeck wants to merge 4 commits into
angular:mainfrom
mattrbeck:surface-caretaker-note

Conversation

@mattrbeck

Copy link
Copy Markdown
Member

When merging a PR that has the merge: caretaker note label applied, the CLI previously only showed a warning and a quick link to the PR on GitHub.

This change:

  1. Surfaces the matching caretaker note comment body directly inline in the CLI confirmation prompt so caretakers do not have to leave the terminal to read it on GitHub.
  2. Applies 16-color ANSI magenta formatting to the quoted comment block to make the caretaker note clearly distinguishable in the terminal.
  3. Preserves existing fallback behavior with the PR link if no single matching caretaker note comment is found (e.g. 0 or multiple matching comments).

@angular-robot angular-robot Bot added the detected: feature PR contains a feature commit label Sep 2, 2026

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request introduces functionality to fetch and display caretaker notes directly from GitHub pull request comments when prompting the caretaker during a merge. It adds helper functions to extract, match (via regex), and format these notes, along with corresponding unit tests. The review feedback highlights a security concern where caretaker notes could be spoofed by untrusted GitHub users. It suggests restricting the notes to comments authored by trusted users (e.g., owners, members, or collaborators) and adding unit tests to verify this behavior.

Comment thread ng-dev/pr/merge/messages.ts
Comment thread ng-dev/pr/merge/messages.spec.ts
Apply magenta color styling to the quoted caretaker note when prompting during merge.
Restrict caretaker note extraction to comments authored by users with author association of OWNER, MEMBER, or COLLABORATOR to prevent spoofing from untrusted users.
@mattrbeck
mattrbeck force-pushed the surface-caretaker-note branch from a687efe to 617424f Compare September 4, 2026 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

detected: feature PR contains a feature commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant