feat: auto-release status:in-progress on close and merge (#58) #59
Closed
jcwalker3
wants to merge 1 commits from
fix/issue-58-release-in-progress-on-close into master
pull from: fix/issue-58-release-in-progress-on-close
merge into: :master
:master
:fix/issue-987-native-mcp-bootstrap
:feat/issue-985-project-scoped-launcher-identity
:fix/issue-983-cross-repo-base-ref
:feat/issue-980-stale-worker-retirement
:fix/issue-975-client-identity-heartbeat
:fix/issue-973-cross-repo-canonical-roots
:fix/issue-970-safely-resolve-missing-worktrees
:fix/issue-969-native-mcp-bootstrap
:feat/issue-664-break-glass-restart
:feat/issue-708-mcp-namespace-attachment
:feat/issue-665-restart-audit
:fix/issue-700-durable-walls
:fix/issue-704-prevent-env-workspace-bindings
:feat/issue-707-cross-project-boundaries
:fix/issue-690-review-profile-switch-guard
:fix/issue-953-bootstrap-lock-provenance
:feat/issue-949-native-fleet-inventory
:fix/issue-943-runtime-context-helpers
:fix/issue-945-owning-pr-renewal-evidence
:fix/issue-941-scope-guard-bootstrap-wiring
:docs/issue-930-remote-mcp-coupling-inventory
:fix/issue-892-author-bootstrap-deadlock
:fix/issue-686-detect-reject-manual-mcp
:fix/issue-672-mcp-config-drift
:fix/issue-689-deterministic-mcp-namespace
:feat/issue-666-concurrent-mcp-restart-tests
:feat/issue-659-maintenance-drain-mode
:feat/issue-648-notifications-console
:fix/issue-670-direct-master-incident
:feat/issue-644-console-recovery
:feat/issue-650-providers-insights
:feat/issue-669-scoped-component-recovery
:docs/issue-668-mcp-ha-rolling-restart
:feat/issue-667-console-restart-controls
:feat/issue-645-linkage-console
:feat/issue-643-request-preview-initiate
:fix/issue-897-permission-stale-runtime-classification
:feat/issue-641-runtime-session-view
:feat/issue-663-restart-classes
:feat/issue-661-drain-proof-hard-gate
:fix/issue-854-semantic-container-exclusion
:issue-640
:fix/issue-682-starlette-httpx2
1
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
7c2aabf6ac |
feat: auto-release status:in-progress on close and merge (#58)
When Gitea-Tools closes an issue, merges a PR, or closes a PR without merging, remove status:in-progress from the affected issue(s) so closed work doesn't retain stale in-progress state (as happened with #46/#48). Helpers (deterministic, unit-testable) in mcp_server.py: - extract_linked_issue_numbers(text, branch_name): pure; matches Closes/Fixes/Resolves/Refs #N and issue-<N> in a branch name (not review/pr-N). - release_in_progress_label(issue_numbers, repo_context): removes ONLY status:in-progress; absent label / undefined repo label = no-op success; per-issue failures recorded in `failed` (never falsely reported clean); emits an audit record per removal when auditing is enabled. - cleanup_in_progress_for_pr(pr_payload, repo_context): links from PR title/body + head branch, then releases; empty when nothing confidently linked (no guessing, no mutation). Wired into: - gitea_close_issue → releases from that issue. - gitea_merge_pr → releases from PR-linked issues (reuses the read-back PR). - gitea_edit_pr (state=closed) → releases from PR-linked issues WITHOUT closing them. Each returns the cleanup summary under `in_progress_cleanup`. Only necessary label GET/DELETE calls added; no auth/profile/retry/config/worktree/release-tag changes; backwards compatible. Tests: tests/test_in_progress_cleanup.py (18 cases) — extraction, present/absent label, no-issues/no-link no-op, multiple issues, failure reported, label not defined, only-status-removed, PR keyword/branch links, close-without-merge does not close the issue, and audit records the removal. Updated TestCloseIssue for the added release calls. Full suite 322 passed / 0 failures; py_compile clean; git diff --check clean; no secrets. Closes #58. Refs #46, #48. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> |