cli/.github/workflows/pr-help-wanted.yml
2025-06-16 11:47:48 -06:00

32 lines
979 B
YAML

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: Checkout repository
uses: actions/checkout@v4
- 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/workflows/scripts/check-help-wanted.sh ${{ github.event.pull_request.html_url }}