Skip to content

Pull Request Ready for Review #558

Pull Request Ready for Review

Pull Request Ready for Review #558

name: Pull Request Ready for Review
on:
pull_request:
types: [labeled, unlabeled, synchronize, ready_for_review]
workflow_run:
workflows: ["Code Checks", "Check CODEOWNERS Entries", "Code Health Report"]
types: [completed]
jobs:
ready_for_review:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: echo "${{ github.event_name }}"
- name: Audit PR Labels
id: audit_pr_labels
if: |
!contains(github.event.pull_request.labels.*.name, 'code-health-failure') &&
!contains(github.event.pull_request.labels.*.name, 'codeowners-addition-failure') &&
!contains(github.event.pull_request.labels.*.name, 'codeowners-delete-failure') &&
!contains(github.event.pull_request.labels.*.name, 'lint-failure') &&
!contains(github.event.pull_request.labels.*.name, 'test-failure')
run: |
echo "no_failures=true" >> $GITHUB_OUTPUT
- name: Audit Test Passing Label
id: audit_passing_labels
if: |
contains(github.event.pull_request.labels.*.name, 'test-passing')
run: |
echo "ready_for_review=true" >> $GITHUB_OUTPUT
- name: Add Review label
uses: actions-ecosystem/action-add-labels@v1
if: steps.audit_passing_labels.outputs.ready_for_review == 'true' && steps.audit_pr_labels.outputs.no_failures == 'true'
with:
number: ${{ github.event.pull_request.number }}
labels: |
ready-for-backend-review
- name: Remove Review label
uses: actions-ecosystem/action-remove-labels@v1
if: steps.audit_passing_labels.outputs.ready_for_review != 'true' || steps.audit_pr_labels.outputs.no_failures != 'true'
with:
number: ${{ github.event.pull_request.number }}
labels: |
ready-for-backend-review