Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Initial commit

Initial commit #379

Workflow file for this run

name: PR Help Wanted Check
on:
pull_request_target:
types: [opened]
workflow_dispatch:
inputs:
pr_number:
description: "Pull Request number to check"
required: true
type: string
permissions:
contents: none
issues: read
pull-requests: write
jobs:
check-help-wanted:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set PR variables for workflow_dispatch event
id: pr-vars-dispatch
if: github.event_name == 'workflow_dispatch'
env:
PR_NUMBER: ${{ github.event.inputs.pr_number }}
run: |
# We only need to construct the PR URL from the dispatch event input.
echo "pr_url=https://github.com/cli/cli/pull/${PR_NUMBER}" >> $GITHUB_OUTPUT
- name: Check for issues without help-wanted label
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# These variables are optionally used in the check-help-wanted.sh
# script for additional checks; but they are not strictly necessary
# for the script to run. This is why we are okay with them being
# empty when the event is workflow_dispatch.
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
PR_AUTHOR_TYPE: ${{ github.event.pull_request.user.type }}
PR_AUTHOR_ASSOCIATION: ${{ github.event.pull_request.author_association }}
PR_URL: ${{ github.event.pull_request.html_url || steps.pr-vars-dispatch.outputs.pr_url }}
run: |
# Run the script to check for issues without help-wanted label
bash .github/workflows/scripts/check-help-wanted.sh "${PR_URL}"