Files
github__gh-stack/internal/github/client_interface.go
T
Sameen Karim 13330406ef open PRs as draft by default (#76)
* open prs as draft by default

* apply suggested docs updates from code review

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-11 11:09:30 -04:00

22 lines
837 B
Go

package github
// ClientOps defines the interface for GitHub API operations.
// The concrete Client type satisfies this interface.
// Tests can substitute a MockClient.
type ClientOps interface {
FindPRForBranch(branch string) (*PullRequest, error)
FindAnyPRForBranch(branch string) (*PullRequest, error)
FindPRByNumber(number int) (*PullRequest, error)
FindPRDetailsForBranch(branch string) (*PRDetails, error)
CreatePR(base, head, title, body string, draft bool) (*PullRequest, error)
UpdatePRBase(number int, base string) error
MarkPRReadyForReview(prID string) error
ListStacks() ([]RemoteStack, error)
CreateStack(prNumbers []int) (int, error)
UpdateStack(stackID string, prNumbers []int) error
DeleteStack(stackID string) error
}
// Compile-time check that Client satisfies ClientOps.
var _ ClientOps = (*Client)(nil)