Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
- Fix nil exception in packaging on https://github.com/OSGeo/gdal
- Add jenkins ci in ci tests, tested on https://github.com/jenkinsci/jenkins
- Generalize function name in code review check.
  • Loading branch information
inferno-chromium authored and naveensrinivasan committed Jan 24, 2021
1 parent 33e9189 commit 09b83b9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion checks/ci_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func isTest(s string) bool {
l := strings.ToLower(s)

// Add more patterns here!
for _, pattern := range []string{"appveyor", "buildkite", "circleci", "e2e", "github-actions", "mergeable", "test", "travis-ci"} {
for _, pattern := range []string{"appveyor", "buildkite", "circleci", "e2e", "github-actions", "jenkins", "mergeable", "test", "travis-ci"} {
if strings.Contains(l, pattern) {
return true
}
Expand Down
6 changes: 3 additions & 3 deletions checks/code_review.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func DoesCodeReview(c checker.Checker) checker.CheckResult {
IsPrReviewRequired,
GithubCodeReview,
ProwCodeReview,
GerritCodeReview,
CommitMessageHints,
)(c)
}

Expand Down Expand Up @@ -147,7 +147,7 @@ func ProwCodeReview(c checker.Checker) checker.CheckResult {
return checker.ProportionalResult(totalReviewed, totalMerged, .75)
}

func GerritCodeReview(c checker.Checker) checker.CheckResult {
func CommitMessageHints(c checker.Checker) checker.CheckResult {
commits, _, err := c.Client.Repositories.ListCommits(c.Ctx, c.Owner, c.Repo, &github.CommitsListOptions{})
if err != nil {
return checker.RetryResult(err)
Expand Down Expand Up @@ -183,6 +183,6 @@ func GerritCodeReview(c checker.Checker) checker.CheckResult {
if totalReviewed == 0 {
return checker.InconclusiveResult
}
c.Logf("gerrit code reviews found")
c.Logf("code reviews found")
return checker.ProportionalResult(totalReviewed, total, .75)
}
4 changes: 4 additions & 0 deletions checks/packaging.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ func Packaging(c checker.Checker) checker.CheckResult {
if err != nil {
return checker.RetryResult(err)
}
if fo == nil {
// path is a directory, not a file. skip.
continue
}
fc, err := fo.GetContent()
if err != nil {
return checker.RetryResult(err)
Expand Down

0 comments on commit 09b83b9

Please sign in to comment.