Skip to content

ARF-86023: Handle in progress forms for representative users #2170

ARF-86023: Handle in progress forms for representative users

ARF-86023: Handle in progress forms for representative users #2170

name: Label Pull Request Reviewers
on:
pull_request:
types: [opened, reopened, review_requested, synchronize, ready_for_review, unlabeled]
jobs:
label-pr-codeowners:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Require require-backend-approval label
if: github.event.action == 'unlabeled' && github.event.label.name == 'require-backend-approval'
uses: actions-ecosystem/action-add-labels@v1
with:
number: ${{ github.event.pull_request.number }}
labels: |
require-backend-approval
- name: Require omit-backend-approval label
if: github.event.action == 'unlabeled' && github.event.label.name == 'omit-backend-approval'
uses: actions-ecosystem/action-add-labels@v1
with:
number: ${{ github.event.pull_request.number }}
labels: |
omit-backend-approval
- name: Add omit-backend-approval label
if: |
!contains(github.event.pull_request.labels.*.name, 'require-backend-approval') &&
!contains(github.event.pull_request.labels.*.name, 'omit-backend-approval') &&
(
contains(toJSON(github.event.pull_request.requested_teams.*.name), 'mobile') ||
contains(toJSON(github.event.pull_request.requested_teams.*.name), 'lighthouse') ||
contains(toJSON(github.event.pull_request.requested_teams.*.name), 'identity')
)
uses: actions-ecosystem/action-add-labels@v1
with:
number: ${{ github.event.pull_request.number }}
labels: |
omit-backend-approval
- name: Add require-backend-approval label
uses: actions-ecosystem/action-add-labels@v1
if: |
!contains(github.event.pull_request.labels.*.name, 'require-backend-approval') &&
!contains(github.event.pull_request.labels.*.name, 'omit-backend-approval') &&
!contains(toJSON(github.event.pull_request.requested_teams.*.name), 'mobile') &&
!contains(toJSON(github.event.pull_request.requested_teams.*.name), 'lighthouse') &&
!contains(toJSON(github.event.pull_request.requested_teams.*.name), 'identity')
with:
number: ${{ github.event.pull_request.number }}
labels: |
require-backend-approval