Skip to content

Use the callback_metadata key when we send an email to a user_account #12456

Use the callback_metadata key when we send an email to a user_account

Use the callback_metadata key when we send an email to a user_account #12456

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: Remove require-backend-approval label
uses: actions-ecosystem/action-remove-labels@v1
with:
number: ${{ github.event.pull_request.number }}
labels: |
require-backend-approval
- name: Remove omit-backend-approval label
uses: actions-ecosystem/action-remove-labels@v1
with:
number: ${{ github.event.pull_request.number }}
labels: |
omit-backend-approval
# The following will be once bebugging as finished
# - 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: |
github.event.pull_request.draft == false &&
(
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: |
github.event.pull_request.draft == false &&
!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