Skip to content

feat: add GitHub issues endpoint and create PR support - #340

Open
bkrupa wants to merge 3 commits into
mainfrom
feature/github-endpoints
Open

feat: add GitHub issues endpoint and create PR support#340
bkrupa wants to merge 3 commits into
mainfrom
feature/github-endpoints

Conversation

@bkrupa

@bkrupa bkrupa commented Feb 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Extends the GitHub API client with new endpoint support:

  1. Issues endpoint - New issues.rs module for listing and querying GitHub issues
  2. Create PR - Adds create_pull_request function to the pulls endpoint
  3. Model updates - New request/response types for issue and PR creation

Files changed

  • twig-gh/src/endpoints/issues.rs (new) - Issues API endpoint
  • twig-gh/src/endpoints/mod.rs - Module registration
  • twig-gh/src/endpoints/pulls.rs - Create PR function
  • twig-gh/src/lib.rs - Client method additions
  • twig-gh/src/models.rs - New API types

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @bkrupa, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

- 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
bkrupa force-pushed the feature/github-endpoints branch from fa0a478 to 1bdabb3 Compare February 26, 2026 01:00
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant