feat: add GitHub issues endpoint and create PR support - #340
Open
bkrupa wants to merge 3 commits into
Open
Conversation
- Add get_issue endpoint to fetch GitHub issues by number - Add GitHubIssue and GitHubLabel model types - Add CreatePullRequestParams and create_pull_request endpoint - Re-export new endpoints and models from crate root
- Add UNAUTHORIZED/FORBIDDEN handling to get_issue (parity with get_pull_request)
- Fix wildcard error message format in get_issue to use 'Unexpected error: HTTP {status} - {}'
- Add module-level doc comment and expand Rustdoc # Errors section in issues.rs
- Add Clone derive to GitHubIssue and GitHubLabel (consistent with other models)
- Add UNAUTHORIZED/FORBIDDEN handling to create_pull_request
- Fix create_pull_request body field: send null instead of empty string when absent
- Add test_create_pull_request_success and test_create_pull_request_validation_error
bkrupa
force-pushed
the
feature/github-endpoints
branch
from
February 26, 2026 01:00
fa0a478 to
1bdabb3
Compare
Convert BranchTableRenderer::collect_rows from a method to an associated function since self was never used in the method body, only forwarded through recursive calls.
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.
Summary
Extends the GitHub API client with new endpoint support:
issues.rsmodule for listing and querying GitHub issuescreate_pull_requestfunction to the pulls endpointFiles changed
twig-gh/src/endpoints/issues.rs(new) - Issues API endpointtwig-gh/src/endpoints/mod.rs- Module registrationtwig-gh/src/endpoints/pulls.rs- Create PR functiontwig-gh/src/lib.rs- Client method additionstwig-gh/src/models.rs- New API types