feat: pull request generation

This commit is contained in:
2025-03-06 22:47:02 +01:00
parent 4d6459fae5
commit 367f9f9e70
28 changed files with 1918 additions and 181 deletions

View File

@ -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)