* Redacts the GitHub token from git output before it is surfaced in an error. * Removes the literal token and any URL userinfo (`//user:token@`), so a failure * message can quote git's real stderr without leaking the credential.
(text: string, token: string)
| 128 | * message can quote git's real stderr without leaking the credential. |
| 129 | */ |
| 130 | function scrubGitSecrets(text: string, token: string): string { |
| 131 | const withoutToken = token ? text.split(token).join('***') : text |
| 132 | return withoutToken.replace(/\/\/[^/@\s]+@/g, '//***@') |
| 133 | } |
| 134 | |
| 135 | function buildPrBody(task: string, finalText: string): string { |
| 136 | const summary = finalText.trim() |
no test coverage detected