Skip to content

Consolidate collect-issues-shared.yml and collect-pull-requests-shared.yml into one shared workflow #47

Description

@ineedjet

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

  • A single shared workflow (e.g. collect-shared.yml) can be called to collect only issues, only pull requests, or both in one run, based on its inputs.
  • No change in behavior/output for callers that only need issues or only need pull requests.
  • collect-issues-shared.yml and collect-pull-requests-shared.yml are removed once callers are migrated (or kept as thin wrappers around the new workflow if a deprecation period is preferred).
  • README / usage docs updated to reflect the new shared workflow and its inputs.
  • Existing consumers of the two workflows are updated to call the new one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions