Documentation
¶
Index ¶
- Variables
- func CheckIfHelpComment(event interface{}) bool
- func CheckIfShowProjectsComment(event interface{}) bool
- func ConvertGithubIssueCommentEventToJobs(payload *github.IssueCommentEvent, impactedProjects []digger_config.Project, ...) ([]orchestrator.Job, bool, error)
- func ConvertGithubPullRequestEventToJobs(payload *github.PullRequestEvent, impactedProjects []digger_config.Project, ...) ([]orchestrator.Job, bool, error)
- func CreateJobsForProjects(projects []digger_config.Project, command string, event string, ...) ([]orchestrator.Job, error)
- func FindAllProjectsDependantOnImpactedProjects(impactedProjects []digger_config.Project, ...) ([]digger_config.Project, error)
- func GetRunEnvVars(defaultBranch string, prBranch string, projectName string, projectDir string) map[string]string
- func ProcessGitHubEvent(ghEvent interface{}, diggerConfig *digger_config.DiggerConfig, ...) ([]digger_config.Project, *digger_config.Project, int, error)
- func ProcessGitHubIssueCommentEvent(payload *github.IssueCommentEvent, diggerConfig *digger_config.DiggerConfig, ...) ([]digger_config.Project, map[string]digger_config.ProjectToSourceMapping, ...)
- func ProcessGitHubPullRequestEvent(payload *github.PullRequestEvent, diggerConfig *digger_config.DiggerConfig, ...) ([]digger_config.Project, map[string]digger_config.ProjectToSourceMapping, int, ...)
- func ProcessGitHubPushEvent(payload *github.PushEvent, diggerConfig *digger_config.DiggerConfig, ...) ([]digger_config.Project, map[string]digger_config.ProjectToSourceMapping, ...)
- type GithubCommentReaction
- type GithubService
- func (svc GithubService) CreateCommentReaction(id interface{}, reaction string) error
- func (svc GithubService) EditComment(prNumber int, id interface{}, comment string) error
- func (svc GithubService) GetApprovals(prNumber int) ([]string, error)
- func (svc GithubService) GetBranchName(prNumber int) (string, string, error)
- func (svc GithubService) GetChangedFiles(prNumber int) ([]string, error)
- func (svc GithubService) GetChangedFilesForCommit(owner string, repo string, commitID string) ([]string, error)
- func (svc GithubService) GetCombinedPullRequestStatus(prNumber int) (string, error)
- func (svc GithubService) GetComments(prNumber int) ([]orchestrator.Comment, error)
- func (svc GithubService) GetUserTeams(organisation string, user string) ([]string, error)
- func (svc GithubService) IsClosed(prNumber int) (bool, error)
- func (svc GithubService) IsMergeable(prNumber int) (bool, error)
- func (svc GithubService) IsMerged(prNumber int) (bool, error)
- func (svc GithubService) ListIssues() ([]*orchestrator.Issue, error)
- func (svc GithubService) MergePullRequest(prNumber int) error
- func (svc GithubService) PublishComment(prNumber int, comment string) (*orchestrator.Comment, error)
- func (svc GithubService) PublishIssue(title string, body string) (int64, error)
- func (svc GithubService) SetOutput(prNumber int, key string, value string) error
- func (svc GithubService) SetStatus(prNumber int, status string, statusContext string) error
- type MockCiService
- func (t MockCiService) CreateCommentReaction(id interface{}, reaction string) error
- func (t MockCiService) DownloadLatestPlans(prNumber int) (string, error)
- func (t MockCiService) EditComment(prNumber int, commentId interface{}, comment string) error
- func (t MockCiService) GetApprovals(prNumber int) ([]string, error)
- func (t MockCiService) GetBranchName(prNumber int) (string, string, error)
- func (t MockCiService) GetChangedFiles(prNumber int) ([]string, error)
- func (t MockCiService) GetCombinedPullRequestStatus(prNumber int) (string, error)
- func (t MockCiService) GetComments(prNumber int) ([]orchestrator.Comment, error)
- func (t MockCiService) GetUserTeams(organisation string, user string) ([]string, error)
- func (t MockCiService) IsClosed(prNumber int) (bool, error)
- func (t MockCiService) IsMergeable(prNumber int) (bool, error)
- func (t MockCiService) IsMerged(prNumber int) (bool, error)
- func (t MockCiService) ListIssues() ([]*orchestrator.Issue, error)
- func (t MockCiService) MergePullRequest(prNumber int) error
- func (t MockCiService) PublishComment(prNumber int, comment string) (*orchestrator.Comment, error)
- func (t MockCiService) PublishIssue(title string, body string) (int64, error)
- func (svc MockCiService) SetOutput(prNumber int, key string, value string) error
- func (t MockCiService) SetStatus(prNumber int, status string, statusContext string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var UnhandledMergeGroupEventError = errors.New("ignoring event: merge_group")
Functions ¶
func CheckIfHelpComment ¶
func CheckIfHelpComment(event interface{}) bool
func CheckIfShowProjectsComment ¶
func CheckIfShowProjectsComment(event interface{}) bool
func ConvertGithubIssueCommentEventToJobs ¶
func ConvertGithubIssueCommentEventToJobs(payload *github.IssueCommentEvent, impactedProjects []digger_config.Project, requestedProject *digger_config.Project, workflows map[string]digger_config.Workflow, prBranchName string) ([]orchestrator.Job, bool, error)
func ConvertGithubPullRequestEventToJobs ¶
func ConvertGithubPullRequestEventToJobs(payload *github.PullRequestEvent, impactedProjects []digger_config.Project, requestedProject *digger_config.Project, config digger_config.DiggerConfig) ([]orchestrator.Job, bool, error)
func CreateJobsForProjects ¶
func FindAllProjectsDependantOnImpactedProjects ¶
func FindAllProjectsDependantOnImpactedProjects(impactedProjects []digger_config.Project, dependencyGraph graph.Graph[string, digger_config.Project]) ([]digger_config.Project, error)
func GetRunEnvVars ¶
func ProcessGitHubEvent ¶
func ProcessGitHubEvent(ghEvent interface{}, diggerConfig *digger_config.DiggerConfig, ciService orchestrator.PullRequestService) ([]digger_config.Project, *digger_config.Project, int, error)
func ProcessGitHubIssueCommentEvent ¶
func ProcessGitHubIssueCommentEvent(payload *github.IssueCommentEvent, diggerConfig *digger_config.DiggerConfig, dependencyGraph graph.Graph[string, digger_config.Project], ciService orchestrator.PullRequestService) ([]digger_config.Project, map[string]digger_config.ProjectToSourceMapping, *digger_config.Project, int, error)
func ProcessGitHubPullRequestEvent ¶
func ProcessGitHubPullRequestEvent(payload *github.PullRequestEvent, diggerConfig *digger_config.DiggerConfig, dependencyGraph graph.Graph[string, digger_config.Project], ciService orchestrator.PullRequestService) ([]digger_config.Project, map[string]digger_config.ProjectToSourceMapping, int, error)
func ProcessGitHubPushEvent ¶
func ProcessGitHubPushEvent(payload *github.PushEvent, diggerConfig *digger_config.DiggerConfig, dependencyGraph graph.Graph[string, digger_config.Project], ciService orchestrator.PullRequestService) ([]digger_config.Project, map[string]digger_config.ProjectToSourceMapping, *digger_config.Project, int, error)
Types ¶
type GithubCommentReaction ¶
type GithubCommentReaction string
const GithubCommentConfusedReaction GithubCommentReaction = "confused"
const GithubCommentEyesReaction GithubCommentReaction = "eyes"
const GithubCommentHeartReaction GithubCommentReaction = "heart"
const GithubCommentHoorayReaction GithubCommentReaction = "hooray"
const GithubCommentLaughReaction GithubCommentReaction = "laugh"
const GithubCommentMinusOneReaction GithubCommentReaction = "-1"
const GithubCommentPlusOneReaction GithubCommentReaction = "+1"
const GithubCommentRocketReaction GithubCommentReaction = "rocket"
type GithubService ¶
func NewGitHubService ¶
func NewGitHubService(ghToken string, repoName string, owner string) GithubService
func (GithubService) CreateCommentReaction ¶
func (svc GithubService) CreateCommentReaction(id interface{}, reaction string) error
func (GithubService) EditComment ¶
func (svc GithubService) EditComment(prNumber int, id interface{}, comment string) error
func (GithubService) GetApprovals ¶
func (svc GithubService) GetApprovals(prNumber int) ([]string, error)
func (GithubService) GetBranchName ¶
func (svc GithubService) GetBranchName(prNumber int) (string, string, error)
func (GithubService) GetChangedFiles ¶
func (svc GithubService) GetChangedFiles(prNumber int) ([]string, error)
func (GithubService) GetChangedFilesForCommit ¶
func (GithubService) GetCombinedPullRequestStatus ¶
func (svc GithubService) GetCombinedPullRequestStatus(prNumber int) (string, error)
func (GithubService) GetComments ¶
func (svc GithubService) GetComments(prNumber int) ([]orchestrator.Comment, error)
func (GithubService) GetUserTeams ¶
func (svc GithubService) GetUserTeams(organisation string, user string) ([]string, error)
func (GithubService) IsMergeable ¶
func (svc GithubService) IsMergeable(prNumber int) (bool, error)
func (GithubService) ListIssues ¶
func (svc GithubService) ListIssues() ([]*orchestrator.Issue, error)
func (GithubService) MergePullRequest ¶
func (svc GithubService) MergePullRequest(prNumber int) error
func (GithubService) PublishComment ¶
func (svc GithubService) PublishComment(prNumber int, comment string) (*orchestrator.Comment, error)
func (GithubService) PublishIssue ¶
func (svc GithubService) PublishIssue(title string, body string) (int64, error)
type MockCiService ¶
type MockCiService struct {
CommentsPerPr map[int][]*orchestrator.Comment
}
func (MockCiService) CreateCommentReaction ¶
func (t MockCiService) CreateCommentReaction(id interface{}, reaction string) error
func (MockCiService) DownloadLatestPlans ¶
func (t MockCiService) DownloadLatestPlans(prNumber int) (string, error)
func (MockCiService) EditComment ¶
func (t MockCiService) EditComment(prNumber int, commentId interface{}, comment string) error
func (MockCiService) GetApprovals ¶
func (t MockCiService) GetApprovals(prNumber int) ([]string, error)
func (MockCiService) GetBranchName ¶
func (t MockCiService) GetBranchName(prNumber int) (string, string, error)
func (MockCiService) GetChangedFiles ¶
func (t MockCiService) GetChangedFiles(prNumber int) ([]string, error)
func (MockCiService) GetCombinedPullRequestStatus ¶
func (t MockCiService) GetCombinedPullRequestStatus(prNumber int) (string, error)
func (MockCiService) GetComments ¶
func (t MockCiService) GetComments(prNumber int) ([]orchestrator.Comment, error)
func (MockCiService) GetUserTeams ¶
func (t MockCiService) GetUserTeams(organisation string, user string) ([]string, error)
func (MockCiService) IsMergeable ¶
func (t MockCiService) IsMergeable(prNumber int) (bool, error)
func (MockCiService) ListIssues ¶
func (t MockCiService) ListIssues() ([]*orchestrator.Issue, error)
func (MockCiService) MergePullRequest ¶
func (t MockCiService) MergePullRequest(prNumber int) error
func (MockCiService) PublishComment ¶
func (t MockCiService) PublishComment(prNumber int, comment string) (*orchestrator.Comment, error)
func (MockCiService) PublishIssue ¶
func (t MockCiService) PublishIssue(title string, body string) (int64, error)
Click to show internal directories.
Click to hide internal directories.