MCPcopy Create free account
hub / github.com/github/gh-aw / buildAuthorAssociationNodeForEvent

Function buildAuthorAssociationNodeForEvent

pkg/workflow/expression_builder.go:211–224  ·  view source on GitHub ↗
(eventName string)

Source from the content-addressed store, hash-verified

209}
210
211func buildAuthorAssociationNodeForEvent(eventName string) ConditionNode {
212 switch eventName {
213 case "issue_comment", "pull_request_review_comment", "discussion_comment":
214 return BuildPropertyAccess("github.event.comment.author_association")
215 case "pull_request_review":
216 return BuildPropertyAccess("github.event.review.author_association")
217 case "issues":
218 return BuildPropertyAccess("github.event.issue.author_association")
219 case "pull_request", "pull_request_target":
220 return BuildPropertyAccess("github.event.pull_request.author_association")
221 default:
222 return &ExpressionNode{Expression: "github.event.comment.author_association || github.event.review.author_association || github.event.issue.author_association || github.event.pull_request.author_association || github.event.author_association"}
223 }
224}
225
226// buildSkipAuthorAssociationsCondition returns a condition that evaluates to true when the
227// workflow should continue, and false when the run should be skipped based on:

Callers 1

Calls 1

BuildPropertyAccessFunction · 0.85

Tested by

no test coverage detected