Conversation
The `github_issues` and `github_pulls` tools were previously hardcoded
to the project's own GitHub repository and returned no comments. This
commit addresses both limitations.
Both tools now accept a `repository` parameter in `owner/repo` form,
defaulting to the project's own repo when omitted. A `parse_repo()`
helper centralises the parsing and default logic, replacing ad-hoc
`split_once('/')` calls scattered across the tool modules.
A `page` parameter was added to both tools so that long comment threads
can be walked incrementally. When a specific `number` is provided, the
tool fetches that page of conversation comments (10 per page) and
includes them in the response alongside a `comments_count` total. The
page size is intentionally bounded to keep responses within LLM context
limits.
The underlying `jp_github` crate gained a `list_comments()` method on
`IssuesHandler`, backed by a new `IssueCommentListBuilder` and a
`Comment` model. The `Issue` model also now carries a `comments` field
(the total count) which GitHub exposes on both the list and detail
endpoints.
Auth handling was also improved: `github_issues`, `github_pulls`, and
`github_read_file` now use a new `auth_optional()` path that falls back
to anonymous access when no token is configured. Read-only operations
against public repos no longer require a token.
Finally, `web_fetch` now detects GitHub issue and PR URLs and returns a
redirect error pointing at the correct dedicated tool, rather than
silently returning near-empty HTML (GitHub renders comments
client-side).
Signed-off-by: Jean Mertz <git@jeanmertz.com>
…t fetching Signed-off-by: Jean Mertz <git@jeanmertz.com>
…t fetching Signed-off-by: Jean Mertz <git@jeanmertz.com>
…t fetching Signed-off-by: Jean Mertz <git@jeanmertz.com>
…t fetching Signed-off-by: Jean Mertz <git@jeanmertz.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
github_issuesandgithub_pullstools were previously hardcoded to the project's own GitHub repository and returned no comments. This commit addresses both limitations.Both tools now accept a
repositoryparameter inowner/repoform, defaulting to the project's own repo when omitted. Aparse_repo()helper centralises the parsing and default logic, replacing ad-hocsplit_once('/')calls scattered across the tool modules.A
pageparameter was added to both tools so that long comment threads can be walked incrementally. When a specificnumberis provided, the tool fetches that page of conversation comments (10 per page) and includes them in the response alongside acomments_counttotal. The page size is intentionally bounded to keep responses within LLM context limits.The underlying
jp_githubcrate gained alist_comments()method onIssuesHandler, backed by a newIssueCommentListBuilderand aCommentmodel. TheIssuemodel also now carries acommentsfield (the total count) which GitHub exposes on both the list and detail endpoints.Auth handling was also improved:
github_issues,github_pulls, andgithub_read_filenow use a newauth_optional()path that falls back to anonymous access when no token is configured. Read-only operations against public repos no longer require a token.Finally,
web_fetchnow detects GitHub issue and PR URLs and returns a redirect error pointing at the correct dedicated tool, rather than silently returning near-empty HTML (GitHub renders comments client-side).