github

package
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 8 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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) ([]orchestrator.Job, bool, error)

func ConvertGithubPullRequestEventToJobs

func ConvertGithubPullRequestEventToJobs(payload *github.PullRequestEvent, impactedProjects []digger_config.Project, requestedProject *digger_config.Project, workflows map[string]digger_config.Workflow) ([]orchestrator.Job, bool, error)

func FindAllProjectsDependantOnImpactedProjects

func FindAllProjectsDependantOnImpactedProjects(impactedProjects []digger_config.Project, dependencyGraph graph.Graph[string, digger_config.Project]) ([]digger_config.Project, error)

func ProcessGitHubEvent

func ProcessGitHubEvent(ghEvent interface{}, diggerConfig *digger_config.DiggerConfig, ciService orchestrator.PullRequestService) ([]digger_config.Project, *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, int, error)

Types

type GithubService

type GithubService struct {
	Client   *github.Client
	RepoName string
	Owner    string
}

func NewGitHubService

func NewGitHubService(ghToken string, repoName string, owner string) GithubService

func (*GithubService) EditComment

func (svc *GithubService) EditComment(prNumber int, id interface{}, comment string) error

func (*GithubService) GetBranchName

func (svc *GithubService) GetBranchName(prNumber int) (string, error)

func (*GithubService) GetChangedFiles

func (svc *GithubService) GetChangedFiles(prNumber int) ([]string, error)

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

func (svc *GithubService) IsClosed(prNumber int) (bool, error)

func (*GithubService) IsMergeable

func (svc *GithubService) IsMergeable(prNumber int) (bool, error)

func (*GithubService) IsMerged

func (svc *GithubService) IsMerged(prNumber int) (bool, error)

func (*GithubService) MergePullRequest

func (svc *GithubService) MergePullRequest(prNumber int) error

func (*GithubService) PublishComment

func (svc *GithubService) PublishComment(prNumber int, comment string) error

func (*GithubService) SetStatus

func (svc *GithubService) SetStatus(prNumber int, status string, statusContext string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL