INNER CODE UNIT · Go
validateReleaseCheckContract
minekube/gate · release_check_contract_test.go:140
func validateReleaseCheckContract(c releaseCheckContract, releaseFiles []string) error {
if c.ciWorkflowName != releaseCheckCIWorkflowName {
return fmt.Errorf("the workflow that reds every release PR is no longer named %q (got %q); the acceptance "+
"note in %s names it explicitly, so re-check the mechanism before renaming it",
releaseCheckCIWorkflowName, c.ciWorkflowName, releaseCheckCIWorkflowPath)
}
if !releaseCheckContains(c.ciPullRequestTypes, "opened") {
return fmt.Errorf("%s no longer triggers on the `opened` activity type (types %v): that is the activity "+
"type a `GITHUB_TOKEN`-created pull request hits, so without it the approval-gated run does not exist "+
"and the disposition in %s has to be re-decided (the release PR would then report nothing at all, "+
"not something green)", releaseCheckCIWorkflowPath, c.ciPullRequestTypes, releaseCheckCIWorkflowPath)
}
if c.ciHasPathsFilter {
var matched []string
for _, file := range releaseFiles {
if releaseCheckMatchesAny(c.ciPullRequestPaths, file) {