Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wenovus committed Jun 20, 2020
1 parent 672cf3e commit 152b4d4
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions post_results/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -647,13 +647,13 @@ func postResult(validatorId, version string) error {
pushToMaster = true
}

compatReportsStr, err := readFile(commonci.CompatReportValidatorsFile)
if err != nil {
return fmt.Errorf("postResult: %v", err)
}
compatValidators, compatValidatorsMap := commonci.GetValidatorAndVersionsFromString(compatReportsStr)

if !pushToMaster {
compatReportsStr, err := readFile(commonci.CompatReportValidatorsFile)
if err != nil {
return fmt.Errorf("postResult: %v", err)
}
compatValidators, compatValidatorsMap := commonci.GetValidatorAndVersionsFromString(compatReportsStr)

if validatorId == "compat-report" {
log.Printf("Processing compatibility report for %s", compatReportsStr)
return postCompatibilityReport(compatValidators)
Expand Down Expand Up @@ -700,12 +700,6 @@ func postResult(validatorId, version string) error {
log.Fatalf("error while writing output file %q: %v", outputFile, err)
return err
}

// Skip PR status reporting if validator is part of compatibility report.
if compatValidatorsMap[validatorId][version] {
log.Printf("Validator %s part of compatibility report, skipping reporting standalone PR status.", commonci.AppendVersionToName(validatorId, version))
return nil
}
}

var url, gistID string
Expand Down

0 comments on commit 152b4d4

Please sign in to comment.