@@ -18,6 +18,7 @@ async function run(): Promise<void> {
1818 const minimizeComments = core . getBooleanInput ( 'minimize-detected-comments' )
1919 const customPromptPath = core . getInput ( 'custom-prompt-path' )
2020 const endpoint = core . getInput ( 'endpoint' )
21+ const dryRun = core . getBooleanInput ( 'dry-run' )
2122
2223 // Built-in prompt configuration
2324 const enableSpamDetection = core . getBooleanInput ( 'enable-spam-detection' )
@@ -75,15 +76,27 @@ async function run(): Promise<void> {
7576 }
7677
7778 if ( issueNumber && labels . length > 0 ) {
78- await addLabels ( octokit , github . context , issueNumber , labels )
79- core . info ( `Added labels [${ labels . join ( ', ' ) } ] to issue #${ issueNumber } ` )
79+ if ( dryRun ) {
80+ core . info (
81+ `[DRY RUN] Would add labels [${ labels . join ( ', ' ) } ] to issue #${ issueNumber } `
82+ )
83+ } else {
84+ await addLabels ( octokit , github . context , issueNumber , labels )
85+ core . info (
86+ `Added labels [${ labels . join ( ', ' ) } ] to issue #${ issueNumber } `
87+ )
88+ }
8089 }
8190
8291 // Only minimize comments if they are spam, not just AI-generated
8392 // and if minimize-detected-comments is enabled
8493 if ( commentNodeId && flags . spam && minimizeComments ) {
85- await minimizeComment ( octokit , commentNodeId )
86- core . info ( `Comment ${ commentNodeId } minimized as spam` )
94+ if ( dryRun ) {
95+ core . info ( `[DRY RUN] Would minimize comment ${ commentNodeId } as spam` )
96+ } else {
97+ await minimizeComment ( octokit , commentNodeId )
98+ core . info ( `Comment ${ commentNodeId } minimized as spam` )
99+ }
87100 }
88101 } catch ( error ) {
89102 core . setFailed ( ( error as Error ) . message )
0 commit comments