Update workflow to not add label when PR has already been analyzed (#39545)

This commit is contained in:
jonathansadowski 2023-08-03 20:35:51 +07:00 committed by GitHub
parent 6d920da52a
commit eb210907e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -46,7 +46,9 @@ jobs:
PULL_REQUEST_ID: ${{ github.event.pull_request.node_id }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'Add the label for PR analysis'
if: github.event.pull_request.base.ref == 'trunk'
if: |
github.event.pull_request.base.ref == 'trunk' &&
! contains(github.event.pull_request.labels.*.name, 'status: analysis complete')
uses: actions-ecosystem/action-add-labels@bd52874380e3909a1ac983768df6976535ece7f8
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
@ -59,7 +61,8 @@ jobs:
- name: 'Trigger PR scrub'
if: |
github.event.pull_request.base.ref == 'trunk' &&
! contains(github.event.pull_request.labels.*.name, 'needs: analysis')
! contains(github.event.pull_request.labels.*.name, 'needs: analysis') &&
! contains(github.event.pull_request.labels.*.name, 'status: analysis complete')
uses: ./.github/actions/pr-scrub-notify-slack
with:
TEST_ASSISTANCE_BOT_TOKEN: ${{ secrets.TEST_ASSISTANCE_BOT_TOKEN }}