Skip to content

Commit 3cc877e

Browse files
committed
Fix CLI to support --no-comment and --no-status-check flags
- Add explicit --no-comment and --no-status-check options to the github command - This fixes the 'unknown option' error in the Test GitHub Action workflow - The action can now properly disable comment and status check features
1 parent 5cbc480 commit 3cc877e

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/action.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ async function main() {
3838
command += ` --pr ${prNumber}`;
3939
}
4040

41+
// Note: The CLI uses --comment and --status-check as boolean flags
42+
// When they are true (default), we don't need to specify them
43+
// When they are false, we need to use --no-comment and --no-status-check
4144
if (!comment) {
4245
command += ' --no-comment';
4346
}

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ program
7272
'Pull request number (auto-detected if not provided)'
7373
)
7474
.option('--comment', 'Post comment on PR', true)
75+
.option('--no-comment', 'Disable posting comment on PR')
7576
.option('--status-check', 'Create status check', true)
77+
.option('--no-status-check', 'Disable creating status check')
7678
.action(async options => {
7779
try {
7880
await analyzeWithGitHub(options);

0 commit comments

Comments
 (0)