From 4b33977f20c1a81f7bfa2367b9e20932cce3f3d3 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Fri, 8 Jul 2016 00:34:23 -0700 Subject: Remove the ignore-branches-from-watched-repo setting Build PRs of project members in addition to non-members. If this results in redundant builds you wish to eliminate, you're advised to refactor members' builds to a more Savage-based workflow. --- README.md | 2 -- src/main/resources/application.conf | 1 - .../scala/com/getbootstrap/savage/server/PullRequestEventHandler.scala | 1 - src/main/scala/com/getbootstrap/savage/server/Settings.scala | 1 - 4 files changed, 5 deletions(-) diff --git a/README.md b/README.md index 4342246..7fd81d4 100644 --- a/README.md +++ b/README.md @@ -81,8 +81,6 @@ savage { github-repo-to-watch = "twbs/bootstrap" // Full name of GitHub repo to push test branches to github-test-repo = "twbs/bootstrap-tests" - // Ignore pull requests whose branch is from the watched repo (and is thus from a project team member) - ignore-branches-from-watched-repo = true // Pull requests must target one of these branches in the watched repo allowed-base-branches = [ "master" ] // List of GitHub organization names whose public members Savage should trust to authorize retries of builds diff --git a/src/main/resources/application.conf b/src/main/resources/application.conf index 9af89ec..f2782b3 100644 --- a/src/main/resources/application.conf +++ b/src/main/resources/application.conf @@ -28,7 +28,6 @@ savage { travis-timeout = 2 hours github-repo-to-watch = "twbs/bootstrap" github-test-repo = "twbs-savage/bootstrap" - ignore-branches-from-watched-repo = true allowed-base-branches = [ "master", "v4-dev", "v3-dev" ] trusted-orgs = [ "twbs" ] whitelist = [ diff --git a/src/main/scala/com/getbootstrap/savage/server/PullRequestEventHandler.scala b/src/main/scala/com/getbootstrap/savage/server/PullRequestEventHandler.scala index aa207b9..c09d596 100644 --- a/src/main/scala/com/getbootstrap/savage/server/PullRequestEventHandler.scala +++ b/src/main/scala/com/getbootstrap/savage/server/PullRequestEventHandler.scala @@ -96,7 +96,6 @@ class PullRequestEventHandler( if (settings.AllowedBaseBranches.contains(destBranch)) { prHead.getRepo.repositoryId match { case None => log.error(s"Received event from GitHub about repository with unsafe name") - case Some(settings.MainRepoId) if settings.IgnoreBranchesFromMainRepo => log.info("Ignoring PR whose branch is from the main repo, per settings.") case Some(foreignRepo) => { val baseSha = bsBase.commitSha val headSha = prHead.commitSha diff --git a/src/main/scala/com/getbootstrap/savage/server/Settings.scala b/src/main/scala/com/getbootstrap/savage/server/Settings.scala index a5e2020..5a2041a 100644 --- a/src/main/scala/com/getbootstrap/savage/server/Settings.scala +++ b/src/main/scala/com/getbootstrap/savage/server/Settings.scala @@ -26,7 +26,6 @@ class SettingsImpl(config: Config) extends Extension { val Whitelist: FilePathWhitelist = new FilePathWhitelist(config.getStringList("savage.whitelist").asScala) val Watchlist: FilePathWatchlist = new FilePathWatchlist(config.getStringList("savage.file-watchlist").asScala) val BranchPrefix: String = config.getString("savage.branch-prefix") - val IgnoreBranchesFromMainRepo: Boolean = config.getBoolean("savage.ignore-branches-from-watched-repo") val AllowedBaseBranches: Set[Branch] = config.getStringList("savage.allowed-base-branches").asScala.flatMap{ Branch(_) }.toSet val TrustedOrganizations: Set[String] = config.getStringList("savage.trusted-orgs").asScala.toSet val SetCommitStatus: Boolean = config.getBoolean("savage.set-commit-status") -- cgit v1.2.3