mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-02-01 22:48:03 +00:00
robot input (#8901)
Co-authored-by: gemini-cli-robot <gemini-cli-robot@google.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user