Skip to content

ci: set milestones automatically on close #2218

Closed

Description

@JarryShaw

Milestones stopped being set after #1068 (2026-10-06): more than 1,100 closed issues and PRs had none. They are being backfilled by hand onto PyPCAPKit v1.5, using the rule the milestone already followed:

Proposal: a milestone.yml workflow, one task per workflow (#1967), with its logic in a util/ script and tests, as project-status.yml does with util/project_status.py.

  • Triggers: issues: closed and pull_request_target: closed.
    • On a merged PR or a completed issue, it sets the open milestone named after the base branch's pcapkit.__version__: PyPCAPKit v<major>.<minor>.
    • On an unmerged PR or a not-planned issue, it removes any milestone.
  • Missing milestone: if the milestone for the version does not exist, a warning annotation is emitted and nothing is created; creating the next milestone stays a manual release step.
  • Backfill: workflow_dispatch re-runs the rule over every closed item that has no milestone.
  • Security: pull_request_target runs only base-branch code, and no PR content is executed. Permissions are issues: write and pull-requests: write on that job alone.

Activity

  1. added
    ciPull requests that change CI or workflow configuration (ci: subject prefix)
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 25, 2026
  2. JarryShaw commented on Oct 26, 2026

    @JarryShaw
    OwnerAuthor

    When open, they should be added to Milestones already i think.

  3. JarryShaw commented on Oct 26, 2026

    @JarryShaw
    OwnerAuthor

    Agreed. #2219 is being changed so that an issue or PR gets the release milestone when it is opened or reopened. Closing still removes it from an unmerged PR or a not-planned or duplicate issue, and the backfill covers open items too. The milestone is being set on the items open now by hand.

  4. added this to the PyPCAPKit v1.5 milestone on Oct 26, 2026
  5. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ciPull requests that change CI or workflow configuration (ci: subject prefix)

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions