robot input (#8901)

Co-authored-by: gemini-cli-robot <gemini-cli-robot@google.com>
This commit is contained in:
matt korwel
2025-09-19 04:07:26 -07:00
committed by GitHub
parent c9b39c379b
commit 9f597ab7c0
2 changed files with 31 additions and 1 deletions

View File

@@ -132,7 +132,7 @@ async function main() {
) {
// GitHub App permission error - extract manual commands
const manualCommandsMatch = logContent.match(
/Please run these commands manually to create the branch:\s*\n\s*```bash\s*([\s\S]*?)\s*```/,
/📋 Please run these commands manually to create the branch:[\s\S]*?```bash\s*([\s\S]*?)\s*```/,
);
let manualCommands = '';
if (manualCommandsMatch) {

View File

@@ -255,6 +255,36 @@ describe('patch-create-comment', () => {
});
});
describe('GitHub App Permission Scenarios', () => {
it('should parse manual commands with clipboard emoji correctly', () => {
const result = runPatchCreateComment(
'--original-pr 8655 --exit-code 1 --commit abc1234 --channel stable --repository google-gemini/gemini-cli --test',
{
LOG_CONTENT: `❌ Failed to create release branch due to insufficient GitHub App permissions.
📋 Please run these commands manually to create the branch:
\`\`\`bash
git checkout -b hotfix/v0.4.1/stable/cherry-pick-abc1234 v0.4.1
git push origin hotfix/v0.4.1/stable/cherry-pick-abc1234
\`\`\``,
},
);
expect(result.success).toBe(true);
expect(result.stdout).toContain('🔒 **GitHub App Permission Issue**');
expect(result.stdout).toContain(
'Please run these commands manually to create the release branch:',
);
expect(result.stdout).toContain(
'git checkout -b hotfix/v0.4.1/stable/cherry-pick-abc1234 v0.4.1',
);
expect(result.stdout).toContain(
'git push origin hotfix/v0.4.1/stable/cherry-pick-abc1234',
);
});
});
describe('Test Mode Flag', () => {
it('should generate mock content in test mode for success', () => {
const result = runPatchCreateComment(