From fc3795c2c49fdc8328052d440aeb6e5931b1440d Mon Sep 17 00:00:00 2001 From: Saga4 Date: Thu, 5 Jun 2025 23:33:30 +0530 Subject: [PATCH] give functionality to use codeflash:skip in label like other bots --- codeflash/cli_cmds/workflows/codeflash-optimize.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/codeflash/cli_cmds/workflows/codeflash-optimize.yaml b/codeflash/cli_cmds/workflows/codeflash-optimize.yaml index ccf2ec382..c0269e4a4 100644 --- a/codeflash/cli_cmds/workflows/codeflash-optimize.yaml +++ b/codeflash/cli_cmds/workflows/codeflash-optimize.yaml @@ -17,7 +17,11 @@ jobs: optimize: name: Optimize new Python code # Don't run codeflash on codeflash-ai[bot] commits, prevent duplicate optimizations - if: ${{ github.actor != 'codeflash-ai[bot]' }} + # Also skip if 'codeflash:skip' label is present + if: ${{ + github.actor != 'codeflash-ai[bot]' && + !contains(github.event.pull_request.labels.*.name, 'codeflash:skip') + }} runs-on: ubuntu-latest env: CODEFLASH_API_KEY: ${{ secrets.CODEFLASH_API_KEY }}