feat: pull request generation
This commit is contained in:
@ -8,11 +8,17 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
ErrFileNotFound = errors.New("file not found")
|
||||
ErrFileNotFound = errors.New("file not found")
|
||||
ErrPullRequestNotFound = errors.New("pull request not found")
|
||||
)
|
||||
|
||||
type Forge interface {
|
||||
GetAllProjects(ctx context.Context) ([]*model.Project, error)
|
||||
ListProjects(ctx context.Context) ([]*model.Project, error)
|
||||
ListOpenedPullRequests(ctx context.Context, projectID string) ([]*model.PullRequest, error)
|
||||
GetPullRequestDiff(ctx context.Context, projectID string, pullRequestID string) (string, error)
|
||||
GetPullRequestTemplate(ctx context.Context, projectID string) (string, error)
|
||||
GetPullRequests(ctx context.Context, projectID string, pullRequestIDs ...string) ([]*model.PullRequest, error)
|
||||
UpdatePullRequest(ctx context.Context, projectID string, pullRequestID string, title string, body string) (string, error)
|
||||
CreateIssue(ctx context.Context, projectID string, title string, body string) (string, error)
|
||||
GetIssues(ctx context.Context, projectID string, issueIDs ...string) ([]*model.Issue, error)
|
||||
GetIssueTemplate(ctx context.Context, projectID string) (string, error)
|
||||
|
Reference in New Issue
Block a user