forge-notify: list inline comment locations in the wake, not their text
This commit is contained in:
parent
6494c5d7f4
commit
c6958c7baa
1 changed files with 101 additions and 78 deletions
|
|
@ -303,19 +303,20 @@ with the meta-suffix `reviewer:` line (requested reviewers, below).
|
|||
A review's line comments belong to neither the review body nor the
|
||||
`latest_comment_url` (a review with only inline comments has no such url
|
||||
and otherwise lands as a bare `activity on PR`). So every PR wake fetches
|
||||
the PR's reviews (`/pulls/N/reviews`, up to four pages of 50) and appends
|
||||
the inline comments of those that are new to the agent as an
|
||||
`inline review comments:` block, one `author [path:line]: text` entry
|
||||
each (`[path]` when Forgejo dropped the position because the line left the
|
||||
diff). A review counts as new when it was submitted strictly after the
|
||||
thread's previously delivered `updated_at` (all of them without a
|
||||
baseline, and any with no submit time, so nothing is hidden), is not the
|
||||
agent's own, is not a `PENDING` draft, and has `comments_count > 0`. Only
|
||||
the newest 5 such reviews are fetched, at most 10 comments are shown
|
||||
(`(+N more ...)` for the rest), and each excerpt is truncated to 300 bytes
|
||||
and heading-escaped like a body. Best effort: a failed fetch yields less
|
||||
text, never a dropped wake. Cost: one reviews fetch per PR wake, plus one
|
||||
per new commented review.
|
||||
the PR's reviews (`/pulls/N/reviews`, up to four pages of 50) and, for the
|
||||
reviews new to the agent, appends an
|
||||
`inline review comments (read them with `hive-forge pr reviews N`):` block
|
||||
saying where they are: one `author: path:line, path, ...` line per review
|
||||
author (bare `path` when Forgejo dropped the position because the line left
|
||||
the diff; control characters in a path become spaces). The comment text stays
|
||||
out of the wake - the agent reads the full review with the CLI. A review
|
||||
counts as new when it was submitted strictly after the thread's previously
|
||||
delivered `updated_at` (all of them without a baseline, and any with no
|
||||
submit time, so nothing is hidden), is not the agent's own, is not a
|
||||
`PENDING` draft, and has `comments_count > 0`. Only the newest 5 such reviews
|
||||
are fetched and at most 10 locations are listed (`(+N more)` for the rest).
|
||||
Best effort: a failed fetch yields less text, never a dropped wake. Cost: one
|
||||
reviews fetch per PR wake, plus one per new commented review.
|
||||
|
||||
### Merge/close vs a later comment
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue