From 7c9494b69dbd785b17c98e7dce027355b067b6c1 Mon Sep 17 00:00:00 2001 From: Jack Lynch Date: Tue, 3 Feb 2026 16:01:19 +0000 Subject: [PATCH] FDN-4433 Remove add-labels Github workflow --- .github/workflows/add-labels.yml | 41 -------------------------------- .github/workflows/auto-merge.yml | 2 +- 2 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 .github/workflows/add-labels.yml diff --git a/.github/workflows/add-labels.yml b/.github/workflows/add-labels.yml deleted file mode 100644 index 0cc870fb..00000000 --- a/.github/workflows/add-labels.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: "Add labels" - -on: - pull_request: - types: [opened, labeled, synchronize] - -permissions: - contents: write - pull-requests: write - -jobs: - add-labels: - runs-on: ubuntu-latest - if: ${{ contains(github.event.pull_request.labels.*.name, 'scala-steward') }} - steps: - - name: Add auto-merge label - if: ${{ contains(github.event.pull_request.title, 'Flow dependency updates') }} - run: | - REPO="${{ github.repository }}" - PR_URL="${{ github.event.pull_request.html_url }}" - LABEL_NAME="auto-merge" - LABEL_COLOR="2ECC71" - - # create the label if it doesn't exist - if ! gh label list --repo "$REPO" --json name --jq '.[].name' | grep -qi "^$LABEL_NAME$"; then - echo "Creating label '$LABEL_NAME'" - gh label create "$LABEL_NAME" --color "$LABEL_COLOR" --repo "$REPO" --force - fi - - # get current labels on the PR - LABELS=$(gh pr view "$PR_URL" --json labels --jq '.labels[].name') - - # add label if missing - if ! echo "$LABELS" | grep -qi "^$LABEL_NAME$"; then - echo "Adding '$LABEL_NAME' label to PR" - gh pr edit "$PR_URL" --add-label "$LABEL_NAME" - else - echo "'$LABEL_NAME' label already present" - fi - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml index 36238606..9f82a6f0 100644 --- a/.github/workflows/auto-merge.yml +++ b/.github/workflows/auto-merge.yml @@ -10,7 +10,7 @@ permissions: jobs: approve-and-merge: runs-on: ubuntu-latest - if: ${{ github.event.state == 'success' }} + if: ${{ github.event.state == 'success' && github.event.context == 'continuous-integration/jenkins/branch' }} steps: - name: log jenkins context run: |