Skip to content

feat(dal,sdf): Close and Put On hold actions v2 endpoints #3151

feat(dal,sdf): Close and Put On hold actions v2 endpoints

feat(dal,sdf): Close and Put On hold actions v2 endpoints #3151

Workflow file for this run

name: Is Community User Check
on:
pull_request_target:
types:
- opened
- synchronize
- reopened
jobs:
check-is-community:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
env:
SI_STAFF: "adamhjk mahirl fnichol nickgerace paulocsanz jhelwig vbustamante zacharyhamm theoephraim wendybujalski stack72 britmyerss AnnaAtMax sprutton1 keeb johnrwatson jobelenus"
steps:
- name: Checkout code
id: check_author
run: |
PR_AUTHOR="${{ github.event.pull_request.user.login }}"
if ! [[ "${SI_STAFF}" =~ "$PR_AUTHOR" ]]; then
echo "Authored by one of our amazing community peeps!"
echo "requires-community-tag=true" >> $GITHUB_OUTPUT
else
echo "Successfully checked the author against the staff list"
fi
- name: Label PR
if: steps.check_author.outputs.requires-community-tag == 'true'
uses: actions/github-script@v5
with:
script: |
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: ${{ github.event.pull_request.number }},
labels: ['community']
});