Automatically release status:in-progress on close and merge #58

Closed
opened 2026-07-02 04:51:59 -05:00 by jcwalker3 · 1 comment
Owner

Problem

Closed issues can retain status:in-progress (happened with #46/#48), leaving stale tracker state that needs manual cleanup.

Goal

When Gitea-Tools performs an issue close, PR merge, or PR close, it removes status:in-progress from the relevant issue(s).

Scope

Only for actions performed through Gitea-Tools. No web-UI/webhook/background reconciliation here.

Behavior

  • Close issue → remove status:in-progress from that issue (absent = no-op success).
  • Merge PR → find linked issues (Closes/Fixes/Resolves #n, Refs #n, branch …/issue-<n>-…) → remove the label; touch no other labels.
  • Close PR without merge → find linked issues → remove the label; do not close them; optional comment.
  • No confidently-linked issue → no mutation, report clearly (no guessing).
  • Label-removal failure → reported, not falsely reported clean.
  • Preserve existing return payloads; add cleanup status where the pattern allows. Audit logging still works for the extra mutation.

Implementation

Small unit-testable helpers in mcp_server.py: extract_linked_issue_numbers(text, branch_name=None), release_in_progress_label(...), cleanup_in_progress_for_pr(...). No new network calls beyond the label mutation. No change to auth/profile/retry/audit/config/worktree/release-tag behavior.

Acceptance

Label auto-removed on close/merge/close-without-merge of linked work; no unrelated labels removed; missing label = no-op; missing link = no guess; failures reported; backwards compatible; full suite passes.

Refs #46, #48.

## Problem Closed issues can retain `status:in-progress` (happened with #46/#48), leaving stale tracker state that needs manual cleanup. ## Goal When Gitea-Tools performs an issue close, PR merge, or PR close, it removes `status:in-progress` from the relevant issue(s). ## Scope Only for actions performed **through Gitea-Tools**. No web-UI/webhook/background reconciliation here. ## Behavior - Close issue → remove `status:in-progress` from that issue (absent = no-op success). - Merge PR → find linked issues (`Closes/Fixes/Resolves #n`, `Refs #n`, branch `…/issue-<n>-…`) → remove the label; touch no other labels. - Close PR without merge → find linked issues → remove the label; do **not** close them; optional comment. - No confidently-linked issue → no mutation, report clearly (no guessing). - Label-removal failure → reported, not falsely reported clean. - Preserve existing return payloads; add cleanup status where the pattern allows. Audit logging still works for the extra mutation. ## Implementation Small unit-testable helpers in `mcp_server.py`: `extract_linked_issue_numbers(text, branch_name=None)`, `release_in_progress_label(...)`, `cleanup_in_progress_for_pr(...)`. No new network calls beyond the label mutation. No change to auth/profile/retry/audit/config/worktree/release-tag behavior. ## Acceptance Label auto-removed on close/merge/close-without-merge of linked work; no unrelated labels removed; missing label = no-op; missing link = no guess; failures reported; backwards compatible; full suite passes. Refs #46, #48.
jcwalker3 added the status:in-progress label 2026-07-02 04:52:09 -05:00
Author
Owner

Closing as duplicate of #56 (auto-release status:in-progress on close/merge), which is implemented and merged via PR #57. Releasing status:in-progress; no corrective PR needed.

Closing as duplicate of #56 (auto-release status:in-progress on close/merge), which is implemented and merged via PR #57. Releasing status:in-progress; no corrective PR needed.
jcwalker3 removed the status:in-progress label 2026-07-02 05:07:10 -05:00
Sign in to join this conversation.