Skip to content

Commit fc3795c

Browse files
committed
give functionality to use codeflash:skip in label like other bots
1 parent 19dcbfb commit fc3795c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

codeflash/cli_cmds/workflows/codeflash-optimize.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ jobs:
1717
optimize:
1818
name: Optimize new Python code
1919
# Don't run codeflash on codeflash-ai[bot] commits, prevent duplicate optimizations
20-
if: ${{ github.actor != 'codeflash-ai[bot]' }}
20+
# Also skip if 'codeflash:skip' label is present
21+
if: ${{
22+
github.actor != 'codeflash-ai[bot]' &&
23+
!contains(github.event.pull_request.labels.*.name, 'codeflash:skip')
24+
}}
2125
runs-on: ubuntu-latest
2226
env:
2327
CODEFLASH_API_KEY: ${{ secrets.CODEFLASH_API_KEY }}

0 commit comments

Comments
 (0)