diff --git a/.github/workflows/pr-triage.yml b/.github/workflows/pr-triage.yml index e49ffb466..2e611e78e 100644 --- a/.github/workflows/pr-triage.yml +++ b/.github/workflows/pr-triage.yml @@ -1,10 +1,8 @@ name: PR Triage on: - push: - branches: - - '**' # All branches - - '!main' # Exclude main if needed + pull_request: + types: [opened, reopened, synchronize] workflow_dispatch: inputs: pr_number: @@ -18,9 +16,8 @@ permissions: jobs: triage-pr: - if: github.event.pull_request != null || inputs.pr_number != '' # Only run if it's part of a PR or pr_number is provided uses: OpenSwiftUIProject/github-workflows/.github/workflows/pr-triage.yml@main with: # fromJSON workaround number inputs: https://github.com/orgs/community/discussions/67182#discussioncomment-8617964 - pr_number: ${{ fromJSON(inputs.pr_number) }} + pr_number: ${{ inputs.pr_number && fromJSON(inputs.pr_number) || github.event.pull_request.number }} secrets: inherit