| 21 | } |
| 22 | |
| 23 | /** Regular expression matching comments that begin with caretaker note prefixes. */ |
| 24 | export const CARETAKER_NOTE_COMMENT_REGEX = |
| 25 | /^\s*(?:[*_#\[(]+\s*)?(?:caretakers?(?:[\s-]*(?:notes?|\(notes?\)))?|notes?\s+(?:for|to)\s+caretakers?)(?:\s*[\])])?(?:\*{1,2}|_{1,2})?\s*[:"]/i; |
| 26 | |
| 27 | /** |
| 28 | * Searches the comments on a pull request for a single comment matching the caretaker note prefix. |
| 29 | * Only comments from trusted authors (OWNER, MEMBER, or COLLABORATOR) are considered. |
| 30 | * Returns the comment body if exactly one matching comment is found, or null otherwise. |
| 31 | */ |