Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Context = ParseActionEnv()
Context contains details on the workflow execution
View Source
var GitHub = NewClient()
Functions ¶
func DownloadSelectedRepositoryFiles ¶
func DownloadSelectedRepositoryFiles(c *http.Client, owner, repo, branch string, include Matcher) map[string]RepositoryFile
DownloadSelectedRepositoryFiles downloads files from a given repository and granch, given that their name matches regarding the `include` function
Types ¶
type ActionContext ¶
type ActionContext struct {
Payload WebhookPayload
EventName string
SHA string
Ref string
Workflow string
Action string
Actor string
Job string
RunAttempt int64
RunNumber int64
RunID int64
ApiUrl string
ServerUrl string
GraphqlUrl string
Issue ActionIssue
Repo ActionRepo
OutputFilePath string
StateFilePath string
ExportEnvFilePath string
}
ActionContext contains details on the workflow execution
func ParseActionEnv ¶
func ParseActionEnv() ActionContext
ParseActionEnv parses the environment and extracts the ActionContext on demand. For example in tests
type ActionIssue ¶
type ActionRepo ¶
type Matcher ¶
func MatchesOneOf ¶
MatchesOneOf returns a matcher returning whether the path matches one of the provided glob patterns
type WebhookPayload ¶
type WebhookPayload struct {
*github.PushEvent
*github.MilestoneEvent
// TODO: make this work with a simple interface user must be able to access payload.Repository for example
// *github.CheckRunEvent
// *github.CheckSuiteEvent
// *github.CommitCommentEvent
// *github.CreateEvent
// *github.DeleteEvent
// *github.DeployKeyEvent
// *github.DeploymentEvent
// *github.DeploymentStatusEvent
// *github.ForkEvent
// *github.GollumEvent
// *github.InstallationEvent
// *github.InstallationRepositoriesEvent
// *github.IssueEvent
// *github.IssueCommentEvent
// *github.IssuesEvent
// *github.LabelEvent
// *github.MarketplacePurchaseEvent
// *github.MemberEvent
// *github.MembershipEvent
// *github.MetaEvent
// *github.OrgBlockEvent
// *github.OrganizationEvent
// *github.PageBuildEvent
// *github.PingEvent
// *github.ProjectEvent
// *github.ProjectColumnEvent
// *github.ProjectCardEvent
// *github.PublicEvent
// *github.PullRequestReviewEvent
// *github.PullRequestReviewCommentEvent
// *github.ReleaseEvent
// *github.RepositoryEvent
// *github.RepositoryDispatchEvent
// *github.StarEvent
// *github.StatusEvent
// *github.TeamEvent
// *github.TeamAddEvent
// *github.UserEvent
// *github.WatchEvent
Number *int `json:"number"`
Label *github.Label `json:"label"`
Repository *github.Repository `json:"repository"`
Issue *github.Issue `json:"issue"`
PullRequest *github.PullRequest `json:"pull_request"`
Sender *github.Contributor `json:"sender"`
Action string `json:"action"`
Installation *github.Installation `json:"installation"`
}
WebhookPayload webhook payload object that triggered the workflow
Click to show internal directories.
Click to hide internal directories.