Fixes from the rest of the live session
- A near miss for abandon ("abort", "cancel", "drop it", ...) in an item's
thread is asked about, and changes nothing.
- The driver is told only the operator stops or closes an item, so it
doesn't claim to have done either.
- An issue assigned again after its item closed starts a new item that
notes the one before (Gitea's timeline gives the assignment time);
item_for_issue returns the latest item.
- Abandoning an issue Gitea won't close because of open dependencies says
so, naming them.
- An agreed item isn't offered restate.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
This commit is contained in:
1 parent
613a2a7f72
commit
0064ec7696
9 files changed
+242
-14
No files matched your search
@@ -261,6 +261,31 @@ class GiteaClient:
|
||||
who = (event.get("user") or {}).get("login")
|
||||
return who
|
||||
|
||||
def assigned_at(self, repo: str, index: int, assignee: str) -> str | None:
|
||||
"""When the issue was last assigned to ``assignee`` (ISO 8601), from
|
||||
its timeline, oldest first and paged to the end; None if the
|
||||
timeline doesn't say."""
|
||||
when = None
|
||||
for page in range(1, MAX_PR_PAGES + 1):
|
||||
events = (
|
||||
self._request(
|
||||
"GET",
|
||||
f"/repos/{repo}/issues/{index}/timeline",
|
||||
params={"limit": PR_PAGE_SIZE, "page": page},
|
||||
)
|
||||
or []
|
||||
)
|
||||
for event in events:
|
||||
if (
|
||||
event.get("type") == "assignees"
|
||||
and not event.get("removed_assignee")
|
||||
and (event.get("assignee") or {}).get("login") == assignee
|
||||
):
|
||||
when = event.get("created_at")
|
||||
if len(events) < PR_PAGE_SIZE:
|
||||
break
|
||||
return when
|
||||
|
||||
def repository(self, repo: str) -> dict[str, Any]:
|
||||
"""The repository as this account sees it, permissions included."""
|
||||
return dict(self._request("GET", f"/repos/{repo}"))
|
||||
|
||||
Reference in new issue
Block a user