Modify formatting to columnize

Turns out I do care about formatting a little.  We have a lot of builders and chained methods.
I think it is easier to follow long chains when lined up veritcally.
This commit is contained in:
Liam Newman
2019-11-15 15:18:07 -08:00
parent f262bf7cdb
commit da11702f68
61 changed files with 710 additions and 362 deletions

View File

@@ -14,8 +14,10 @@ import static org.kohsuke.github.Previews.*;
*
* @author Yusuke Kokubo
*/
@SuppressFBWarnings(value = { "UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD", "UWF_UNWRITTEN_FIELD", "NP_UNWRITTEN_FIELD",
"URF_UNREAD_FIELD" }, justification = "JSON API")
@SuppressFBWarnings(
value = { "UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD", "UWF_UNWRITTEN_FIELD", "NP_UNWRITTEN_FIELD",
"URF_UNREAD_FIELD" },
justification = "JSON API")
public class GHBranch {
private GitHub root;
private GHRepository owner;
@@ -141,13 +143,15 @@ public class GHBranch {
@Deprecated
public void enableProtection(EnforcementLevel level, Collection<String> contexts) throws IOException {
switch (level) {
case OFF:
disableProtection();
break;
case NON_ADMINS:
case EVERYONE:
enableProtection().addRequiredChecks(contexts).includeAdmins(level == EnforcementLevel.EVERYONE).enable();
break;
case OFF :
disableProtection();
break;
case NON_ADMINS :
case EVERYONE :
enableProtection().addRequiredChecks(contexts)
.includeAdmins(level == EnforcementLevel.EVERYONE)
.enable();
break;
}
}