diff --git a/.github/workflows/issue-triage.yml b/.github/workflows/issue-triage.yml index 9a193e9e7..de8c5ea85 100644 --- a/.github/workflows/issue-triage.yml +++ b/.github/workflows/issue-triage.yml @@ -3,6 +3,12 @@ name: Issue Triage on: issues: types: [opened] + workflow_dispatch: + inputs: + issue_number: + description: 'Issue number to triage' + required: true + type: number permissions: contents: read @@ -11,4 +17,7 @@ permissions: jobs: triage-issue: uses: OpenSwiftUIProject/github-workflows/.github/workflows/issue-triage.yml@main + with: + # fromJSON workaround number inputs: https://github.com/orgs/community/discussions/67182#discussioncomment-8617964 + issue_number: ${{ fromJSON(inputs.issue_number) }} secrets: inherit diff --git a/.github/workflows/pr-triage.yml b/.github/workflows/pr-triage.yml index add320e1b..e49ffb466 100644 --- a/.github/workflows/pr-triage.yml +++ b/.github/workflows/pr-triage.yml @@ -1,8 +1,10 @@ name: PR Triage on: - pull_request_target: - types: [opened, reopened] + push: + branches: + - '**' # All branches + - '!main' # Exclude main if needed workflow_dispatch: inputs: pr_number: @@ -16,5 +18,9 @@ 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) }} secrets: inherit