Add optional auto-review parameter

- Add auto-review input parameter (defaults to true for backward compatibility)
- Skip code review when auto-review is set to false
- Update README with usage examples for disabling auto-review
- Support conditional reviews based on labels or other criteria
This commit is contained in:
Claude
2025-11-14 15:16:06 +00:00
parent 9a80f461e3
commit 91d2ef3fcf
4 changed files with 49 additions and 0 deletions

9
dist/index.js vendored
View File

@@ -32260,6 +32260,15 @@ async function run() {
const token = core.getInput('github-token', { required: true });
const anthropicKey = core.getInput('anthropic-key', { required: true });
let prNumber = core.getInput('pr-number');
const autoReview = core.getInput('auto-review', { required: false }) || 'true';
// Check if auto-review is disabled
if (autoReview.toLowerCase() === 'false') {
core.info('⏭️ Auto-review is disabled, skipping code review');
core.setOutput('diff_size', '0');
core.setOutput('review', 'Auto-review disabled');
return;
}
// Get PR number from event if not provided
const context = github.context;