@@ -443,46 +443,35 @@ jobs:
443443 if (isPR && prNumber && prNumber !== '' && prNumber !== 'undefined') {
444444 // Create an issue for failed PR analysis
445445 const title = 'π¨ AI Analysis Failed for PR #' + prNumber;
446- const body = `
447- ## AI Code Analysis Failure
448-
449- The automated AI code analysis workflow failed for PR #${prNumber}.
450-
451- **Pull Request:** #${prNumber}
452- **Event Type:** ${eventName}
453- **Failure Time:** ${new Date().toISOString()}
454- **Workflow Run:** ${workflowUrl}
455-
456-
457- ### Possible Causes
458- - API rate limits or temporary service issues
459- - Large diff size exceeding analysis limits
460- - Invalid file formats or encoding issues
461- - GEMINI_API_KEY configuration problems
462-
463- ### Manual Actions Required
464- 1. π Review the failed workflow logs for specific error details
465- 2. π Re-run the analysis workflow if it was a temporary issue
466- 3. π οΈ Check GEMINI_API_KEY secret configuration
467- 4. π₯ Proceed with manual code review for the PR
468-
469- **Note:** This does not necessarily indicate issues with the PR code itself.
470- `;
446+ const body = '## AI Code Analysis Failure\n\n' +
447+ 'The automated AI code analysis workflow failed for PR #' + prNumber + '.\n\n' +
448+ '**Pull Request:** #' + prNumber + '\n' +
449+ '**Event Type:** ' + eventName + '\n' +
450+ '**Failure Time:** ' + new Date().toISOString() + '\n' +
451+ '**Workflow Run:** ' + workflowUrl + '\n\n' +
452+ '### Possible Causes\n' +
453+ '- API rate limits or temporary service issues\n' +
454+ '- Large diff size exceeding analysis limits\n' +
455+ '- Invalid file formats or encoding issues\n' +
456+ '- GEMINI_API_KEY configuration problems\n\n' +
457+ '### Manual Actions Required\n' +
458+ '1. π Review the failed workflow logs for specific error details\n' +
459+ '2. π Re-run the analysis workflow if it was a temporary issue\n' +
460+ '3. π οΈ Check GEMINI_API_KEY secret configuration\n' +
461+ '4. π₯ Proceed with manual code review for the PR\n\n' +
462+ '**Note:** This does not necessarily indicate issues with the PR code itself.';
471463
472464 await github.rest.issues.create({
473465 owner: context.repo.owner,
474466 repo: context.repo.repo,
475467 title: title,
476- body: body
468+ body: body,
469+ labels: ['ai-analysis', 'workflow-failure', 'needs-attention']
477470 });
478471 console.log('β
Created failure issue for PR #' + prNumber);
479472 } else {
480473 // Log failure for non-PR events
481474 console.log('β οΈ Analysis failed for ' + eventName + ' event');
482475 console.log('π Workflow run: ' + workflowUrl);
483476 console.log('π Manual review recommended - check workflow logs for details');
484- }
485- title: title,
486- body: body,
487- labels: ['ai-analysis', 'workflow-failure', 'needs-attention']
488- });
477+ }
0 commit comments