Add workflow to check help wanted labelling (#11105)
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com> Co-authored-by: Babak K. Shandiz <babakks@github.com> Co-authored-by: Andy Feller <andyfeller@github.com>
This commit is contained in:
parent
73b7d61475
commit
928a326cee
3 changed files with 130 additions and 1 deletions
29
.github/workflows/pr-help-wanted.yml
vendored
Normal file
29
.github/workflows/pr-help-wanted.yml
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
name: PR Help Wanted Check
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened]
|
||||
|
||||
permissions:
|
||||
contents: none
|
||||
issues: read
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
check-help-wanted:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check for issues without help-wanted label
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
|
||||
PR_AUTHOR_TYPE: ${{ github.event.pull_request.user.type }}
|
||||
if: !github.event.pull_request.draft
|
||||
run: |
|
||||
# Skip if PR is from a bot or org member
|
||||
if [ "$PR_AUTHOR_TYPE" = "Bot" ] || "gh api orgs/cli/public_members/${PR_AUTHOR}" --silent 2>/dev/null
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Run the script to check for issues without help-wanted label
|
||||
bash .github/scripts/check-help-wanted.sh ${{ github.event.pull_request.html_url }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue