Summary
We currently maintain two nearly identical reusable workflows:
.github/workflows/collect-issues-shared.yml — wraps actions/collect-issues
.github/workflows/collect-pull-requests-shared.yml — wraps actions/collect-pull-requests
Both take the exact same inputs (organizations, repositories, project_owner, project_number) and the same token secret, and only differ in which action they call. As part of the broader effort to consolidate Shared Workflows, these two should be merged into a single collect-shared.yml workflow that can collect issues, pull requests, or both, depending on the config passed to it.
Proposed approach
Add a workflow input (e.g. collect: issues | pull_requests | both, or two booleans collect_issues / collect_pull_requests) that controls which of the underlying actions run. The collect job would conditionally run the collect-issues and/or collect-pull-requests action steps (or use a matrix) based on that input, reusing the existing organizations, repositories, project_owner, project_number, and token inputs/secrets as-is.
Acceptance criteria
Summary
We currently maintain two nearly identical reusable workflows:
.github/workflows/collect-issues-shared.yml— wrapsactions/collect-issues.github/workflows/collect-pull-requests-shared.yml— wrapsactions/collect-pull-requestsBoth take the exact same inputs (
organizations,repositories,project_owner,project_number) and the sametokensecret, and only differ in which action they call. As part of the broader effort to consolidate Shared Workflows, these two should be merged into a singlecollect-shared.ymlworkflow that can collect issues, pull requests, or both, depending on the config passed to it.Proposed approach
Add a workflow input (e.g.
collect: issues | pull_requests | both, or two booleanscollect_issues/collect_pull_requests) that controls which of the underlying actions run. Thecollectjob would conditionally run thecollect-issuesand/orcollect-pull-requestsaction steps (or use a matrix) based on that input, reusing the existingorganizations,repositories,project_owner,project_number, andtokeninputs/secrets as-is.Acceptance criteria
collect-shared.yml) can be called to collect only issues, only pull requests, or both in one run, based on its inputs.collect-issues-shared.ymlandcollect-pull-requests-shared.ymlare removed once callers are migrated (or kept as thin wrappers around the new workflow if a deprecation period is preferred).