Skip to content

The Claim limit, and taking in-progress off closed issues #284

Closed

Description

@JacobStephens2

Parent

#212

What to build

The Claim limit and the sweep.

Claim limit. A new User config key, pickup.limit, a whole number from 1 up, default 3. A Pickup run counts the repository's open issues labelled in-progress, whoever started them, and is skipped when the count is at or over the limit: exit 0, stdout empty, one line of reason on stderr naming the count and the limit. It keeps a broken Base branch from failing every Ready issue in turn, and pull requests from piling up unreviewed. Setup writes the key at its default and doesn't ask about it. There is no command-line flag for it.

The sweep. Each Pickup run, once it holds the lock and before it counts, lists the repository's closed issues labelled in-progress and removes the label from each, so issues merged by hand are cleaned up. A failure is a warning: line and doesn't stop the pass.

Acceptance criteria

  • With three open issues labelled in-progress and no pickup.limit, a pass is skipped with exit 0, stdout empty and a line naming the count and the limit, and starts no session.
  • With two, the pass takes a Ready issue.
  • pickup.limit changes the limit, in both directions.
  • Closed issues labelled in-progress don't count.
  • 0, a negative number or a value of the wrong type for pickup.limit stops the command with an error naming the file and the key, as other User config errors do.
  • Setup writes pickup.limit = 3 with its comment, asks nothing about it, and keeps a value already there.
  • A pass removes in-progress from every closed issue that carries it, and leaves the closed issue's other labels.
  • The sweep runs on a pass that is then skipped for the Claim limit or for having no Ready issue, and not on one skipped for the lock.
  • A sweep that fails prints a warning: line and the pass carries on.
  • The README's User config section lists pickup.limit, and its Pickup run section describes the Claim limit and the sweep.
  • End-to-end cases cover the above, with the fake gh gaining what they need, such as listing issues by label and state.

Blocked by

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

    ready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions