github.com/diggerhq/digger/libs@v0.0.0-20240604170430-9d61cdf01cc5/orchestrator/ci.go (about) 1 package orchestrator 2 3 type PullRequestService interface { 4 GetChangedFiles(prNumber int) ([]string, error) 5 PublishComment(prNumber int, comment string) (*Comment, error) 6 ListIssues() ([]*Issue, error) 7 PublishIssue(title string, body string) (int64, error) 8 EditComment(prNumber int, id interface{}, comment string) error 9 CreateCommentReaction(id interface{}, reaction string) error 10 GetComments(prNumber int) ([]Comment, error) 11 GetApprovals(prNumber int) ([]string, error) 12 // SetStatus set status of specified pull/merge request, status could be: "pending", "failure", "success" 13 SetStatus(prNumber int, status string, statusContext string) error 14 GetCombinedPullRequestStatus(prNumber int) (string, error) 15 MergePullRequest(prNumber int) error 16 // IsMergeable is still open and ready to be merged 17 IsMergeable(prNumber int) (bool, error) 18 // IsMerged merged and closed 19 IsMerged(prNumber int) (bool, error) 20 // IsClosed closed without merging 21 IsClosed(prNumber int) (bool, error) 22 GetBranchName(prNumber int) (string, string, error) 23 SetOutput(prNumber int, key string, value string) error 24 } 25 26 type OrgService interface { 27 GetUserTeams(organisation string, user string) ([]string, error) 28 } 29 30 type Issue struct { 31 ID int64 32 Title string 33 Body string 34 } 35 36 type Comment struct { 37 Id interface{} 38 Body *string 39 Url string 40 } 41 42 type PullRequestComment interface { 43 GetUrl() (string, error) 44 }