BuildNotFromFork creates a condition to check that a pull request is not from a forked repository This prevents the job from running on forked PRs where write permissions are not available Uses repository ID comparison instead of full name for more reliable matching
()
| 336 | // This prevents the job from running on forked PRs where write permissions are not available |
| 337 | // Uses repository ID comparison instead of full name for more reliable matching |
| 338 | func BuildNotFromFork() *ComparisonNode { |
| 339 | return BuildEquals( |
| 340 | BuildPropertyAccess("github.event.pull_request.head.repo.id"), |
| 341 | BuildPropertyAccess("github.repository_id"), |
| 342 | ) |
| 343 | } |
| 344 | |
| 345 | func BuildSafeOutputType(outputType string) ConditionNode { |
| 346 | expressionBuilderLog.Printf("Building safe-output condition for output type: %s", outputType) |