(eventName string)
| 209 | } |
| 210 | |
| 211 | func 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: |
no test coverage detected