From bcff70f53c32be1e83af85dff38c458d0f05af83 Mon Sep 17 00:00:00 2001
From: Nick Griffiths
Date: Wed, 29 Jan 2020 17:15:43 +0000
Subject: [PATCH 01/49] [FIXED JENKINS-51519] Ignore archived repos. When
"Exclude archived repositories" is added to the list of behaviours in the
settings, repositories that have been archived in GitHub will not be
processed. This is achieved using `witness.record(repo.getName(), false)`.
---
.../ExcludeArchivedTrait.java | 54 +++++
.../GitHubSCMNavigator.java | 60 +++++-
.../GitHubSCMNavigatorContext.java | 19 ++
.../ExcludeArchivedTrait/config.jelly | 5 +
.../ExcludeArchivedTrait/help.html | 3 +
.../github_branch_source/Messages.properties | 1 +
.../GitHubSCMNavigatorTest.java | 169 +++++++++++++++-
.../__files/body-cloudbeers-repos-v3FBW.json | 106 ++++++++++
.../body-cloudbeers-yolo-archived.json | 110 ++++++++++
...body-orgs-cloudbeers-teams-repo-gOYDg.json | 94 +++++++++
.../api/__files/body-rate_limit-B5BGx.json | 29 +++
.../__files/body-stephenc-yolo-archived.json | 89 ++++++++
.../api/__files/body-user-repos-O8W78.json | 185 +++++++++++++++++
.../__files/body-users-stephenc-repos.json | 190 ++++++++++++++++++
.../mapping-cloudbeers-yolo-archived.json | 34 ++++
...> mapping-orgs-cloudbeers-repo-gUIDg.json} | 0
.../mappings/mapping-rate_limit-B5BGx.json | 31 +++
.../mapping-stephenc-yolo-archived.json | 34 ++++
.../api/mappings/mapping-user-JRfTU.json | 34 ++++
.../mappings/mapping-user-repos-O8W78.json | 35 ++++
.../mapping-users-stephenc-repos.json | 34 ++++
21 files changed, 1299 insertions(+), 17 deletions(-)
create mode 100644 src/main/java/org/jenkinsci/plugins/github_branch_source/ExcludeArchivedTrait.java
create mode 100644 src/main/resources/org/jenkinsci/plugins/github_branch_source/ExcludeArchivedTrait/config.jelly
create mode 100644 src/main/resources/org/jenkinsci/plugins/github_branch_source/ExcludeArchivedTrait/help.html
create mode 100644 src/test/resources/api/__files/body-cloudbeers-yolo-archived.json
create mode 100644 src/test/resources/api/__files/body-rate_limit-B5BGx.json
create mode 100644 src/test/resources/api/__files/body-stephenc-yolo-archived.json
create mode 100644 src/test/resources/api/__files/body-user-repos-O8W78.json
create mode 100644 src/test/resources/api/__files/body-users-stephenc-repos.json
create mode 100644 src/test/resources/api/mappings/mapping-cloudbeers-yolo-archived.json
rename src/test/resources/api/mappings/{mapping-body-orgs-cloudbeers-repo-gUIDg.json => mapping-orgs-cloudbeers-repo-gUIDg.json} (100%)
create mode 100644 src/test/resources/api/mappings/mapping-rate_limit-B5BGx.json
create mode 100644 src/test/resources/api/mappings/mapping-stephenc-yolo-archived.json
create mode 100644 src/test/resources/api/mappings/mapping-user-JRfTU.json
create mode 100644 src/test/resources/api/mappings/mapping-user-repos-O8W78.json
create mode 100644 src/test/resources/api/mappings/mapping-users-stephenc-repos.json
diff --git a/src/main/java/org/jenkinsci/plugins/github_branch_source/ExcludeArchivedTrait.java b/src/main/java/org/jenkinsci/plugins/github_branch_source/ExcludeArchivedTrait.java
new file mode 100644
index 000000000..af65d5013
--- /dev/null
+++ b/src/main/java/org/jenkinsci/plugins/github_branch_source/ExcludeArchivedTrait.java
@@ -0,0 +1,54 @@
+package org.jenkinsci.plugins.github_branch_source;
+
+import hudson.Extension;
+import jenkins.scm.api.trait.SCMNavigatorContext;
+import jenkins.scm.api.trait.SCMNavigatorTrait;
+import jenkins.scm.api.trait.SCMNavigatorTraitDescriptor;
+import jenkins.scm.impl.trait.Selection;
+import org.jenkinsci.Symbol;
+import org.kohsuke.stapler.DataBoundConstructor;
+
+import javax.annotation.Nonnull;
+
+/**
+ * A {@link Selection} trait that will restrict the discovery of repositories that have been archived.
+ */
+public class ExcludeArchivedTrait extends SCMNavigatorTrait {
+
+ /**
+ * Constructor for stapler.
+ */
+ @DataBoundConstructor
+ public ExcludeArchivedTrait() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void decorateContext(SCMNavigatorContext, ?> context) {
+ super.decorateContext(context);
+ GitHubSCMNavigatorContext ctx = (GitHubSCMNavigatorContext) context;
+ ctx.setExcludeArchived(true);
+ }
+
+ /**
+ * Excluded archived repositories filter
+ */
+ @Symbol("archivedRepositoriesFilter")
+ @Extension
+ @Selection
+ public static class DescriptorImpl extends SCMNavigatorTraitDescriptor {
+
+ @Override
+ public Class extends SCMNavigatorContext> getContextClass() {
+ return GitHubSCMNavigatorContext.class;
+ }
+
+ @Nonnull
+ @Override
+ public String getDisplayName() {
+ return Messages.ExcludeArchivedTrait_displayName();
+ }
+ }
+}
diff --git a/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java b/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java
index ac67fd08c..af4a41d1d 100644
--- a/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java
+++ b/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java
@@ -951,7 +951,14 @@ public void visitSources(SCMSourceObserver observer) throws IOException, Interru
if (!repo.getOwnerName().equals(repoOwner)) {
continue; // ignore repos in other orgs when using GHMyself
}
- if (request.process(repo.getName(), sourceFactory, null, witness)) {
+
+ if (repo.isArchived() && gitHubSCMNavigatorContext.isExcludeArchived()) {
+ witness.record(repo.getName(), false);
+ listener.getLogger()
+ .println(GitHubConsoleNote.create(System.currentTimeMillis(), String.format(
+ "Skipping repository %s because it is archived", repo.getName())));
+
+ } else if (request.process(repo.getName(), sourceFactory, null, witness)) {
listener.getLogger()
.println(GitHubConsoleNote.create(System.currentTimeMillis(), String.format(
"%d repositories were processed (query completed)", witness.getCount()
@@ -979,7 +986,14 @@ public void visitSources(SCMSourceObserver observer) throws IOException, Interru
}
for (GHRepository repo : repositories) {
Connector.checkApiRateLimit(listener, github);
- if (request.process(repo.getName(), sourceFactory, null, witness)) {
+
+ if (repo.isArchived() && gitHubSCMNavigatorContext.isExcludeArchived()) {
+ witness.record(repo.getName(), false);
+ listener.getLogger()
+ .println(GitHubConsoleNote.create(System.currentTimeMillis(), String.format(
+ "Skipping repository %s because it is archived", repo.getName())));
+
+ } else if (request.process(repo.getName(), sourceFactory, null, witness)) {
listener.getLogger().println(GitHubConsoleNote.create(System.currentTimeMillis(), String.format(
"%d repositories were processed (query completed)", witness.getCount()
)));
@@ -1003,7 +1017,14 @@ public void visitSources(SCMSourceObserver observer) throws IOException, Interru
Connector.checkApiRateLimit(listener, github);
for (GHRepository repo : user.listRepositories(100)) {
Connector.checkApiRateLimit(listener, github);
- if (request.process(repo.getName(), sourceFactory, null, witness)) {
+
+ if (repo.isArchived() && gitHubSCMNavigatorContext.isExcludeArchived()) {
+ witness.record(repo.getName(), false);
+ listener.getLogger()
+ .println(GitHubConsoleNote.create(System.currentTimeMillis(), String.format(
+ "Skipping repository %s because it is archived", repo.getName())));
+
+ } else if (request.process(repo.getName(), sourceFactory, null, witness)) {
listener.getLogger()
.println(GitHubConsoleNote.create(System.currentTimeMillis(), String.format(
"%d repositories were processed (query completed)", witness.getCount()
@@ -1072,9 +1093,9 @@ public void visitSource(String sourceName, SCMSourceObserver observer)
throw new AbortException(message);
}
- GitHubSCMNavigatorRequest request = new GitHubSCMNavigatorContext()
- .withTraits(traits)
- .newRequest(this, observer);
+ GitHubSCMNavigatorContext gitHubSCMNavigatorContext = new GitHubSCMNavigatorContext().withTraits(traits);
+ GitHubSCMNavigatorRequest request = gitHubSCMNavigatorContext.newRequest(this, observer);
+
try {
SourceFactory sourceFactory = new SourceFactory(request);
WitnessImpl witness = new WitnessImpl(listener);
@@ -1094,7 +1115,14 @@ public void visitSource(String sourceName, SCMSourceObserver observer)
listener.getLogger().format("Looking up %s repository of myself %s%n%n", sourceName, repoOwner);
GHRepository repo = myself.getRepository(sourceName);
if (repo != null && repo.getOwnerName().equals(repoOwner)) {
- if (request.process(repo.getName(), sourceFactory, null, witness)) {
+
+ if (repo.isArchived() && gitHubSCMNavigatorContext.isExcludeArchived()) {
+ witness.record(repo.getName(), false);
+ listener.getLogger()
+ .println(GitHubConsoleNote.create(System.currentTimeMillis(), String.format(
+ "Skipping repository %s because it is archived", repo.getName())));
+
+ } else if (request.process(repo.getName(), sourceFactory, null, witness)) {
listener.getLogger()
.println(GitHubConsoleNote.create(System.currentTimeMillis(), String.format(
"%d repositories were processed (query completed)", witness.getCount()
@@ -1117,7 +1145,14 @@ public void visitSource(String sourceName, SCMSourceObserver observer)
.format("Looking up %s repository of organization %s%n%n", sourceName, repoOwner);
GHRepository repo = org.getRepository(sourceName);
if (repo != null) {
- if (request.process(repo.getName(), sourceFactory, null, witness)) {
+
+ if (repo.isArchived() && gitHubSCMNavigatorContext.isExcludeArchived()) {
+ witness.record(repo.getName(), false);
+ listener.getLogger()
+ .println(GitHubConsoleNote.create(System.currentTimeMillis(), String.format(
+ "Skipping repository %s because it is archived", repo.getName())));
+
+ } else if (request.process(repo.getName(), sourceFactory, null, witness)) {
listener.getLogger()
.println(GitHubConsoleNote.create(System.currentTimeMillis(), String.format(
"%d repositories were processed (query completed)", witness.getCount()
@@ -1142,7 +1177,14 @@ public void visitSource(String sourceName, SCMSourceObserver observer)
listener.getLogger().format("Looking up %s repository of user %s%n%n", sourceName, repoOwner);
GHRepository repo = user.getRepository(sourceName);
if (repo != null) {
- if (request.process(repo.getName(), sourceFactory, null, witness)) {
+
+ if (repo.isArchived() && gitHubSCMNavigatorContext.isExcludeArchived()) {
+ witness.record(repo.getName(), false);
+ listener.getLogger()
+ .println(GitHubConsoleNote.create(System.currentTimeMillis(), String.format(
+ "Skipping repository %s because it is archived", repo.getName())));
+
+ } else if (request.process(repo.getName(), sourceFactory, null, witness)) {
listener.getLogger()
.println(GitHubConsoleNote.create(System.currentTimeMillis(), String.format(
"%d repositories were processed (query completed)", witness.getCount()
diff --git a/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigatorContext.java b/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigatorContext.java
index 923c96e08..a864e7523 100644
--- a/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigatorContext.java
+++ b/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigatorContext.java
@@ -40,6 +40,11 @@ public class GitHubSCMNavigatorContext extends SCMNavigatorContext
+
+
diff --git a/src/main/resources/org/jenkinsci/plugins/github_branch_source/ExcludeArchivedTrait/help.html b/src/main/resources/org/jenkinsci/plugins/github_branch_source/ExcludeArchivedTrait/help.html
new file mode 100644
index 000000000..ed55a6299
--- /dev/null
+++ b/src/main/resources/org/jenkinsci/plugins/github_branch_source/ExcludeArchivedTrait/help.html
@@ -0,0 +1,3 @@
+
+ Exclude GitHub repositories that have been archived. If set, no jobs will be created for archived repositories.
+
diff --git a/src/main/resources/org/jenkinsci/plugins/github_branch_source/Messages.properties b/src/main/resources/org/jenkinsci/plugins/github_branch_source/Messages.properties
index 434470ca5..447b5165e 100644
--- a/src/main/resources/org/jenkinsci/plugins/github_branch_source/Messages.properties
+++ b/src/main/resources/org/jenkinsci/plugins/github_branch_source/Messages.properties
@@ -62,6 +62,7 @@ SSHCheckoutTrait.missingCredentials=The currently configured credentials cannot
SSHCheckoutTrait.useAgentKey=- use build agent''s key -
TagDiscoveryTrait.authorityDisplayName=Trust origin tags
TagDiscoveryTrait.displayName=Discover tags
+ExcludeArchivedTrait.displayName=Exclude archived repositories
GitHubSCMNavigator.general=General
GitHubSCMNavigator.withinRepository=Within repository
diff --git a/src/test/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigatorTest.java b/src/test/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigatorTest.java
index f8cfcf702..522ae6a28 100644
--- a/src/test/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigatorTest.java
+++ b/src/test/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigatorTest.java
@@ -25,6 +25,12 @@
package org.jenkinsci.plugins.github_branch_source;
+import com.cloudbees.plugins.credentials.Credentials;
+import com.cloudbees.plugins.credentials.CredentialsScope;
+import com.cloudbees.plugins.credentials.SystemCredentialsProvider;
+import com.cloudbees.plugins.credentials.domains.Domain;
+import com.cloudbees.plugins.credentials.impl.BaseStandardCredentials;
+import com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl;
import com.github.tomakehurst.wiremock.common.FileSource;
import com.github.tomakehurst.wiremock.common.SingleRootFileSource;
import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
@@ -33,7 +39,6 @@
import com.github.tomakehurst.wiremock.http.Request;
import com.github.tomakehurst.wiremock.http.Response;
import com.github.tomakehurst.wiremock.junit.WireMockRule;
-import com.google.common.collect.Sets;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;
import hudson.model.Action;
@@ -76,6 +81,7 @@
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
import static com.github.tomakehurst.wiremock.client.WireMock.get;
import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
+import static org.hamcrest.Matchers.*;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertEquals;
@@ -130,10 +136,13 @@ public String getName() {
@Mock
private SCMSourceOwner scmSourceOwner;
+ private BaseStandardCredentials credentials = new UsernamePasswordCredentialsImpl(
+ CredentialsScope.GLOBAL, "authenticated-user", null, "git-user", "git-secret");
+
private GitHubSCMNavigator navigator;
@Before
- public void prepareMockGitHub() throws Exception {
+ public void prepareMockGitHub() {
new File("src/test/resources/api/mappings").mkdirs();
new File("src/test/resources/api/__files").mkdirs();
new File("src/test/resources/raw/mappings").mkdirs();
@@ -146,7 +155,21 @@ public void prepareMockGitHub() throws Exception {
get(urlMatching(".*")).atPriority(10).willReturn(aResponse().proxiedFrom("https://api.github.com/")));
githubRaw.stubFor(get(urlMatching(".*")).atPriority(10)
.willReturn(aResponse().proxiedFrom("https://raw.githubusercontent.com/")));
- navigator = new GitHubSCMNavigator("http://localhost:" + githubApi.port(), "cloudbeers", null, null);
+
+ setCredentials(Collections.emptyList());
+ navigator = navigatorForRepoOwner("cloudbeers", null);
+ }
+
+ private GitHubSCMNavigator navigatorForRepoOwner(String repoOwner, @Nullable String credentialsId) {
+ GitHubSCMNavigator navigator = new GitHubSCMNavigator(repoOwner);
+ navigator.setApiUri("http://localhost:" + githubApi.port());
+ navigator.setCredentialsId(credentialsId);
+ return navigator;
+ }
+
+ private void setCredentials(List credentials) {
+ SystemCredentialsProvider.getInstance().setDomainCredentialsMap(
+ Collections.singletonMap(Domain.global(), credentials));
}
@Test
@@ -156,7 +179,7 @@ public void fetchSmokes() throws Exception {
navigator.visitSources(SCMSourceObserver.filter(observer, "yolo"));
- assertThat(projectNames, Matchers.contains("yolo"));
+ assertThat(projectNames, contains("yolo"));
}
@Test
@@ -169,17 +192,147 @@ public void fetchReposFromTeamSlug() throws Exception {
navigator.setTraits(traits);
navigator.visitSources(SCMSourceObserver.filter(observer, "Hello-World", "github-branch-source-plugin"));
- assertEquals(projectNames, Sets.newHashSet("Hello-World", "github-branch-source-plugin"));
+ assertThat(projectNames, containsInAnyOrder("Hello-World", "github-branch-source-plugin"));
}
@Test
- public void fetchReposWithOrg() throws Exception {
+ public void fetchOneRepo_BelongingToAuthenticatedUser() throws Exception {
+ setCredentials(Collections.singletonList(credentials));
+ navigator = navigatorForRepoOwner("stephenc", credentials.getId());
final Set projectNames = new HashSet<>();
final SCMSourceObserver observer = getObserver(projectNames);
- navigator.visitSources(SCMSourceObserver.filter(observer, "Hello-World", "github-branch-source-plugin"));
+ navigator.visitSources(SCMSourceObserver.filter(observer, "yolo-archived"));
+
+ assertThat(projectNames, containsInAnyOrder("yolo-archived"));
+ }
+
+ @Test
+ public void fetchOneRepo_BelongingToAuthenticatedUser_ExcludingArchived() throws Exception {
+ setCredentials(Collections.singletonList(credentials));
+ navigator = navigatorForRepoOwner("stephenc", credentials.getId());
+ navigator.setTraits(Collections.singletonList(new ExcludeArchivedTrait()));
+ final Set projectNames = new HashSet<>();
+ final SCMSourceObserver observer = getObserver(projectNames);
+
+ navigator.visitSources(SCMSourceObserver.filter(observer, "yolo-archived"));
+
+ assertThat(projectNames, empty());
+ }
+
+ @Test
+ public void fetchOneRepo_BelongingToOrg() throws Exception {
+ final Set projectNames = new HashSet<>();
+ final SCMSourceObserver observer = getObserver(projectNames);
+
+ navigator.visitSources(SCMSourceObserver.filter(observer, "yolo-archived"));
+
+ assertThat(projectNames, containsInAnyOrder("yolo-archived"));
+ }
+
+ @Test
+ public void fetchOneRepo_BelongingToOrg_ExcludingArchived() throws Exception {
+ navigator.setTraits(Collections.singletonList(new ExcludeArchivedTrait()));
+ final Set projectNames = new HashSet<>();
+ final SCMSourceObserver observer = getObserver(projectNames);
+
+ navigator.visitSources(SCMSourceObserver.filter(observer, "yolo-archived"));
+
+ assertThat(projectNames, empty());
+ }
+
+ @Test
+ public void fetchOneRepo_BelongingToUser() throws Exception {
+ navigator = navigatorForRepoOwner("stephenc", null);
+ final Set projectNames = new HashSet<>();
+ final SCMSourceObserver observer = getObserver(projectNames);
+
+ navigator.visitSources(SCMSourceObserver.filter(observer, "yolo-archived"));
+
+ assertThat(projectNames, containsInAnyOrder("yolo-archived"));
+ }
+
+ @Test
+ public void fetchOneRepo_BelongingToUser_ExcludingArchived() throws Exception {
+ navigator = navigatorForRepoOwner("stephenc", null);
+ navigator.setTraits(Collections.singletonList(new ExcludeArchivedTrait()));
+ final Set projectNames = new HashSet<>();
+ final SCMSourceObserver observer = getObserver(projectNames);
+
+ navigator.visitSources(SCMSourceObserver.filter(observer, "yolo-archived"));
+
+ assertThat(projectNames, empty());
+ }
+
+ @Test
+ public void fetchRepos_BelongingToAuthenticatedUser() throws Exception {
+ setCredentials(Collections.singletonList(credentials));
+ navigator = navigatorForRepoOwner("stephenc", credentials.getId());
+ final Set projectNames = new HashSet<>();
+ final SCMSourceObserver observer = getObserver(projectNames);
+
+ navigator.visitSources(observer);
+
+ assertThat(projectNames, containsInAnyOrder("yolo", "yolo-archived"));
+ }
+
+ @Test
+ public void fetchRepos_BelongingToAuthenticatedUser_ExcludingArchived() throws Exception {
+ setCredentials(Collections.singletonList(credentials));
+ navigator = navigatorForRepoOwner("stephenc", credentials.getId());
+ navigator.setTraits(Collections.singletonList(new ExcludeArchivedTrait()));
+ final Set projectNames = new HashSet<>();
+ final SCMSourceObserver observer = getObserver(projectNames);
+
+ navigator.visitSources(observer);
+
+ assertThat(projectNames, containsInAnyOrder("yolo"));
+ }
+
+ @Test
+ public void fetchRepos_BelongingToOrg() throws Exception {
+ final Set projectNames = new HashSet<>();
+ final SCMSourceObserver observer = getObserver(projectNames);
+
+ navigator.visitSources(
+ SCMSourceObserver.filter(observer, "Hello-World", "github-branch-source-plugin", "yolo-archived"));
+
+ assertThat(projectNames, containsInAnyOrder("Hello-World", "github-branch-source-plugin", "yolo-archived"));
+ }
+
+ @Test
+ public void fetchRepos_BelongingToOrg_ExcludingArchived() throws Exception {
+ navigator.setTraits(Collections.singletonList(new ExcludeArchivedTrait()));
+ final Set projectNames = new HashSet<>();
+ final SCMSourceObserver observer = getObserver(projectNames);
+
+ navigator.visitSources(
+ SCMSourceObserver.filter(observer, "Hello-World", "github-branch-source-plugin", "yolo-archived"));
+
+ assertThat(projectNames, containsInAnyOrder("Hello-World", "github-branch-source-plugin"));
+ }
+
+ @Test
+ public void fetchRepos_BelongingToUser() throws Exception {
+ navigator = navigatorForRepoOwner("stephenc", null);
+ final Set projectNames = new HashSet<>();
+ final SCMSourceObserver observer = getObserver(projectNames);
+
+ navigator.visitSources(observer);
+
+ assertThat(projectNames, containsInAnyOrder("yolo", "yolo-archived"));
+ }
+
+ @Test
+ public void fetchRepos_BelongingToUser_ExcludingArchived() throws Exception {
+ navigator = navigatorForRepoOwner("stephenc", null);
+ navigator.setTraits(Collections.singletonList(new ExcludeArchivedTrait()));
+ final Set projectNames = new HashSet<>();
+ final SCMSourceObserver observer = getObserver(projectNames);
+
+ navigator.visitSources(observer);
- assertEquals(projectNames, Sets.newHashSet("Hello-World", "github-branch-source-plugin"));
+ assertThat(projectNames, containsInAnyOrder("yolo"));
}
@Test
diff --git a/src/test/resources/api/__files/body-cloudbeers-repos-v3FBW.json b/src/test/resources/api/__files/body-cloudbeers-repos-v3FBW.json
index f5e4bc9af..60f760b38 100644
--- a/src/test/resources/api/__files/body-cloudbeers-repos-v3FBW.json
+++ b/src/test/resources/api/__files/body-cloudbeers-repos-v3FBW.json
@@ -76,6 +76,7 @@
"language": "Java",
"has_issues": true,
"has_downloads": true,
+ "archived": false,
"has_wiki": true,
"has_pages": false,
"forks_count": 1,
@@ -168,6 +169,7 @@
"language": "Java",
"has_issues": true,
"has_downloads": true,
+ "archived": false,
"has_wiki": true,
"has_pages": false,
"forks_count": 0,
@@ -260,6 +262,7 @@
"language": "HTML",
"has_issues": true,
"has_downloads": true,
+ "archived": false,
"has_wiki": true,
"has_pages": true,
"forks_count": 0,
@@ -352,6 +355,7 @@
"language": null,
"has_issues": true,
"has_downloads": true,
+ "archived": false,
"has_wiki": true,
"has_pages": false,
"forks_count": 0,
@@ -444,6 +448,7 @@
"language": "Go",
"has_issues": true,
"has_downloads": true,
+ "archived": false,
"has_wiki": true,
"has_pages": false,
"forks_count": 87,
@@ -536,6 +541,7 @@
"language": "Groovy",
"has_issues": true,
"has_downloads": true,
+ "archived": false,
"has_wiki": true,
"has_pages": false,
"forks_count": 10,
@@ -628,6 +634,100 @@
"language": null,
"has_issues": true,
"has_downloads": true,
+ "archived": false,
+ "has_wiki": true,
+ "has_pages": false,
+ "forks_count": 3,
+ "mirror_url": null,
+ "open_issues_count": 1,
+ "forks": 3,
+ "open_issues": 1,
+ "watchers": 0,
+ "default_branch": "master",
+ "permissions": {
+ "admin": false,
+ "push": false,
+ "pull": true
+ }
+}, {
+ "id": 43041241,
+ "name": "yolo-archived",
+ "full_name": "cloudbeers/yolo-archived",
+ "owner": {
+ "login": "cloudbeers",
+ "id": 4181899,
+ "avatar_url": "https://avatars.githubusercontent.com/u/4181899?v=3",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/cloudbeers",
+ "html_url": "https://github.com/cloudbeers",
+ "followers_url": "https://api.github.com/users/cloudbeers/followers",
+ "following_url": "https://api.github.com/users/cloudbeers/following{/other_user}",
+ "gists_url": "https://api.github.com/users/cloudbeers/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/cloudbeers/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/cloudbeers/subscriptions",
+ "organizations_url": "https://api.github.com/users/cloudbeers/orgs",
+ "repos_url": "https://api.github.com/users/cloudbeers/repos",
+ "events_url": "https://api.github.com/users/cloudbeers/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/cloudbeers/received_events",
+ "type": "Organization",
+ "site_admin": false
+ },
+ "private": false,
+ "html_url": "https://github.com/cloudbeers/yolo-archived",
+ "description": "It lived once, and then it was archived",
+ "fork": false,
+ "url": "https://api.github.com/repos/cloudbeers/yolo-archived",
+ "forks_url": "https://api.github.com/repos/cloudbeers/yolo-archived/forks",
+ "keys_url": "https://api.github.com/repos/cloudbeers/yolo-archived/keys{/key_id}",
+ "collaborators_url": "https://api.github.com/repos/cloudbeers/yolo-archived/collaborators{/collaborator}",
+ "teams_url": "https://api.github.com/repos/cloudbeers/yolo-archived/teams",
+ "hooks_url": "https://api.github.com/repos/cloudbeers/yolo-archived/hooks",
+ "issue_events_url": "https://api.github.com/repos/cloudbeers/yolo-archived/issues/events{/number}",
+ "events_url": "https://api.github.com/repos/cloudbeers/yolo-archived/events",
+ "assignees_url": "https://api.github.com/repos/cloudbeers/yolo-archived/assignees{/user}",
+ "branches_url": "https://api.github.com/repos/cloudbeers/yolo-archived/branches{/branch}",
+ "tags_url": "https://api.github.com/repos/cloudbeers/yolo-archived/tags",
+ "blobs_url": "https://api.github.com/repos/cloudbeers/yolo-archived/git/blobs{/sha}",
+ "git_tags_url": "https://api.github.com/repos/cloudbeers/yolo-archived/git/tags{/sha}",
+ "git_refs_url": "https://api.github.com/repos/cloudbeers/yolo-archived/git/refs{/sha}",
+ "trees_url": "https://api.github.com/repos/cloudbeers/yolo-archived/git/trees{/sha}",
+ "statuses_url": "https://api.github.com/repos/cloudbeers/yolo-archived/statuses/{sha}",
+ "languages_url": "https://api.github.com/repos/cloudbeers/yolo-archived/languages",
+ "stargazers_url": "https://api.github.com/repos/cloudbeers/yolo-archived/stargazers",
+ "contributors_url": "https://api.github.com/repos/cloudbeers/yolo-archived/contributors",
+ "subscribers_url": "https://api.github.com/repos/cloudbeers/yolo-archived/subscribers",
+ "subscription_url": "https://api.github.com/repos/cloudbeers/yolo-archived/subscription",
+ "commits_url": "https://api.github.com/repos/cloudbeers/yolo-archived/commits{/sha}",
+ "git_commits_url": "https://api.github.com/repos/cloudbeers/yolo-archived/git/commits{/sha}",
+ "comments_url": "https://api.github.com/repos/cloudbeers/yolo-archived/comments{/number}",
+ "issue_comment_url": "https://api.github.com/repos/cloudbeers/yolo-archived/issues/comments{/number}",
+ "contents_url": "https://api.github.com/repos/cloudbeers/yolo-archived/contents/{+path}",
+ "compare_url": "https://api.github.com/repos/cloudbeers/yolo-archived/compare/{base}...{head}",
+ "merges_url": "https://api.github.com/repos/cloudbeers/yolo-archived/merges",
+ "archive_url": "https://api.github.com/repos/cloudbeers/yolo-archived/{archive_format}{/ref}",
+ "downloads_url": "https://api.github.com/repos/cloudbeers/yolo-archived/downloads",
+ "issues_url": "https://api.github.com/repos/cloudbeers/yolo-archived/issues{/number}",
+ "pulls_url": "https://api.github.com/repos/cloudbeers/yolo-archived/pulls{/number}",
+ "milestones_url": "https://api.github.com/repos/cloudbeers/yolo-archived/milestones{/number}",
+ "notifications_url": "https://api.github.com/repos/cloudbeers/yolo-archived/notifications{?since,all,participating}",
+ "labels_url": "https://api.github.com/repos/cloudbeers/yolo-archived/labels{/name}",
+ "releases_url": "https://api.github.com/repos/cloudbeers/yolo-archived/releases{/id}",
+ "deployments_url": "https://api.github.com/repos/cloudbeers/yolo-archived/deployments",
+ "created_at": "2015-09-24T02:58:30Z",
+ "updated_at": "2016-12-07T23:55:35Z",
+ "pushed_at": "2016-12-01T16:07:01Z",
+ "git_url": "git://github.com/cloudbeers/yolo-archived.git",
+ "ssh_url": "git@github.com:cloudbeers/yolo-archived.git",
+ "clone_url": "https://github.com/cloudbeers/yolo-archived.git",
+ "svn_url": "https://github.com/cloudbeers/yolo-archived",
+ "homepage": "http://yolo-archived.example.com",
+ "size": 3,
+ "stargazers_count": 0,
+ "watchers_count": 0,
+ "language": null,
+ "has_issues": true,
+ "has_downloads": true,
+ "archived": true,
"has_wiki": true,
"has_pages": false,
"forks_count": 3,
@@ -720,6 +820,7 @@
"language": null,
"has_issues": true,
"has_downloads": true,
+ "archived": false,
"has_wiki": true,
"has_pages": false,
"forks_count": 0,
@@ -812,6 +913,7 @@
"language": "Groovy",
"has_issues": true,
"has_downloads": true,
+ "archived": false,
"has_wiki": true,
"has_pages": false,
"forks_count": 3,
@@ -904,6 +1006,7 @@
"language": "Java",
"has_issues": false,
"has_downloads": true,
+ "archived": false,
"has_wiki": true,
"has_pages": false,
"forks_count": 0,
@@ -996,6 +1099,7 @@
"language": "JavaScript",
"has_issues": false,
"has_downloads": true,
+ "archived": false,
"has_wiki": true,
"has_pages": false,
"forks_count": 0,
@@ -1088,6 +1192,7 @@
"language": "Groovy",
"has_issues": false,
"has_downloads": true,
+ "archived": false,
"has_wiki": true,
"has_pages": false,
"forks_count": 0,
@@ -1180,6 +1285,7 @@
"language": "Makefile",
"has_issues": true,
"has_downloads": true,
+ "archived": false,
"has_wiki": true,
"has_pages": false,
"forks_count": 0,
diff --git a/src/test/resources/api/__files/body-cloudbeers-yolo-archived.json b/src/test/resources/api/__files/body-cloudbeers-yolo-archived.json
new file mode 100644
index 000000000..145b60966
--- /dev/null
+++ b/src/test/resources/api/__files/body-cloudbeers-yolo-archived.json
@@ -0,0 +1,110 @@
+{
+ "id": 43041241,
+ "name": "yolo-archived",
+ "full_name": "cloudbeers/yolo-archived",
+ "owner": {
+ "login": "cloudbeers",
+ "id": 4181899,
+ "avatar_url": "https://avatars.githubusercontent.com/u/4181899?v=3",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/cloudbeers",
+ "html_url": "https://github.com/cloudbeers",
+ "followers_url": "https://api.github.com/users/cloudbeers/followers",
+ "following_url": "https://api.github.com/users/cloudbeers/following{/other_user}",
+ "gists_url": "https://api.github.com/users/cloudbeers/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/cloudbeers/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/cloudbeers/subscriptions",
+ "organizations_url": "https://api.github.com/users/cloudbeers/orgs",
+ "repos_url": "https://api.github.com/users/cloudbeers/repos",
+ "events_url": "https://api.github.com/users/cloudbeers/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/cloudbeers/received_events",
+ "type": "Organization",
+ "site_admin": false
+ },
+ "private": false,
+ "html_url": "https://github.com/cloudbeers/yolo-archived",
+ "description": "It lived once, and then it was archived",
+ "fork": false,
+ "url": "https://api.github.com/repos/cloudbeers/yolo-archived",
+ "forks_url": "https://api.github.com/repos/cloudbeers/yolo-archived/forks",
+ "keys_url": "https://api.github.com/repos/cloudbeers/yolo-archived/keys{/key_id}",
+ "collaborators_url": "https://api.github.com/repos/cloudbeers/yolo-archived/collaborators{/collaborator}",
+ "teams_url": "https://api.github.com/repos/cloudbeers/yolo-archived/teams",
+ "hooks_url": "https://api.github.com/repos/cloudbeers/yolo-archived/hooks",
+ "issue_events_url": "https://api.github.com/repos/cloudbeers/yolo-archived/issues/events{/number}",
+ "events_url": "https://api.github.com/repos/cloudbeers/yolo-archived/events",
+ "assignees_url": "https://api.github.com/repos/cloudbeers/yolo-archived/assignees{/user}",
+ "branches_url": "https://api.github.com/repos/cloudbeers/yolo-archived/branches{/branch}",
+ "tags_url": "https://api.github.com/repos/cloudbeers/yolo-archived/tags",
+ "blobs_url": "https://api.github.com/repos/cloudbeers/yolo-archived/git/blobs{/sha}",
+ "git_tags_url": "https://api.github.com/repos/cloudbeers/yolo-archived/git/tags{/sha}",
+ "git_refs_url": "https://api.github.com/repos/cloudbeers/yolo-archived/git/refs{/sha}",
+ "trees_url": "https://api.github.com/repos/cloudbeers/yolo-archived/git/trees{/sha}",
+ "statuses_url": "https://api.github.com/repos/cloudbeers/yolo-archived/statuses/{sha}",
+ "languages_url": "https://api.github.com/repos/cloudbeers/yolo-archived/languages",
+ "stargazers_url": "https://api.github.com/repos/cloudbeers/yolo-archived/stargazers",
+ "contributors_url": "https://api.github.com/repos/cloudbeers/yolo-archived/contributors",
+ "subscribers_url": "https://api.github.com/repos/cloudbeers/yolo-archived/subscribers",
+ "subscription_url": "https://api.github.com/repos/cloudbeers/yolo-archived/subscription",
+ "commits_url": "https://api.github.com/repos/cloudbeers/yolo-archived/commits{/sha}",
+ "git_commits_url": "https://api.github.com/repos/cloudbeers/yolo-archived/git/commits{/sha}",
+ "comments_url": "https://api.github.com/repos/cloudbeers/yolo-archived/comments{/number}",
+ "issue_comment_url": "https://api.github.com/repos/cloudbeers/yolo-archived/issues/comments{/number}",
+ "contents_url": "https://api.github.com/repos/cloudbeers/yolo-archived/contents/{+path}",
+ "compare_url": "https://api.github.com/repos/cloudbeers/yolo-archived/compare/{base}...{head}",
+ "merges_url": "https://api.github.com/repos/cloudbeers/yolo-archived/merges",
+ "archive_url": "https://api.github.com/repos/cloudbeers/yolo-archived/{archive_format}{/ref}",
+ "downloads_url": "https://api.github.com/repos/cloudbeers/yolo-archived/downloads",
+ "issues_url": "https://api.github.com/repos/cloudbeers/yolo-archived/issues{/number}",
+ "pulls_url": "https://api.github.com/repos/cloudbeers/yolo-archived/pulls{/number}",
+ "milestones_url": "https://api.github.com/repos/cloudbeers/yolo-archived/milestones{/number}",
+ "notifications_url": "https://api.github.com/repos/cloudbeers/yolo-archived/notifications{?since,all,participating}",
+ "labels_url": "https://api.github.com/repos/cloudbeers/yolo-archived/labels{/name}",
+ "releases_url": "https://api.github.com/repos/cloudbeers/yolo-archived/releases{/id}",
+ "deployments_url": "https://api.github.com/repos/cloudbeers/yolo-archived/deployments",
+ "created_at": "2015-09-24T02:58:30Z",
+ "updated_at": "2016-12-07T23:55:35Z",
+ "pushed_at": "2016-12-01T16:07:01Z",
+ "git_url": "git://github.com/cloudbeers/yolo-archived.git",
+ "ssh_url": "git@github.com:cloudbeers/yolo-archived.git",
+ "clone_url": "https://github.com/cloudbeers/yolo-archived.git",
+ "svn_url": "https://github.com/cloudbeers/yolo-archived",
+ "homepage": "http://yolo-archived.example.com",
+ "size": 3,
+ "stargazers_count": 0,
+ "watchers_count": 0,
+ "language": null,
+ "has_issues": true,
+ "has_downloads": true,
+ "archived": true,
+ "has_wiki": true,
+ "has_pages": false,
+ "forks_count": 3,
+ "mirror_url": null,
+ "open_issues_count": 1,
+ "forks": 3,
+ "open_issues": 1,
+ "watchers": 0,
+ "default_branch": "master",
+ "organization": {
+ "login": "cloudbeers",
+ "id": 4181899,
+ "avatar_url": "https://avatars.githubusercontent.com/u/4181899?v=3",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/cloudbeers",
+ "html_url": "https://github.com/cloudbeers",
+ "followers_url": "https://api.github.com/users/cloudbeers/followers",
+ "following_url": "https://api.github.com/users/cloudbeers/following{/other_user}",
+ "gists_url": "https://api.github.com/users/cloudbeers/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/cloudbeers/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/cloudbeers/subscriptions",
+ "organizations_url": "https://api.github.com/users/cloudbeers/orgs",
+ "repos_url": "https://api.github.com/users/cloudbeers/repos",
+ "events_url": "https://api.github.com/users/cloudbeers/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/cloudbeers/received_events",
+ "type": "Organization",
+ "site_admin": false
+ },
+ "network_count": 3,
+ "subscribers_count": 2
+}
\ No newline at end of file
diff --git a/src/test/resources/api/__files/body-orgs-cloudbeers-teams-repo-gOYDg.json b/src/test/resources/api/__files/body-orgs-cloudbeers-teams-repo-gOYDg.json
index ce44c46a4..7c79822bb 100644
--- a/src/test/resources/api/__files/body-orgs-cloudbeers-teams-repo-gOYDg.json
+++ b/src/test/resources/api/__files/body-orgs-cloudbeers-teams-repo-gOYDg.json
@@ -218,5 +218,99 @@
"url": "https://api.github.com/licenses/mit",
"node_id": "MDc6TGljZW5zZW1pdA=="
}
+ },
+ {
+ "id": 43041241,
+ "name": "yolo-archived",
+ "full_name": "cloudbeers/yolo-archived",
+ "owner": {
+ "login": "cloudbeers",
+ "id": 4181899,
+ "avatar_url": "https://avatars.githubusercontent.com/u/4181899?v=3",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/cloudbeers",
+ "html_url": "https://github.com/cloudbeers",
+ "followers_url": "https://api.github.com/users/cloudbeers/followers",
+ "following_url": "https://api.github.com/users/cloudbeers/following{/other_user}",
+ "gists_url": "https://api.github.com/users/cloudbeers/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/cloudbeers/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/cloudbeers/subscriptions",
+ "organizations_url": "https://api.github.com/users/cloudbeers/orgs",
+ "repos_url": "https://api.github.com/users/cloudbeers/repos",
+ "events_url": "https://api.github.com/users/cloudbeers/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/cloudbeers/received_events",
+ "type": "Organization",
+ "site_admin": false
+ },
+ "private": false,
+ "html_url": "https://github.com/cloudbeers/yolo-archived",
+ "description": "It lived once, and then it was archived",
+ "fork": false,
+ "url": "https://api.github.com/repos/cloudbeers/yolo-archived",
+ "forks_url": "https://api.github.com/repos/cloudbeers/yolo-archived/forks",
+ "keys_url": "https://api.github.com/repos/cloudbeers/yolo-archived/keys{/key_id}",
+ "collaborators_url": "https://api.github.com/repos/cloudbeers/yolo-archived/collaborators{/collaborator}",
+ "teams_url": "https://api.github.com/repos/cloudbeers/yolo-archived/teams",
+ "hooks_url": "https://api.github.com/repos/cloudbeers/yolo-archived/hooks",
+ "issue_events_url": "https://api.github.com/repos/cloudbeers/yolo-archived/issues/events{/number}",
+ "events_url": "https://api.github.com/repos/cloudbeers/yolo-archived/events",
+ "assignees_url": "https://api.github.com/repos/cloudbeers/yolo-archived/assignees{/user}",
+ "branches_url": "https://api.github.com/repos/cloudbeers/yolo-archived/branches{/branch}",
+ "tags_url": "https://api.github.com/repos/cloudbeers/yolo-archived/tags",
+ "blobs_url": "https://api.github.com/repos/cloudbeers/yolo-archived/git/blobs{/sha}",
+ "git_tags_url": "https://api.github.com/repos/cloudbeers/yolo-archived/git/tags{/sha}",
+ "git_refs_url": "https://api.github.com/repos/cloudbeers/yolo-archived/git/refs{/sha}",
+ "trees_url": "https://api.github.com/repos/cloudbeers/yolo-archived/git/trees{/sha}",
+ "statuses_url": "https://api.github.com/repos/cloudbeers/yolo-archived/statuses/{sha}",
+ "languages_url": "https://api.github.com/repos/cloudbeers/yolo-archived/languages",
+ "stargazers_url": "https://api.github.com/repos/cloudbeers/yolo-archived/stargazers",
+ "contributors_url": "https://api.github.com/repos/cloudbeers/yolo-archived/contributors",
+ "subscribers_url": "https://api.github.com/repos/cloudbeers/yolo-archived/subscribers",
+ "subscription_url": "https://api.github.com/repos/cloudbeers/yolo-archived/subscription",
+ "commits_url": "https://api.github.com/repos/cloudbeers/yolo-archived/commits{/sha}",
+ "git_commits_url": "https://api.github.com/repos/cloudbeers/yolo-archived/git/commits{/sha}",
+ "comments_url": "https://api.github.com/repos/cloudbeers/yolo-archived/comments{/number}",
+ "issue_comment_url": "https://api.github.com/repos/cloudbeers/yolo-archived/issues/comments{/number}",
+ "contents_url": "https://api.github.com/repos/cloudbeers/yolo-archived/contents/{+path}",
+ "compare_url": "https://api.github.com/repos/cloudbeers/yolo-archived/compare/{base}...{head}",
+ "merges_url": "https://api.github.com/repos/cloudbeers/yolo-archived/merges",
+ "archive_url": "https://api.github.com/repos/cloudbeers/yolo-archived/{archive_format}{/ref}",
+ "downloads_url": "https://api.github.com/repos/cloudbeers/yolo-archived/downloads",
+ "issues_url": "https://api.github.com/repos/cloudbeers/yolo-archived/issues{/number}",
+ "pulls_url": "https://api.github.com/repos/cloudbeers/yolo-archived/pulls{/number}",
+ "milestones_url": "https://api.github.com/repos/cloudbeers/yolo-archived/milestones{/number}",
+ "notifications_url": "https://api.github.com/repos/cloudbeers/yolo-archived/notifications{?since,all,participating}",
+ "labels_url": "https://api.github.com/repos/cloudbeers/yolo-archived/labels{/name}",
+ "releases_url": "https://api.github.com/repos/cloudbeers/yolo-archived/releases{/id}",
+ "deployments_url": "https://api.github.com/repos/cloudbeers/yolo-archived/deployments",
+ "created_at": "2015-09-24T02:58:30Z",
+ "updated_at": "2016-12-07T23:55:35Z",
+ "pushed_at": "2016-12-01T16:07:01Z",
+ "git_url": "git://github.com/cloudbeers/yolo-archived.git",
+ "ssh_url": "git@github.com:cloudbeers/yolo-archived.git",
+ "clone_url": "https://github.com/cloudbeers/yolo-archived.git",
+ "svn_url": "https://github.com/cloudbeers/yolo-archived",
+ "homepage": "http://yolo-archived.example.com",
+ "size": 3,
+ "stargazers_count": 0,
+ "watchers_count": 0,
+ "language": null,
+ "has_issues": true,
+ "has_downloads": true,
+ "archived": true,
+ "has_wiki": true,
+ "has_pages": false,
+ "forks_count": 3,
+ "mirror_url": null,
+ "open_issues_count": 1,
+ "forks": 3,
+ "open_issues": 1,
+ "watchers": 0,
+ "default_branch": "master",
+ "permissions": {
+ "admin": false,
+ "push": false,
+ "pull": true
+ }
}
]
\ No newline at end of file
diff --git a/src/test/resources/api/__files/body-rate_limit-B5BGx.json b/src/test/resources/api/__files/body-rate_limit-B5BGx.json
new file mode 100644
index 000000000..37872f34b
--- /dev/null
+++ b/src/test/resources/api/__files/body-rate_limit-B5BGx.json
@@ -0,0 +1,29 @@
+{
+ "resources": {
+ "core": {
+ "limit": 5000,
+ "remaining": 4999,
+ "reset": 1372700873
+ },
+ "search": {
+ "limit": 30,
+ "remaining": 18,
+ "reset": 1372697452
+ },
+ "graphql": {
+ "limit": 5000,
+ "remaining": 4993,
+ "reset": 1372700389
+ },
+ "integration_manifest": {
+ "limit": 5000,
+ "remaining": 4999,
+ "reset": 1551806725
+ }
+ },
+ "rate": {
+ "limit": 5000,
+ "remaining": 4999,
+ "reset": 1372700873
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/api/__files/body-stephenc-yolo-archived.json b/src/test/resources/api/__files/body-stephenc-yolo-archived.json
new file mode 100644
index 000000000..f7e81737e
--- /dev/null
+++ b/src/test/resources/api/__files/body-stephenc-yolo-archived.json
@@ -0,0 +1,89 @@
+{
+ "id": 75305445,
+ "name": "yolo-archived",
+ "full_name": "stephenc/yolo-archived",
+ "owner": {
+ "login": "stephenc",
+ "id": 209336,
+ "avatar_url": "https://avatars.githubusercontent.com/u/209336?v=3",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/stephenc",
+ "html_url": "https://github.com/stephenc",
+ "followers_url": "https://api.github.com/users/stephenc/followers",
+ "following_url": "https://api.github.com/users/stephenc/following{/other_user}",
+ "gists_url": "https://api.github.com/users/stephenc/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/stephenc/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/stephenc/subscriptions",
+ "organizations_url": "https://api.github.com/users/stephenc/orgs",
+ "repos_url": "https://api.github.com/users/stephenc/repos",
+ "events_url": "https://api.github.com/users/stephenc/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/stephenc/received_events",
+ "type": "User",
+ "site_admin": false
+ },
+ "private": false,
+ "html_url": "https://github.com/stephenc/yolo-archived",
+ "description": "It lived once, and then it was archived",
+ "fork": true,
+ "url": "https://api.github.com/repos/stephenc/yolo-archived",
+ "forks_url": "https://api.github.com/repos/stephenc/yolo-archived/forks",
+ "keys_url": "https://api.github.com/repos/stephenc/yolo-archived/keys{/key_id}",
+ "collaborators_url": "https://api.github.com/repos/stephenc/yolo-archived/collaborators{/collaborator}",
+ "teams_url": "https://api.github.com/repos/stephenc/yolo-archived/teams",
+ "hooks_url": "https://api.github.com/repos/stephenc/yolo-archived/hooks",
+ "issue_events_url": "https://api.github.com/repos/stephenc/yolo-archived/issues/events{/number}",
+ "events_url": "https://api.github.com/repos/stephenc/yolo-archived/events",
+ "assignees_url": "https://api.github.com/repos/stephenc/yolo-archived/assignees{/user}",
+ "branches_url": "https://api.github.com/repos/stephenc/yolo-archived/branches{/branch}",
+ "tags_url": "https://api.github.com/repos/stephenc/yolo-archived/tags",
+ "blobs_url": "https://api.github.com/repos/stephenc/yolo-archived/git/blobs{/sha}",
+ "git_tags_url": "https://api.github.com/repos/stephenc/yolo-archived/git/tags{/sha}",
+ "git_refs_url": "https://api.github.com/repos/stephenc/yolo-archived/git/refs{/sha}",
+ "trees_url": "https://api.github.com/repos/stephenc/yolo-archived/git/trees{/sha}",
+ "statuses_url": "https://api.github.com/repos/stephenc/yolo-archived/statuses/{sha}",
+ "languages_url": "https://api.github.com/repos/stephenc/yolo-archived/languages",
+ "stargazers_url": "https://api.github.com/repos/stephenc/yolo-archived/stargazers",
+ "contributors_url": "https://api.github.com/repos/stephenc/yolo-archived/contributors",
+ "subscribers_url": "https://api.github.com/repos/stephenc/yolo-archived/subscribers",
+ "subscription_url": "https://api.github.com/repos/stephenc/yolo-archived/subscription",
+ "commits_url": "https://api.github.com/repos/stephenc/yolo-archived/commits{/sha}",
+ "git_commits_url": "https://api.github.com/repos/stephenc/yolo-archived/git/commits{/sha}",
+ "comments_url": "https://api.github.com/repos/stephenc/yolo-archived/comments{/number}",
+ "issue_comment_url": "https://api.github.com/repos/stephenc/yolo-archived/issues/comments{/number}",
+ "contents_url": "https://api.github.com/repos/stephenc/yolo-archived/contents/{+path}",
+ "compare_url": "https://api.github.com/repos/stephenc/yolo-archived/compare/{base}...{head}",
+ "merges_url": "https://api.github.com/repos/stephenc/yolo-archived/merges",
+ "archive_url": "https://api.github.com/repos/stephenc/yolo-archived/{archive_format}{/ref}",
+ "downloads_url": "https://api.github.com/repos/stephenc/yolo-archived/downloads",
+ "issues_url": "https://api.github.com/repos/stephenc/yolo-archived/issues{/number}",
+ "pulls_url": "https://api.github.com/repos/stephenc/yolo-archived/pulls{/number}",
+ "milestones_url": "https://api.github.com/repos/stephenc/yolo-archived/milestones{/number}",
+ "notifications_url": "https://api.github.com/repos/stephenc/yolo-archived/notifications{?since,all,participating}",
+ "labels_url": "https://api.github.com/repos/stephenc/yolo-archived/labels{/name}",
+ "releases_url": "https://api.github.com/repos/stephenc/yolo-archived/releases{/id}",
+ "deployments_url": "https://api.github.com/repos/stephenc/yolo-archived/deployments",
+ "created_at": "2016-12-01T15:25:10Z",
+ "updated_at": "2016-11-21T22:53:53Z",
+ "pushed_at": "2016-12-01T16:07:01Z",
+ "git_url": "git://github.com/stephenc/yolo-archived.git",
+ "ssh_url": "git@github.com:stephenc/yolo-archived.git",
+ "clone_url": "https://github.com/stephenc/yolo-archived.git",
+ "svn_url": "https://github.com/stephenc/yolo-archived",
+ "homepage": null,
+ "size": 2,
+ "stargazers_count": 0,
+ "watchers_count": 0,
+ "language": null,
+ "has_issues": false,
+ "has_downloads": true,
+ "archived": true,
+ "has_wiki": true,
+ "has_pages": false,
+ "forks_count": 0,
+ "mirror_url": null,
+ "open_issues_count": 0,
+ "forks": 0,
+ "open_issues": 0,
+ "watchers": 0,
+ "default_branch": "master"
+}
\ No newline at end of file
diff --git a/src/test/resources/api/__files/body-user-repos-O8W78.json b/src/test/resources/api/__files/body-user-repos-O8W78.json
new file mode 100644
index 000000000..1e4121f59
--- /dev/null
+++ b/src/test/resources/api/__files/body-user-repos-O8W78.json
@@ -0,0 +1,185 @@
+[
+ {
+ "id": 75305444,
+ "name": "yolo",
+ "full_name": "stephenc/yolo",
+ "owner": {
+ "login": "stephenc",
+ "id": 209336,
+ "avatar_url": "https://avatars.githubusercontent.com/u/209336?v=3",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/stephenc",
+ "html_url": "https://github.com/stephenc",
+ "followers_url": "https://api.github.com/users/stephenc/followers",
+ "following_url": "https://api.github.com/users/stephenc/following{/other_user}",
+ "gists_url": "https://api.github.com/users/stephenc/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/stephenc/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/stephenc/subscriptions",
+ "organizations_url": "https://api.github.com/users/stephenc/orgs",
+ "repos_url": "https://api.github.com/users/stephenc/repos",
+ "events_url": "https://api.github.com/users/stephenc/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/stephenc/received_events",
+ "type": "User",
+ "site_admin": false
+ },
+ "private": false,
+ "html_url": "https://github.com/stephenc/yolo",
+ "description": null,
+ "fork": true,
+ "url": "https://api.github.com/repos/stephenc/yolo",
+ "forks_url": "https://api.github.com/repos/stephenc/yolo/forks",
+ "keys_url": "https://api.github.com/repos/stephenc/yolo/keys{/key_id}",
+ "collaborators_url": "https://api.github.com/repos/stephenc/yolo/collaborators{/collaborator}",
+ "teams_url": "https://api.github.com/repos/stephenc/yolo/teams",
+ "hooks_url": "https://api.github.com/repos/stephenc/yolo/hooks",
+ "issue_events_url": "https://api.github.com/repos/stephenc/yolo/issues/events{/number}",
+ "events_url": "https://api.github.com/repos/stephenc/yolo/events",
+ "assignees_url": "https://api.github.com/repos/stephenc/yolo/assignees{/user}",
+ "branches_url": "https://api.github.com/repos/stephenc/yolo/branches{/branch}",
+ "tags_url": "https://api.github.com/repos/stephenc/yolo/tags",
+ "blobs_url": "https://api.github.com/repos/stephenc/yolo/git/blobs{/sha}",
+ "git_tags_url": "https://api.github.com/repos/stephenc/yolo/git/tags{/sha}",
+ "git_refs_url": "https://api.github.com/repos/stephenc/yolo/git/refs{/sha}",
+ "trees_url": "https://api.github.com/repos/stephenc/yolo/git/trees{/sha}",
+ "statuses_url": "https://api.github.com/repos/stephenc/yolo/statuses/{sha}",
+ "languages_url": "https://api.github.com/repos/stephenc/yolo/languages",
+ "stargazers_url": "https://api.github.com/repos/stephenc/yolo/stargazers",
+ "contributors_url": "https://api.github.com/repos/stephenc/yolo/contributors",
+ "subscribers_url": "https://api.github.com/repos/stephenc/yolo/subscribers",
+ "subscription_url": "https://api.github.com/repos/stephenc/yolo/subscription",
+ "commits_url": "https://api.github.com/repos/stephenc/yolo/commits{/sha}",
+ "git_commits_url": "https://api.github.com/repos/stephenc/yolo/git/commits{/sha}",
+ "comments_url": "https://api.github.com/repos/stephenc/yolo/comments{/number}",
+ "issue_comment_url": "https://api.github.com/repos/stephenc/yolo/issues/comments{/number}",
+ "contents_url": "https://api.github.com/repos/stephenc/yolo/contents/{+path}",
+ "compare_url": "https://api.github.com/repos/stephenc/yolo/compare/{base}...{head}",
+ "merges_url": "https://api.github.com/repos/stephenc/yolo/merges",
+ "archive_url": "https://api.github.com/repos/stephenc/yolo/{archive_format}{/ref}",
+ "downloads_url": "https://api.github.com/repos/stephenc/yolo/downloads",
+ "issues_url": "https://api.github.com/repos/stephenc/yolo/issues{/number}",
+ "pulls_url": "https://api.github.com/repos/stephenc/yolo/pulls{/number}",
+ "milestones_url": "https://api.github.com/repos/stephenc/yolo/milestones{/number}",
+ "notifications_url": "https://api.github.com/repos/stephenc/yolo/notifications{?since,all,participating}",
+ "labels_url": "https://api.github.com/repos/stephenc/yolo/labels{/name}",
+ "releases_url": "https://api.github.com/repos/stephenc/yolo/releases{/id}",
+ "deployments_url": "https://api.github.com/repos/stephenc/yolo/deployments",
+ "created_at": "2016-12-01T15:25:10Z",
+ "updated_at": "2016-11-21T22:53:53Z",
+ "pushed_at": "2016-12-01T16:07:01Z",
+ "git_url": "git://github.com/stephenc/yolo.git",
+ "ssh_url": "git@github.com:stephenc/yolo.git",
+ "clone_url": "https://github.com/stephenc/yolo.git",
+ "svn_url": "https://github.com/stephenc/yolo",
+ "homepage": null,
+ "size": 2,
+ "stargazers_count": 0,
+ "watchers_count": 0,
+ "language": null,
+ "has_issues": false,
+ "has_downloads": true,
+ "archived": false,
+ "has_wiki": true,
+ "has_pages": false,
+ "forks_count": 0,
+ "mirror_url": null,
+ "open_issues_count": 0,
+ "forks": 0,
+ "open_issues": 0,
+ "watchers": 0,
+ "default_branch": "master"
+ },
+ {
+ "id": 43041241,
+ "name": "yolo-archived",
+ "full_name": "stephenc/yolo-archived",
+ "owner": {
+ "login": "stephenc",
+ "id": 209336,
+ "avatar_url": "https://avatars.githubusercontent.com/u/209336?v=3",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/stephenc",
+ "html_url": "https://github.com/stephenc",
+ "followers_url": "https://api.github.com/users/stephenc/followers",
+ "following_url": "https://api.github.com/users/stephenc/following{/other_user}",
+ "gists_url": "https://api.github.com/users/stephenc/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/stephenc/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/stephenc/subscriptions",
+ "organizations_url": "https://api.github.com/users/stephenc/orgs",
+ "repos_url": "https://api.github.com/users/stephenc/repos",
+ "events_url": "https://api.github.com/users/stephenc/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/stephenc/received_events",
+ "type": "User",
+ "site_admin": false
+ },
+ "private": false,
+ "html_url": "https://github.com/stephenc/yolo-archived",
+ "description": "It lived once, and then it was archived",
+ "fork": false,
+ "url": "https://api.github.com/repos/stephenc/yolo-archived",
+ "forks_url": "https://api.github.com/repos/stephenc/yolo-archived/forks",
+ "keys_url": "https://api.github.com/repos/stephenc/yolo-archived/keys{/key_id}",
+ "collaborators_url": "https://api.github.com/repos/stephenc/yolo-archived/collaborators{/collaborator}",
+ "teams_url": "https://api.github.com/repos/stephenc/yolo-archived/teams",
+ "hooks_url": "https://api.github.com/repos/stephenc/yolo-archived/hooks",
+ "issue_events_url": "https://api.github.com/repos/stephenc/yolo-archived/issues/events{/number}",
+ "events_url": "https://api.github.com/repos/stephenc/yolo-archived/events",
+ "assignees_url": "https://api.github.com/repos/stephenc/yolo-archived/assignees{/user}",
+ "branches_url": "https://api.github.com/repos/stephenc/yolo-archived/branches{/branch}",
+ "tags_url": "https://api.github.com/repos/stephenc/yolo-archived/tags",
+ "blobs_url": "https://api.github.com/repos/stephenc/yolo-archived/git/blobs{/sha}",
+ "git_tags_url": "https://api.github.com/repos/stephenc/yolo-archived/git/tags{/sha}",
+ "git_refs_url": "https://api.github.com/repos/stephenc/yolo-archived/git/refs{/sha}",
+ "trees_url": "https://api.github.com/repos/stephenc/yolo-archived/git/trees{/sha}",
+ "statuses_url": "https://api.github.com/repos/stephenc/yolo-archived/statuses/{sha}",
+ "languages_url": "https://api.github.com/repos/stephenc/yolo-archived/languages",
+ "stargazers_url": "https://api.github.com/repos/stephenc/yolo-archived/stargazers",
+ "contributors_url": "https://api.github.com/repos/stephenc/yolo-archived/contributors",
+ "subscribers_url": "https://api.github.com/repos/stephenc/yolo-archived/subscribers",
+ "subscription_url": "https://api.github.com/repos/stephenc/yolo-archived/subscription",
+ "commits_url": "https://api.github.com/repos/stephenc/yolo-archived/commits{/sha}",
+ "git_commits_url": "https://api.github.com/repos/stephenc/yolo-archived/git/commits{/sha}",
+ "comments_url": "https://api.github.com/repos/stephenc/yolo-archived/comments{/number}",
+ "issue_comment_url": "https://api.github.com/repos/stephenc/yolo-archived/issues/comments{/number}",
+ "contents_url": "https://api.github.com/repos/stephenc/yolo-archived/contents/{+path}",
+ "compare_url": "https://api.github.com/repos/stephenc/yolo-archived/compare/{base}...{head}",
+ "merges_url": "https://api.github.com/repos/stephenc/yolo-archived/merges",
+ "archive_url": "https://api.github.com/repos/stephenc/yolo-archived/{archive_format}{/ref}",
+ "downloads_url": "https://api.github.com/repos/stephenc/yolo-archived/downloads",
+ "issues_url": "https://api.github.com/repos/stephenc/yolo-archived/issues{/number}",
+ "pulls_url": "https://api.github.com/repos/stephenc/yolo-archived/pulls{/number}",
+ "milestones_url": "https://api.github.com/repos/stephenc/yolo-archived/milestones{/number}",
+ "notifications_url": "https://api.github.com/repos/stephenc/yolo-archived/notifications{?since,all,participating}",
+ "labels_url": "https://api.github.com/repos/stephenc/yolo-archived/labels{/name}",
+ "releases_url": "https://api.github.com/repos/stephenc/yolo-archived/releases{/id}",
+ "deployments_url": "https://api.github.com/repos/stephenc/yolo-archived/deployments",
+ "created_at": "2015-09-24T02:58:30Z",
+ "updated_at": "2016-12-07T23:55:35Z",
+ "pushed_at": "2016-12-01T16:07:01Z",
+ "git_url": "git://github.com/stephenc/yolo-archived.git",
+ "ssh_url": "git@github.com:stephenc/yolo-archived.git",
+ "clone_url": "https://github.com/stephenc/yolo-archived.git",
+ "svn_url": "https://github.com/stephenc/yolo-archived",
+ "homepage": "http://yolo-archived.example.com",
+ "size": 3,
+ "stargazers_count": 0,
+ "watchers_count": 0,
+ "language": null,
+ "has_issues": true,
+ "has_downloads": true,
+ "archived": true,
+ "has_wiki": true,
+ "has_pages": false,
+ "forks_count": 3,
+ "mirror_url": null,
+ "open_issues_count": 1,
+ "forks": 3,
+ "open_issues": 1,
+ "watchers": 0,
+ "default_branch": "master",
+ "permissions": {
+ "admin": false,
+ "push": false,
+ "pull": true
+ }
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/api/__files/body-users-stephenc-repos.json b/src/test/resources/api/__files/body-users-stephenc-repos.json
new file mode 100644
index 000000000..f00457514
--- /dev/null
+++ b/src/test/resources/api/__files/body-users-stephenc-repos.json
@@ -0,0 +1,190 @@
+[
+ {
+ "id": 43041240,
+ "name": "yolo",
+ "full_name": "cloudbeers/yolo",
+ "owner": {
+ "login": "cloudbeers",
+ "id": 4181899,
+ "avatar_url": "https://avatars.githubusercontent.com/u/4181899?v=3",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/cloudbeers",
+ "html_url": "https://github.com/cloudbeers",
+ "followers_url": "https://api.github.com/users/cloudbeers/followers",
+ "following_url": "https://api.github.com/users/cloudbeers/following{/other_user}",
+ "gists_url": "https://api.github.com/users/cloudbeers/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/cloudbeers/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/cloudbeers/subscriptions",
+ "organizations_url": "https://api.github.com/users/cloudbeers/orgs",
+ "repos_url": "https://api.github.com/users/cloudbeers/repos",
+ "events_url": "https://api.github.com/users/cloudbeers/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/cloudbeers/received_events",
+ "type": "Organization",
+ "site_admin": false
+ },
+ "private": false,
+ "html_url": "https://github.com/cloudbeers/yolo",
+ "description": "You only live once",
+ "fork": false,
+ "url": "https://api.github.com/repos/cloudbeers/yolo",
+ "forks_url": "https://api.github.com/repos/cloudbeers/yolo/forks",
+ "keys_url": "https://api.github.com/repos/cloudbeers/yolo/keys{/key_id}",
+ "collaborators_url": "https://api.github.com/repos/cloudbeers/yolo/collaborators{/collaborator}",
+ "teams_url": "https://api.github.com/repos/cloudbeers/yolo/teams",
+ "hooks_url": "https://api.github.com/repos/cloudbeers/yolo/hooks",
+ "issue_events_url": "https://api.github.com/repos/cloudbeers/yolo/issues/events{/number}",
+ "events_url": "https://api.github.com/repos/cloudbeers/yolo/events",
+ "assignees_url": "https://api.github.com/repos/cloudbeers/yolo/assignees{/user}",
+ "branches_url": "https://api.github.com/repos/cloudbeers/yolo/branches{/branch}",
+ "tags_url": "https://api.github.com/repos/cloudbeers/yolo/tags",
+ "blobs_url": "https://api.github.com/repos/cloudbeers/yolo/git/blobs{/sha}",
+ "git_tags_url": "https://api.github.com/repos/cloudbeers/yolo/git/tags{/sha}",
+ "git_refs_url": "https://api.github.com/repos/cloudbeers/yolo/git/refs{/sha}",
+ "trees_url": "https://api.github.com/repos/cloudbeers/yolo/git/trees{/sha}",
+ "statuses_url": "https://api.github.com/repos/cloudbeers/yolo/statuses/{sha}",
+ "languages_url": "https://api.github.com/repos/cloudbeers/yolo/languages",
+ "stargazers_url": "https://api.github.com/repos/cloudbeers/yolo/stargazers",
+ "contributors_url": "https://api.github.com/repos/cloudbeers/yolo/contributors",
+ "subscribers_url": "https://api.github.com/repos/cloudbeers/yolo/subscribers",
+ "subscription_url": "https://api.github.com/repos/cloudbeers/yolo/subscription",
+ "commits_url": "https://api.github.com/repos/cloudbeers/yolo/commits{/sha}",
+ "git_commits_url": "https://api.github.com/repos/cloudbeers/yolo/git/commits{/sha}",
+ "comments_url": "https://api.github.com/repos/cloudbeers/yolo/comments{/number}",
+ "issue_comment_url": "https://api.github.com/repos/cloudbeers/yolo/issues/comments{/number}",
+ "contents_url": "https://api.github.com/repos/cloudbeers/yolo/contents/{+path}",
+ "compare_url": "https://api.github.com/repos/cloudbeers/yolo/compare/{base}...{head}",
+ "merges_url": "https://api.github.com/repos/cloudbeers/yolo/merges",
+ "archive_url": "https://api.github.com/repos/cloudbeers/yolo/{archive_format}{/ref}",
+ "downloads_url": "https://api.github.com/repos/cloudbeers/yolo/downloads",
+ "issues_url": "https://api.github.com/repos/cloudbeers/yolo/issues{/number}",
+ "pulls_url": "https://api.github.com/repos/cloudbeers/yolo/pulls{/number}",
+ "milestones_url": "https://api.github.com/repos/cloudbeers/yolo/milestones{/number}",
+ "notifications_url": "https://api.github.com/repos/cloudbeers/yolo/notifications{?since,all,participating}",
+ "labels_url": "https://api.github.com/repos/cloudbeers/yolo/labels{/name}",
+ "releases_url": "https://api.github.com/repos/cloudbeers/yolo/releases{/id}",
+ "deployments_url": "https://api.github.com/repos/cloudbeers/yolo/deployments",
+ "created_at": "2015-09-24T02:58:30Z",
+ "updated_at": "2016-12-07T23:55:35Z",
+ "pushed_at": "2016-12-01T16:07:01Z",
+ "git_url": "git://github.com/cloudbeers/yolo.git",
+ "ssh_url": "git@github.com:cloudbeers/yolo.git",
+ "clone_url": "https://github.com/cloudbeers/yolo.git",
+ "svn_url": "https://github.com/cloudbeers/yolo",
+ "homepage": "http://yolo.example.com",
+ "size": 3,
+ "stargazers_count": 0,
+ "watchers_count": 0,
+ "language": null,
+ "has_issues": true,
+ "has_downloads": true,
+ "archived": false,
+ "has_wiki": true,
+ "has_pages": false,
+ "forks_count": 3,
+ "mirror_url": null,
+ "open_issues_count": 1,
+ "forks": 3,
+ "open_issues": 1,
+ "watchers": 0,
+ "default_branch": "master",
+ "permissions": {
+ "admin": false,
+ "push": false,
+ "pull": true
+ }
+},
+ {
+ "id": 43041241,
+ "name": "yolo-archived",
+ "full_name": "cloudbeers/yolo-archived",
+ "owner": {
+ "login": "cloudbeers",
+ "id": 4181899,
+ "avatar_url": "https://avatars.githubusercontent.com/u/4181899?v=3",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/cloudbeers",
+ "html_url": "https://github.com/cloudbeers",
+ "followers_url": "https://api.github.com/users/cloudbeers/followers",
+ "following_url": "https://api.github.com/users/cloudbeers/following{/other_user}",
+ "gists_url": "https://api.github.com/users/cloudbeers/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/cloudbeers/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/cloudbeers/subscriptions",
+ "organizations_url": "https://api.github.com/users/cloudbeers/orgs",
+ "repos_url": "https://api.github.com/users/cloudbeers/repos",
+ "events_url": "https://api.github.com/users/cloudbeers/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/cloudbeers/received_events",
+ "type": "Organization",
+ "site_admin": false
+ },
+ "private": false,
+ "html_url": "https://github.com/cloudbeers/yolo-archived",
+ "description": "It lived once, and then it was archived",
+ "fork": false,
+ "url": "https://api.github.com/repos/cloudbeers/yolo-archived",
+ "forks_url": "https://api.github.com/repos/cloudbeers/yolo-archived/forks",
+ "keys_url": "https://api.github.com/repos/cloudbeers/yolo-archived/keys{/key_id}",
+ "collaborators_url": "https://api.github.com/repos/cloudbeers/yolo-archived/collaborators{/collaborator}",
+ "teams_url": "https://api.github.com/repos/cloudbeers/yolo-archived/teams",
+ "hooks_url": "https://api.github.com/repos/cloudbeers/yolo-archived/hooks",
+ "issue_events_url": "https://api.github.com/repos/cloudbeers/yolo-archived/issues/events{/number}",
+ "events_url": "https://api.github.com/repos/cloudbeers/yolo-archived/events",
+ "assignees_url": "https://api.github.com/repos/cloudbeers/yolo-archived/assignees{/user}",
+ "branches_url": "https://api.github.com/repos/cloudbeers/yolo-archived/branches{/branch}",
+ "tags_url": "https://api.github.com/repos/cloudbeers/yolo-archived/tags",
+ "blobs_url": "https://api.github.com/repos/cloudbeers/yolo-archived/git/blobs{/sha}",
+ "git_tags_url": "https://api.github.com/repos/cloudbeers/yolo-archived/git/tags{/sha}",
+ "git_refs_url": "https://api.github.com/repos/cloudbeers/yolo-archived/git/refs{/sha}",
+ "trees_url": "https://api.github.com/repos/cloudbeers/yolo-archived/git/trees{/sha}",
+ "statuses_url": "https://api.github.com/repos/cloudbeers/yolo-archived/statuses/{sha}",
+ "languages_url": "https://api.github.com/repos/cloudbeers/yolo-archived/languages",
+ "stargazers_url": "https://api.github.com/repos/cloudbeers/yolo-archived/stargazers",
+ "contributors_url": "https://api.github.com/repos/cloudbeers/yolo-archived/contributors",
+ "subscribers_url": "https://api.github.com/repos/cloudbeers/yolo-archived/subscribers",
+ "subscription_url": "https://api.github.com/repos/cloudbeers/yolo-archived/subscription",
+ "commits_url": "https://api.github.com/repos/cloudbeers/yolo-archived/commits{/sha}",
+ "git_commits_url": "https://api.github.com/repos/cloudbeers/yolo-archived/git/commits{/sha}",
+ "comments_url": "https://api.github.com/repos/cloudbeers/yolo-archived/comments{/number}",
+ "issue_comment_url": "https://api.github.com/repos/cloudbeers/yolo-archived/issues/comments{/number}",
+ "contents_url": "https://api.github.com/repos/cloudbeers/yolo-archived/contents/{+path}",
+ "compare_url": "https://api.github.com/repos/cloudbeers/yolo-archived/compare/{base}...{head}",
+ "merges_url": "https://api.github.com/repos/cloudbeers/yolo-archived/merges",
+ "archive_url": "https://api.github.com/repos/cloudbeers/yolo-archived/{archive_format}{/ref}",
+ "downloads_url": "https://api.github.com/repos/cloudbeers/yolo-archived/downloads",
+ "issues_url": "https://api.github.com/repos/cloudbeers/yolo-archived/issues{/number}",
+ "pulls_url": "https://api.github.com/repos/cloudbeers/yolo-archived/pulls{/number}",
+ "milestones_url": "https://api.github.com/repos/cloudbeers/yolo-archived/milestones{/number}",
+ "notifications_url": "https://api.github.com/repos/cloudbeers/yolo-archived/notifications{?since,all,participating}",
+ "labels_url": "https://api.github.com/repos/cloudbeers/yolo-archived/labels{/name}",
+ "releases_url": "https://api.github.com/repos/cloudbeers/yolo-archived/releases{/id}",
+ "deployments_url": "https://api.github.com/repos/cloudbeers/yolo-archived/deployments",
+ "created_at": "2015-09-24T02:58:30Z",
+ "updated_at": "2016-12-07T23:55:35Z",
+ "pushed_at": "2016-12-01T16:07:01Z",
+ "git_url": "git://github.com/cloudbeers/yolo-archived.git",
+ "ssh_url": "git@github.com:cloudbeers/yolo-archived.git",
+ "clone_url": "https://github.com/cloudbeers/yolo-archived.git",
+ "svn_url": "https://github.com/cloudbeers/yolo-archived",
+ "homepage": "http://yolo-archived.example.com",
+ "size": 3,
+ "stargazers_count": 0,
+ "watchers_count": 0,
+ "language": null,
+ "has_issues": true,
+ "has_downloads": true,
+ "archived": true,
+ "has_wiki": true,
+ "has_pages": false,
+ "forks_count": 3,
+ "mirror_url": null,
+ "open_issues_count": 1,
+ "forks": 3,
+ "open_issues": 1,
+ "watchers": 0,
+ "default_branch": "master",
+ "permissions": {
+ "admin": false,
+ "push": false,
+ "pull": true
+ }
+}
+]
\ No newline at end of file
diff --git a/src/test/resources/api/mappings/mapping-cloudbeers-yolo-archived.json b/src/test/resources/api/mappings/mapping-cloudbeers-yolo-archived.json
new file mode 100644
index 000000000..cd6d3fb8d
--- /dev/null
+++ b/src/test/resources/api/mappings/mapping-cloudbeers-yolo-archived.json
@@ -0,0 +1,34 @@
+{
+ "request": {
+ "url": "/repos/cloudbeers/yolo-archived",
+ "method": "GET"
+ },
+ "response": {
+ "status": 200,
+ "bodyFileName": "body-cloudbeers-yolo-archived.json",
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Tue, 06 Dec 2016 15:06:25 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "Transfer-Encoding": "chunked",
+ "Status": "200 OK",
+ "X-RateLimit-Limit": "600",
+ "X-RateLimit-Remaining": "600",
+ "X-RateLimit-Reset": "1481039662",
+ "Cache-Control": "public, max-age=60, s-maxage=60",
+ "Vary": ["Accept", "Accept-Encoding"],
+ "ETag": "W/\"12cee9e1d9874cbabcbfaf3b112e8dac\"",
+ "Last-Modified": "Mon, 21 Nov 2016 22:53:53 GMT",
+ "X-GitHub-Media-Type": "github.v3; format=json",
+ "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval",
+ "Access-Control-Allow-Origin": "*",
+ "Content-Security-Policy": "default-src 'none'",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Content-Type-Options": "nosniff",
+ "X-Frame-Options": "deny",
+ "X-XSS-Protection": "1; mode=block",
+ "X-Served-By": "2d7a5e35115884240089368322196939",
+ "X-GitHub-Request-Id": "B2A7FE77:629C:AF96C44:5846D3F1"
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/api/mappings/mapping-body-orgs-cloudbeers-repo-gUIDg.json b/src/test/resources/api/mappings/mapping-orgs-cloudbeers-repo-gUIDg.json
similarity index 100%
rename from src/test/resources/api/mappings/mapping-body-orgs-cloudbeers-repo-gUIDg.json
rename to src/test/resources/api/mappings/mapping-orgs-cloudbeers-repo-gUIDg.json
diff --git a/src/test/resources/api/mappings/mapping-rate_limit-B5BGx.json b/src/test/resources/api/mappings/mapping-rate_limit-B5BGx.json
new file mode 100644
index 000000000..53921dba1
--- /dev/null
+++ b/src/test/resources/api/mappings/mapping-rate_limit-B5BGx.json
@@ -0,0 +1,31 @@
+{
+ "id" : "858ec6db-837e-3829-80be-49b92a017610",
+ "request" : {
+ "url" : "/rate_limit",
+ "method" : "GET"
+ },
+ "response" : {
+ "status" : 200,
+ "bodyFileName" : "body-rate_limit-B5BGx.json",
+ "headers" : {
+ "Date" : "Thu, 30 Jan 2020 17:42:15 GMT",
+ "Content-Type" : "application/json; charset=utf-8",
+ "Server" : "GitHub.com",
+ "Status" : "200 OK",
+ "X-GitHub-Media-Type" : "github.v3; format=json",
+ "X-RateLimit-Limit": "5000",
+ "X-RateLimit-Remaining": "4999",
+ "X-RateLimit-Reset": "1372700873",
+ "Access-Control-Expose-Headers" : "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type",
+ "Access-Control-Allow-Origin" : "*",
+ "Strict-Transport-Security" : "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options" : "deny",
+ "X-Content-Type-Options" : "nosniff",
+ "X-XSS-Protection" : "1; mode=block",
+ "Referrer-Policy" : "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy" : "default-src 'none'",
+ "X-GitHub-Request-Id" : "FB84:12584:80135A:98A539:5E331577"
+ }
+ },
+ "uuid" : "858ec6db-837e-3829-80be-49b92a017610"
+}
\ No newline at end of file
diff --git a/src/test/resources/api/mappings/mapping-stephenc-yolo-archived.json b/src/test/resources/api/mappings/mapping-stephenc-yolo-archived.json
new file mode 100644
index 000000000..4236d99d1
--- /dev/null
+++ b/src/test/resources/api/mappings/mapping-stephenc-yolo-archived.json
@@ -0,0 +1,34 @@
+{
+ "request": {
+ "url": "/repos/stephenc/yolo-archived",
+ "method": "GET"
+ },
+ "response": {
+ "status": 200,
+ "bodyFileName": "body-stephenc-yolo-archived.json",
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Tue, 06 Dec 2016 15:06:25 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "Transfer-Encoding": "chunked",
+ "Status": "200 OK",
+ "X-RateLimit-Limit": "600",
+ "X-RateLimit-Remaining": "600",
+ "X-RateLimit-Reset": "1481039662",
+ "Cache-Control": "public, max-age=60, s-maxage=60",
+ "Vary": ["Accept", "Accept-Encoding"],
+ "ETag": "W/\"12cee9e1d9874cbabcbfaf3b112e8dac\"",
+ "Last-Modified": "Mon, 21 Nov 2016 22:53:53 GMT",
+ "X-GitHub-Media-Type": "github.v3; format=json",
+ "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval",
+ "Access-Control-Allow-Origin": "*",
+ "Content-Security-Policy": "default-src 'none'",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Content-Type-Options": "nosniff",
+ "X-Frame-Options": "deny",
+ "X-XSS-Protection": "1; mode=block",
+ "X-Served-By": "2d7a5e35115884240089368322196939",
+ "X-GitHub-Request-Id": "B2A7FE77:629C:AF96C44:5846D3F1"
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/api/mappings/mapping-user-JRfTU.json b/src/test/resources/api/mappings/mapping-user-JRfTU.json
new file mode 100644
index 000000000..d6138b613
--- /dev/null
+++ b/src/test/resources/api/mappings/mapping-user-JRfTU.json
@@ -0,0 +1,34 @@
+{
+ "request" : {
+ "url" : "/user",
+ "method" : "GET",
+ "basicAuth": {
+ "username": "git-user",
+ "password": "git-secret"
+ }
+ },
+ "response" : {
+ "status" : 200,
+ "bodyFileName" : "body-users-stephenc-JRfTU.json",
+ "headers" : {
+ "Date" : "Thu, 30 Jan 2020 16:38:59 GMT",
+ "Content-Type" : "application/json; charset=utf-8",
+ "Server" : "GitHub.com",
+ "Transfer-Encoding": "chunked",
+ "Status" : "200 OK",
+ "X-GitHub-Media-Type" : "github.v3; format=json",
+ "X-RateLimit-Limit" : "60",
+ "X-RateLimit-Remaining" : "51",
+ "X-RateLimit-Reset" : "1580403200",
+ "Access-Control-Expose-Headers" : "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type",
+ "Access-Control-Allow-Origin" : "*",
+ "Strict-Transport-Security" : "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options" : "deny",
+ "X-Content-Type-Options" : "nosniff",
+ "X-XSS-Protection" : "1; mode=block",
+ "Referrer-Policy" : "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy" : "default-src 'none'",
+ "X-GitHub-Request-Id" : "F6AC:12585:1435134:1835D1B:5E3306A3"
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/api/mappings/mapping-user-repos-O8W78.json b/src/test/resources/api/mappings/mapping-user-repos-O8W78.json
new file mode 100644
index 000000000..777aafc3e
--- /dev/null
+++ b/src/test/resources/api/mappings/mapping-user-repos-O8W78.json
@@ -0,0 +1,35 @@
+{
+ "id" : "ff960dbb-fe98-37d6-82ac-9f79ab7dd0de",
+ "request" : {
+ "urlPath" : "/user/repos",
+ "method" : "GET",
+ "basicAuth": {
+ "username": "git-user",
+ "password": "git-secret"
+ }
+ },
+ "response" : {
+ "status" : 200,
+ "bodyFileName" : "body-user-repos-O8W78.json",
+ "headers" : {
+ "Date" : "Fri, 31 Jan 2020 10:49:58 GMT",
+ "Content-Type" : "application/json; charset=utf-8",
+ "Server" : "GitHub.com",
+ "Status" : "200 OK",
+ "X-GitHub-Media-Type" : "github.v3; format=json",
+ "X-RateLimit-Limit" : "60",
+ "X-RateLimit-Remaining" : "54",
+ "X-RateLimit-Reset" : "1580469786",
+ "Access-Control-Expose-Headers" : "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type",
+ "Access-Control-Allow-Origin" : "*",
+ "Strict-Transport-Security" : "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options" : "deny",
+ "X-Content-Type-Options" : "nosniff",
+ "X-XSS-Protection" : "1; mode=block",
+ "Referrer-Policy" : "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy" : "default-src 'none'",
+ "X-GitHub-Request-Id" : "C1F9:C8CD:5FFC805:7325FB9:5E340656"
+ }
+ },
+ "uuid" : "ff960dbb-fe98-37d6-82ac-9f79ab7dd0de"
+}
\ No newline at end of file
diff --git a/src/test/resources/api/mappings/mapping-users-stephenc-repos.json b/src/test/resources/api/mappings/mapping-users-stephenc-repos.json
new file mode 100644
index 000000000..6f80e163a
--- /dev/null
+++ b/src/test/resources/api/mappings/mapping-users-stephenc-repos.json
@@ -0,0 +1,34 @@
+{
+ "request": {
+ "url": "/users/stephenc/repos?per_page=100",
+ "method": "GET"
+ },
+ "response": {
+ "status": 200,
+ "bodyFileName": "body-users-stephenc-repos.json",
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Tue, 06 Dec 2016 15:06:25 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "Transfer-Encoding": "chunked",
+ "Status": "200 OK",
+ "X-RateLimit-Limit": "600",
+ "X-RateLimit-Remaining": "600",
+ "X-RateLimit-Reset": "1481039662",
+ "Cache-Control": "public, max-age=60, s-maxage=60",
+ "Vary": ["Accept", "Accept-Encoding"],
+ "ETag": "W/\"91482e12d1cde431b38e0238d74dfa7b\"",
+ "Last-Modified": "Sat, 27 Feb 2016 07:57:23 GMT",
+ "X-GitHub-Media-Type": "github.v3; format=json",
+ "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval",
+ "Access-Control-Allow-Origin": "*",
+ "Content-Security-Policy": "default-src 'none'",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Content-Type-Options": "nosniff",
+ "X-Frame-Options": "deny",
+ "X-XSS-Protection": "1; mode=block",
+ "X-Served-By": "d256f86292c6dde5d09d15d926ec67a3",
+ "X-GitHub-Request-Id": "B2A7FE77:629C:AF96C1F:5846D3F0"
+ }
+ }
+}
From 70e681499f4ca21498079f8249f92b84febe9575 Mon Sep 17 00:00:00 2001
From: Karl Shultz
Date: Fri, 31 Jan 2020 11:14:18 -0500
Subject: [PATCH 02/49] Drafts of CONTRIBUTING and PULL_REQUEST_TEMPLATE
---
CONTRIBUTING.md | 106 +++++++++++++++++++++++++++++++++++++++
PULL_REQUEST_TEMPLATE.md | 19 +++++++
2 files changed, 125 insertions(+)
create mode 100644 CONTRIBUTING.md
create mode 100644 PULL_REQUEST_TEMPLATE.md
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 000000000..5fc55f88e
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,106 @@
+# Contributing to GitHub Branch Source
+Community pull requests are encouraged and welcomed! Following are some guidelines for what to expect.
+
+## Getting started
+For information on contributing to Jenkins in general, check out the
+[Beginner's Guide](https://wiki.jenkins-ci.org/display/JENKINS/Beginners+Guide+to+Contributing) to contributing to
+Jenkins. Also, please make sure to read the [Jenkins Code of Conduct](https://jenkins.io/project/conduct/). The main
+[jenkins.io website](https://jenkins.io/doc/developer) has lots of information about developing and extending Jenkins,
+including several [how-to guides](https://jenkins.io/doc/developer/guides/) about plugin development.
+
+## Being careful
+
+GitHub Branch Source is one of the most widely used plugins in the Jenkins plugin catalog.
+It is relied upon by hundreds of thousands of people worldwide. Because of this huge install
+base, caution must be exercised when making changes. Code changes are reviewed
+with a high level of scrutiny, out of necessity. This level of thoroughness should not be interpreted
+as a personal attack. (And, of course, if it is a personal attack, that's why we have the
+[Code of Conduct](https://jenkins.io/project/conduct/) in place).
+
+## How to submit your contribution
+
+Changes should come in the form of pull requests to the master branch of the main repository. Contributors
+may do so from the origin repository, e.g.
+`https://github.com/jenkinsci/github-branch-source-plugin`, or from their own fork, e.g.
+`https://github.com/firstTimeContributor/github-branch-source-plugin`.
+
+Changes should never be made directly to master. This holds true for all contributions,
+no matter the person or the change. Pull requests allow for easy code review.
+
+High-impact security patches may sometimes follow an accelerated process. The
+[Jenkins Security team's process](https://jenkins.io/security/) describes how to report, and
+work on, security vulnerabilities in Jenkins plugins.
+
+Any new functionality, API changes, or bug fixes must include adequate automated test coverage.
+If you feel that your pull request does not need its own test coverage, state this in
+the description, including the reason(s) why.
+
+Please use human-readable commit messages. When your code is being reviewed, a commit message like
+`Add unit test for whizBang.getSomethingAwesome` is far more useful than `testcase`.
+
+If your PR relies on open PRs in other plugins, please include references to them in your
+PR. This makes it easy for reviewers to navigate between all of the relevant PRs.
+
+## Associating changes with existing Jira issues
+
+If your PR is in response to an existing issue (bug, improvement, etc) in
+[the Jenkins JIRA](https://issues.jenkins-ci.org/secure/Dashboard.jspa), include the issue
+key in the subject line, with `[` `]` square brackets surrounding it. For example,
+`[JENKINS-12345] Improve GitHub Branch Source with fluxCapacitor module`. This keeps the issue
+easy to see in what can become a long list of PRs.
+
+## Creating a new Jira issue for your contribution
+
+When proposing new features or enhancements, potential contributors should file a Jira issue first,
+describing their proposed changes and potential implementation details. Consensus can be reached in
+the Jira issue before the PR is filed. This prevents surprising plugin maintainers, and prevents
+contributors from having large amounts of work refused.
+
+Trivial changes might not warrant filing a Jira issue; although there is no harm in filing
+one anyway. Larger changes, which have noticeable impact on your fellow users and developers,
+should always have a Jira issue filed for them. This Jira issue serves as a centralized
+location for discussion about the change.
+
+To give a sense of what constitutes a trivial change versus a larger one, here are some examples.
+This is not intended to be an all-inclusive list, but it should give an idea:
+
+| Trivial Changes, no Jira needed | Larger Changes, file a Jira |
+| --------------------------------|-------------------------------|
+| Additional test coverage | Entirely new functionality |
+| Spelling, Grammar, other typos | API Changes |
+| Edits to inline help | New or updated dependencies |
+| Cleaning up of unused imports | User Interface changes |
+
+## Testing your changes
+
+Before submitting your pull request, it needs to have been tested. This may take the form of
+the automated tests you've included in your pull request - _you did include tests, right?_
+To run your tests locally, simply building the plugin via `mvn clean install` will run all
+of its tests locally.
+
+Additionally, manual testing is welcomed and encouraged. If you've done some particularly clever
+testing of your changes, please describe that in the description of your pull request, so that
+your reviewers know what's already been done.
+
+Once submitted, your change will be built, and the plugin's tests will get run, on
+[ci.jenkins.io](https://ci.jenkins.io). GitHub will be notified of the results of this build,
+so you don't need to follow up and look for yourself. Your changes will be tested with combinations
+of Java 8 and 11, on Linux and Windows.
+
+## The code review process
+
+We promise to be thoughtful, professional, and reasonable, and the same is expected of all
+contributors. [Jenkins has a Code of Conduct](https://jenkins.io/project/conduct/), and we
+take that seriously. We want the Jenkins community to be an open and welcoming one, for all
+contributors, no matter how seasoned.
+
+In order to have your PR merged or considered for merging, you must respond to all actionable
+feedback.
+
+## Merging and releasing
+
+The process by which pull requests get merged to master is fairly simple, and is described
+in the [guide for releasing a plugin](https://jenkins.io/doc/developer/publishing/releasing/).
+In short, once changes are merged to master, a release can be generated. Final decisions
+on merging and releasing fall to the plugin's maintainer.
+
diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 000000000..5c6fc69e7
--- /dev/null
+++ b/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,19 @@
+# Description
+
+A brief summary describing the changes in this pull request. See
+[JENKINS-XXXXX](https://issues.jenkins-ci.org/browse/JENKINS-XXXXX) for further information.
+
+
+# Submitter checklist
+- [ ] Link to JIRA ticket in description, if appropriate.
+- [ ] Change is code complete and matches issue description
+- [ ] Automated tests have been added to exercise the changes
+- [ ] Reviewer's manual test instructions provided in PR description. See Reviewer's first task below.
+
+# Reviewer checklist
+- [ ] Run the changes and verify that the change matches the issue description
+- [ ] Reviewed the code
+- [ ] Verified that the appropriate tests have been written or valid explanation given
+
From 708d23ac18897494087c3f71c259919284cfe532 Mon Sep 17 00:00:00 2001
From: Karl Shultz
Date: Fri, 31 Jan 2020 11:44:37 -0500
Subject: [PATCH 03/49] Move the PR template to .github
---
.github/PULL_REQUEST_TEMPLATE.md | 27 +++++++++++++++++++--------
PULL_REQUEST_TEMPLATE.md | 19 -------------------
2 files changed, 19 insertions(+), 27 deletions(-)
delete mode 100644 PULL_REQUEST_TEMPLATE.md
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index f5252cae5..5c6fc69e7 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,8 +1,19 @@
-* JENKINS issue(s):
- * Issue link or n/a
-* Description:
- * ...
-* Documentation changes:
- * Link to related jenkins.io PR or explanation for why doc change not needed
-* Users/aliases to notify:
- * ...
+# Description
+
+A brief summary describing the changes in this pull request. See
+[JENKINS-XXXXX](https://issues.jenkins-ci.org/browse/JENKINS-XXXXX) for further information.
+
+
+# Submitter checklist
+- [ ] Link to JIRA ticket in description, if appropriate.
+- [ ] Change is code complete and matches issue description
+- [ ] Automated tests have been added to exercise the changes
+- [ ] Reviewer's manual test instructions provided in PR description. See Reviewer's first task below.
+
+# Reviewer checklist
+- [ ] Run the changes and verify that the change matches the issue description
+- [ ] Reviewed the code
+- [ ] Verified that the appropriate tests have been written or valid explanation given
+
diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 5c6fc69e7..000000000
--- a/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# Description
-
-A brief summary describing the changes in this pull request. See
-[JENKINS-XXXXX](https://issues.jenkins-ci.org/browse/JENKINS-XXXXX) for further information.
-
-
-# Submitter checklist
-- [ ] Link to JIRA ticket in description, if appropriate.
-- [ ] Change is code complete and matches issue description
-- [ ] Automated tests have been added to exercise the changes
-- [ ] Reviewer's manual test instructions provided in PR description. See Reviewer's first task below.
-
-# Reviewer checklist
-- [ ] Run the changes and verify that the change matches the issue description
-- [ ] Reviewed the code
-- [ ] Verified that the appropriate tests have been written or valid explanation given
-
From 3ca1520f42864b2a234071df0c92f2f25f6e2a42 Mon Sep 17 00:00:00 2001
From: Karl Shultz
Date: Fri, 31 Jan 2020 11:46:22 -0500
Subject: [PATCH 04/49] Moves CONTRIBUITNG to .github to override default org
one
---
CONTRIBUTING.md => .github/CONTRIBUTING.md | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename CONTRIBUTING.md => .github/CONTRIBUTING.md (100%)
diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md
similarity index 100%
rename from CONTRIBUTING.md
rename to .github/CONTRIBUTING.md
From 8a3929c91d815ec58654c70a6b9a8121840aa35d Mon Sep 17 00:00:00 2001
From: Nick Griffiths
Date: Sat, 1 Feb 2020 14:10:24 +0000
Subject: [PATCH 05/49] Use "ExcludeArchivedRepositories" More descriptive that
"ExcludeArchived".
---
...it.java => ExcludeArchivedRepositoriesTrait.java} | 12 ++++++------
.../github_branch_source/GitHubSCMNavigator.java | 12 ++++++------
.../GitHubSCMNavigatorContext.java | 12 ++++++------
.../plugins/github_branch_source/Messages.properties | 2 +-
.../github_branch_source/GitHubSCMNavigatorTest.java | 12 ++++++------
5 files changed, 25 insertions(+), 25 deletions(-)
rename src/main/java/org/jenkinsci/plugins/github_branch_source/{ExcludeArchivedTrait.java => ExcludeArchivedRepositoriesTrait.java} (77%)
diff --git a/src/main/java/org/jenkinsci/plugins/github_branch_source/ExcludeArchivedTrait.java b/src/main/java/org/jenkinsci/plugins/github_branch_source/ExcludeArchivedRepositoriesTrait.java
similarity index 77%
rename from src/main/java/org/jenkinsci/plugins/github_branch_source/ExcludeArchivedTrait.java
rename to src/main/java/org/jenkinsci/plugins/github_branch_source/ExcludeArchivedRepositoriesTrait.java
index af65d5013..9b446aaf9 100644
--- a/src/main/java/org/jenkinsci/plugins/github_branch_source/ExcludeArchivedTrait.java
+++ b/src/main/java/org/jenkinsci/plugins/github_branch_source/ExcludeArchivedRepositoriesTrait.java
@@ -13,13 +13,13 @@
/**
* A {@link Selection} trait that will restrict the discovery of repositories that have been archived.
*/
-public class ExcludeArchivedTrait extends SCMNavigatorTrait {
+public class ExcludeArchivedRepositoriesTrait extends SCMNavigatorTrait {
/**
* Constructor for stapler.
*/
@DataBoundConstructor
- public ExcludeArchivedTrait() {
+ public ExcludeArchivedRepositoriesTrait() {
}
/**
@@ -29,13 +29,13 @@ public ExcludeArchivedTrait() {
protected void decorateContext(SCMNavigatorContext, ?> context) {
super.decorateContext(context);
GitHubSCMNavigatorContext ctx = (GitHubSCMNavigatorContext) context;
- ctx.setExcludeArchived(true);
+ ctx.setExcludeArchivedRepositories(true);
}
/**
- * Excluded archived repositories filter
+ * Exclude archived repositories filter
*/
- @Symbol("archivedRepositoriesFilter")
+ @Symbol("gitHubExcludeArchivedRepositories")
@Extension
@Selection
public static class DescriptorImpl extends SCMNavigatorTraitDescriptor {
@@ -48,7 +48,7 @@ public Class extends SCMNavigatorContext> getContextClass() {
@Nonnull
@Override
public String getDisplayName() {
- return Messages.ExcludeArchivedTrait_displayName();
+ return Messages.ExcludeArchivedRepositoriesTrait_displayName();
}
}
}
diff --git a/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java b/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java
index af4a41d1d..4b7e60d82 100644
--- a/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java
+++ b/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java
@@ -952,7 +952,7 @@ public void visitSources(SCMSourceObserver observer) throws IOException, Interru
continue; // ignore repos in other orgs when using GHMyself
}
- if (repo.isArchived() && gitHubSCMNavigatorContext.isExcludeArchived()) {
+ if (repo.isArchived() && gitHubSCMNavigatorContext.isExcludeArchivedRepositories()) {
witness.record(repo.getName(), false);
listener.getLogger()
.println(GitHubConsoleNote.create(System.currentTimeMillis(), String.format(
@@ -987,7 +987,7 @@ public void visitSources(SCMSourceObserver observer) throws IOException, Interru
for (GHRepository repo : repositories) {
Connector.checkApiRateLimit(listener, github);
- if (repo.isArchived() && gitHubSCMNavigatorContext.isExcludeArchived()) {
+ if (repo.isArchived() && gitHubSCMNavigatorContext.isExcludeArchivedRepositories()) {
witness.record(repo.getName(), false);
listener.getLogger()
.println(GitHubConsoleNote.create(System.currentTimeMillis(), String.format(
@@ -1018,7 +1018,7 @@ public void visitSources(SCMSourceObserver observer) throws IOException, Interru
for (GHRepository repo : user.listRepositories(100)) {
Connector.checkApiRateLimit(listener, github);
- if (repo.isArchived() && gitHubSCMNavigatorContext.isExcludeArchived()) {
+ if (repo.isArchived() && gitHubSCMNavigatorContext.isExcludeArchivedRepositories()) {
witness.record(repo.getName(), false);
listener.getLogger()
.println(GitHubConsoleNote.create(System.currentTimeMillis(), String.format(
@@ -1116,7 +1116,7 @@ public void visitSource(String sourceName, SCMSourceObserver observer)
GHRepository repo = myself.getRepository(sourceName);
if (repo != null && repo.getOwnerName().equals(repoOwner)) {
- if (repo.isArchived() && gitHubSCMNavigatorContext.isExcludeArchived()) {
+ if (repo.isArchived() && gitHubSCMNavigatorContext.isExcludeArchivedRepositories()) {
witness.record(repo.getName(), false);
listener.getLogger()
.println(GitHubConsoleNote.create(System.currentTimeMillis(), String.format(
@@ -1146,7 +1146,7 @@ public void visitSource(String sourceName, SCMSourceObserver observer)
GHRepository repo = org.getRepository(sourceName);
if (repo != null) {
- if (repo.isArchived() && gitHubSCMNavigatorContext.isExcludeArchived()) {
+ if (repo.isArchived() && gitHubSCMNavigatorContext.isExcludeArchivedRepositories()) {
witness.record(repo.getName(), false);
listener.getLogger()
.println(GitHubConsoleNote.create(System.currentTimeMillis(), String.format(
@@ -1178,7 +1178,7 @@ public void visitSource(String sourceName, SCMSourceObserver observer)
GHRepository repo = user.getRepository(sourceName);
if (repo != null) {
- if (repo.isArchived() && gitHubSCMNavigatorContext.isExcludeArchived()) {
+ if (repo.isArchived() && gitHubSCMNavigatorContext.isExcludeArchivedRepositories()) {
witness.record(repo.getName(), false);
listener.getLogger()
.println(GitHubConsoleNote.create(System.currentTimeMillis(), String.format(
diff --git a/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigatorContext.java b/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigatorContext.java
index a864e7523..478203aad 100644
--- a/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigatorContext.java
+++ b/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigatorContext.java
@@ -43,7 +43,7 @@ public class GitHubSCMNavigatorContext extends SCMNavigatorContext projectNames = new HashSet<>();
final SCMSourceObserver observer = getObserver(projectNames);
@@ -232,7 +232,7 @@ public void fetchOneRepo_BelongingToOrg() throws Exception {
@Test
public void fetchOneRepo_BelongingToOrg_ExcludingArchived() throws Exception {
- navigator.setTraits(Collections.singletonList(new ExcludeArchivedTrait()));
+ navigator.setTraits(Collections.singletonList(new ExcludeArchivedRepositoriesTrait()));
final Set projectNames = new HashSet<>();
final SCMSourceObserver observer = getObserver(projectNames);
@@ -255,7 +255,7 @@ public void fetchOneRepo_BelongingToUser() throws Exception {
@Test
public void fetchOneRepo_BelongingToUser_ExcludingArchived() throws Exception {
navigator = navigatorForRepoOwner("stephenc", null);
- navigator.setTraits(Collections.singletonList(new ExcludeArchivedTrait()));
+ navigator.setTraits(Collections.singletonList(new ExcludeArchivedRepositoriesTrait()));
final Set projectNames = new HashSet<>();
final SCMSourceObserver observer = getObserver(projectNames);
@@ -280,7 +280,7 @@ public void fetchRepos_BelongingToAuthenticatedUser() throws Exception {
public void fetchRepos_BelongingToAuthenticatedUser_ExcludingArchived() throws Exception {
setCredentials(Collections.singletonList(credentials));
navigator = navigatorForRepoOwner("stephenc", credentials.getId());
- navigator.setTraits(Collections.singletonList(new ExcludeArchivedTrait()));
+ navigator.setTraits(Collections.singletonList(new ExcludeArchivedRepositoriesTrait()));
final Set projectNames = new HashSet<>();
final SCMSourceObserver observer = getObserver(projectNames);
@@ -302,7 +302,7 @@ public void fetchRepos_BelongingToOrg() throws Exception {
@Test
public void fetchRepos_BelongingToOrg_ExcludingArchived() throws Exception {
- navigator.setTraits(Collections.singletonList(new ExcludeArchivedTrait()));
+ navigator.setTraits(Collections.singletonList(new ExcludeArchivedRepositoriesTrait()));
final Set projectNames = new HashSet<>();
final SCMSourceObserver observer = getObserver(projectNames);
@@ -326,7 +326,7 @@ public void fetchRepos_BelongingToUser() throws Exception {
@Test
public void fetchRepos_BelongingToUser_ExcludingArchived() throws Exception {
navigator = navigatorForRepoOwner("stephenc", null);
- navigator.setTraits(Collections.singletonList(new ExcludeArchivedTrait()));
+ navigator.setTraits(Collections.singletonList(new ExcludeArchivedRepositoriesTrait()));
final Set projectNames = new HashSet<>();
final SCMSourceObserver observer = getObserver(projectNames);
From 9a69bb38bd12b69e2802f1de6a992f66245d054a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ren=C3=A9=20Scheibe?=
Date: Sun, 2 Feb 2020 11:30:05 +0100
Subject: [PATCH 06/49] Improve help texts
- wording
- formatting
- consistency
---
.../help-strategyId.html | 6 ++---
.../help-credentialsId.html | 6 ++---
.../GitHubSCMSource/help-credentialsId.html | 6 ++---
.../GitHubSCMSource/help-repositoryUrl.html | 22 +++++++++++++------
.../help-strategyId.html | 6 ++---
5 files changed, 27 insertions(+), 19 deletions(-)
diff --git a/src/main/resources/org/jenkinsci/plugins/github_branch_source/ForkPullRequestDiscoveryTrait/help-strategyId.html b/src/main/resources/org/jenkinsci/plugins/github_branch_source/ForkPullRequestDiscoveryTrait/help-strategyId.html
index e8db8435a..0600c53a7 100644
--- a/src/main/resources/org/jenkinsci/plugins/github_branch_source/ForkPullRequestDiscoveryTrait/help-strategyId.html
+++ b/src/main/resources/org/jenkinsci/plugins/github_branch_source/ForkPullRequestDiscoveryTrait/help-strategyId.html
@@ -3,16 +3,16 @@
- Merging the pull request with the current target branch revision
- Discover each pull request once with the discovered revision corresponding to the result of merging with the
- current revision of the target branch
+ current revision of the target branch.
- The current pull request revision
- Discover each pull request once with the discovered revision corresponding to the pull request head revision
- without merging
+ without merging.
- Both the current pull request revision and the pull request merged with the current target branch revision
- Discover each pull request twice. The first discovered revision corresponds to the result of merging with
the current revision of the target branch in each scan. The second parallel discovered revision corresponds
- to the pull request head revision without merging
+ to the pull request head revision without merging.
diff --git a/src/main/resources/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator/help-credentialsId.html b/src/main/resources/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator/help-credentialsId.html
index 91b423287..a77b93fbd 100644
--- a/src/main/resources/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator/help-credentialsId.html
+++ b/src/main/resources/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator/help-credentialsId.html
@@ -5,8 +5,8 @@
Note that only "username with password" credentials are supported.
- Existing credentials of other kinds will be filtered out. This is because jenkins
- exercises GitHub API, and this last one does not support other ways of authentication.
+ Existing credentials of other kinds will be filtered out. This is because Jenkins
+ uses the GitHub API, which does not support other ways of authentication.
If none is given, only the public repositories will be scanned, and commit status
@@ -14,7 +14,7 @@
If your organization contains private repositories, then you need to specify
- a credential from an user who have access to those repositories. This is done
+ a credential from a user who has access to those repositories. This is done
by creating a "username with password" credential where the password is
GitHub personal access tokens.
The necessary scope is "repo".
diff --git a/src/main/resources/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource/help-credentialsId.html b/src/main/resources/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource/help-credentialsId.html
index 91b423287..a77b93fbd 100644
--- a/src/main/resources/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource/help-credentialsId.html
+++ b/src/main/resources/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource/help-credentialsId.html
@@ -5,8 +5,8 @@
Note that only "username with password" credentials are supported.
- Existing credentials of other kinds will be filtered out. This is because jenkins
- exercises GitHub API, and this last one does not support other ways of authentication.
+ Existing credentials of other kinds will be filtered out. This is because Jenkins
+ uses the GitHub API, which does not support other ways of authentication.
If none is given, only the public repositories will be scanned, and commit status
@@ -14,7 +14,7 @@
If your organization contains private repositories, then you need to specify
- a credential from an user who have access to those repositories. This is done
+ a credential from a user who has access to those repositories. This is done
by creating a "username with password" credential where the password is
GitHub personal access tokens.
The necessary scope is "repo".
diff --git a/src/main/resources/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource/help-repositoryUrl.html b/src/main/resources/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource/help-repositoryUrl.html
index c0436084c..53a0322b4 100644
--- a/src/main/resources/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource/help-repositoryUrl.html
+++ b/src/main/resources/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource/help-repositoryUrl.html
@@ -1,9 +1,17 @@
-
Specify the HTTPS URL of the GitHub Organization/User and repository.
-
Github examples:
-
https://github.com/jenkinsci/github-branch-source-plugin
-
https://github.com/jenkinsci/github-branch-source-plugin.git
-
Github Enterprise examples:
-
https://myccompany.github.com/jenkinsci/github-branch-source-plugin
-
https://myccompany.github.com/jenkinsci/github-branch-source-plugin.git
+
Specify the HTTPS URL of the GitHub Organization / User Account and repository.
+
+ GitHub examples:
+
+ - https://github.com/jenkinsci/github-branch-source-plugin
+ - https://github.com/jenkinsci/github-branch-source-plugin.git
+
+
+
+ GitHub Enterprise examples:
+
+ - https://myccompany.github.com/jenkinsci/github-branch-source-plugin
+ - https://myccompany.github.com/jenkinsci/github-branch-source-plugin.git
+
+
diff --git a/src/main/resources/org/jenkinsci/plugins/github_branch_source/OriginPullRequestDiscoveryTrait/help-strategyId.html b/src/main/resources/org/jenkinsci/plugins/github_branch_source/OriginPullRequestDiscoveryTrait/help-strategyId.html
index e8db8435a..0600c53a7 100644
--- a/src/main/resources/org/jenkinsci/plugins/github_branch_source/OriginPullRequestDiscoveryTrait/help-strategyId.html
+++ b/src/main/resources/org/jenkinsci/plugins/github_branch_source/OriginPullRequestDiscoveryTrait/help-strategyId.html
@@ -3,16 +3,16 @@
- Merging the pull request with the current target branch revision
- Discover each pull request once with the discovered revision corresponding to the result of merging with the
- current revision of the target branch
+ current revision of the target branch.
- The current pull request revision
- Discover each pull request once with the discovered revision corresponding to the pull request head revision
- without merging
+ without merging.
- Both the current pull request revision and the pull request merged with the current target branch revision
- Discover each pull request twice. The first discovered revision corresponds to the result of merging with
the current revision of the target branch in each scan. The second parallel discovered revision corresponds
- to the pull request head revision without merging
+ to the pull request head revision without merging.
From dd3d0c950b4730135696ff123aca0bcbac97b4b3 Mon Sep 17 00:00:00 2001
From: Liam Newman
Date: Mon, 3 Feb 2020 12:24:30 -0800
Subject: [PATCH 07/49] Move to release 2.6.0-SNAPSHOT
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 75ee51b84..a70e64569 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
- 2.5.9
+ 2.6.0
-SNAPSHOT
2.2.0
8
From 2cf5718fd44d8486fb049360c480a82ce65b0d77 Mon Sep 17 00:00:00 2001
From: Liam Newman
Date: Mon, 3 Feb 2020 12:34:05 -0800
Subject: [PATCH 08/49] [maven-release-plugin] prepare release
github-branch-source-2.6.0
---
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index a70e64569..41bb2c795 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,7 +8,7 @@
github-branch-source
- ${revision}${changelist}
+ 2.6.0
hpi
GitHub Branch Source Plugin
https://github.com/jenkinsci/${project.artifactId}-plugin
@@ -36,7 +36,7 @@
scm:git:git://github.com/jenkinsci/${project.artifactId}-plugin.git
scm:git:git@github.com:jenkinsci/${project.artifactId}-plugin.git
https://github.com/jenkinsci/${project.artifactId}-plugin
- ${scmTag}
+ github-branch-source-2.6.0
From 30caec7f5326a58d1bdfa13d36c3f6e4533cb4a9 Mon Sep 17 00:00:00 2001
From: Liam Newman
Date: Mon, 3 Feb 2020 12:34:19 -0800
Subject: [PATCH 09/49] [maven-release-plugin] prepare for next development
iteration
---
pom.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index 41bb2c795..dbbab0a0f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,7 +8,7 @@
github-branch-source
- 2.6.0
+ ${revision}${changelist}
hpi
GitHub Branch Source Plugin
https://github.com/jenkinsci/${project.artifactId}-plugin
@@ -21,7 +21,7 @@
- 2.6.0
+ 2.6.1
-SNAPSHOT
2.2.0
8
@@ -36,7 +36,7 @@
scm:git:git://github.com/jenkinsci/${project.artifactId}-plugin.git
scm:git:git@github.com:jenkinsci/${project.artifactId}-plugin.git
https://github.com/jenkinsci/${project.artifactId}-plugin
- github-branch-source-2.6.0
+ ${scmTag}
From e1a15b0ff32d317e04364ec2f6ee2ab1adceb234 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ren=C3=A9=20Scheibe?=
Date: Mon, 3 Feb 2020 22:05:18 +0100
Subject: [PATCH 10/49] Improve Javascript code
- add missing semicolons
- consistent formatting
- explicit variable declaration
---
src/main/webapp/github-scm-source.js | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/main/webapp/github-scm-source.js b/src/main/webapp/github-scm-source.js
index 9e3893d10..1025f39a0 100644
--- a/src/main/webapp/github-scm-source.js
+++ b/src/main/webapp/github-scm-source.js
@@ -15,35 +15,35 @@ Behaviour.specify("input[name$=_configuredByUrlRadio]", 'GitHubSCMSourceRadioCon
}
}
return e;
- }
+ };
// Todo: Replace with a query selector?
var findNeighboringDynamicInput = function(e) {
var inputTbody = getNthParent(e, 4 /*tbody > tr > td > label > input*/);
if (inputTbody) {
// input hidden is always in the 4th position
- var hiddenBlock = inputTbody.childNodes[4].firstElementChild.firstElementChild
+ var hiddenBlock = inputTbody.childNodes[4].firstElementChild.firstElementChild;
return hiddenBlock
}
- }
+ };
var neighboringDynamicInput = findNeighboringDynamicInput(e);
if (neighboringDynamicInput) {
e.onclick = function() {
neighboringDynamicInput.value = e.value;
// When changing to true the event is triggered.
- if(e.value == "false"){
+ if (e.value == "false") {
// When changing to false a trigger has to be fired in order to fetch the repos from the backend
if (document.createEvent) {
- oEvent = document.createEvent("HTMLEvents");
+ var oEvent = document.createEvent("HTMLEvents");
oEvent.initEvent("change");
// Gets the first Jelly entry afte the hidden value
- var repoOwner = getNthParent(e, 3).nextElementSibling.nextElementSibling.childNodes[2].firstElementChild
+ var repoOwner = getNthParent(e, 3).nextElementSibling.nextElementSibling.childNodes[2].firstElementChild;
// if the first entry is a select for API URI, gets the following one (each Jelly entry has 3 elements)
- if (repoOwner == null || repoOwner.tagName == "SELECT"){
- repoOwner = getNthParent(e, 3).nextElementSibling.nextElementSibling.nextElementSibling.nextElementSibling.nextElementSibling.childNodes[2].firstElementChild
+ if (repoOwner == null || repoOwner.tagName == "SELECT") {
+ repoOwner = getNthParent(e, 3).nextElementSibling.nextElementSibling.nextElementSibling.nextElementSibling.nextElementSibling.childNodes[2].firstElementChild;
}
- if( repoOwner != null) {
+ if (repoOwner != null) {
// fire a onchange event on the repoOwner input test to get the repos from backend
repoOwner.dispatchEvent(oEvent);
}
From f511d7c45e0a1ad1c33bbbe61a95199c515f6988 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ren=C3=A9=20Scheibe?=
Date: Mon, 3 Feb 2020 23:26:41 +0100
Subject: [PATCH 11/49] Remove redundant type arguments
They can be inferred by the compiler.
---
.../GitHubConfiguration.java | 4 +-
.../GitHubSCMSourceContext.java | 2 +-
.../GitHubSCMSourceRequest.java | 8 +-
.../PushGHEventSubscriber.java | 6 +-
.../ForkPullRequestDiscoveryTrait2Test.java | 2 +-
.../ForkPullRequestDiscoveryTraitTest.java | 12 +-
.../GitHubNotificationTest.java | 10 +-
.../GitHubSCMBuilderTest.java | 5 +-
.../GitHubSCMNavigatorTest.java | 8 +-
.../GitHubSCMNavigatorTraitsTest.java | 442 +++++++++---------
.../GitHubSCMSourceTest.java | 16 +-
.../GitHubSCMSourceTraitsTest.java | 388 +++++++--------
.../OriginPullRequestDiscoveryTraitTest.java | 10 +-
13 files changed, 452 insertions(+), 461 deletions(-)
diff --git a/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubConfiguration.java b/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubConfiguration.java
index 8ac058bb7..74db1d6a9 100644
--- a/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubConfiguration.java
+++ b/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubConfiguration.java
@@ -63,7 +63,7 @@ public GitHubConfiguration() {
@NonNull
public synchronized List getEndpoints() {
- return endpoints == null ? Collections.emptyList() : Collections.unmodifiableList(endpoints);
+ return endpoints == null ? Collections.emptyList() : Collections.unmodifiableList(endpoints);
}
@NonNull
@@ -122,7 +122,7 @@ public static String normalizeApiUri(@CheckForNull String apiUri) {
}
public synchronized void setEndpoints(@CheckForNull List endpoints) {
- endpoints = new ArrayList(endpoints == null ? Collections.emptyList() : endpoints);
+ endpoints = new ArrayList(endpoints == null ? Collections.emptyList() : endpoints);
// remove duplicates and empty urls
Set apiUris = new HashSet();
for (Iterator iterator = endpoints.iterator(); iterator.hasNext(); ) {
diff --git a/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSourceContext.java b/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSourceContext.java
index 2f4c7c532..9f251cf35 100644
--- a/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSourceContext.java
+++ b/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSourceContext.java
@@ -165,7 +165,7 @@ public final Set forkPRStrategies() {
*/
public final List notificationStrategies() {
if (notificationStrategies.isEmpty()) {
- return Collections.singletonList(new DefaultGitHubNotificationStrategy());
+ return Collections.singletonList(new DefaultGitHubNotificationStrategy());
}
return Collections.unmodifiableList(notificationStrategies);
}
diff --git a/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSourceRequest.java b/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSourceRequest.java
index 0f615f017..20a9aec58 100644
--- a/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSourceRequest.java
+++ b/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSourceRequest.java
@@ -153,10 +153,10 @@ public class GitHubSCMSourceRequest extends SCMSourceRequest {
fetchForkPRs = context.wantForkPRs();
originPRStrategies = fetchOriginPRs && !context.originPRStrategies().isEmpty()
? Collections.unmodifiableSet(EnumSet.copyOf(context.originPRStrategies()))
- : Collections.emptySet();
+ : Collections.emptySet();
forkPRStrategies = fetchForkPRs && !context.forkPRStrategies().isEmpty()
? Collections.unmodifiableSet(EnumSet.copyOf(context.forkPRStrategies()))
- : Collections.emptySet();
+ : Collections.emptySet();
Set includes = context.observer().getIncludes();
if (includes != null) {
Set pullRequestNumbers = new HashSet<>(includes.size());
@@ -258,9 +258,9 @@ public final Set getForkPRStrategies() {
@NonNull
public final Set getPRStrategies(boolean fork) {
if (fork) {
- return fetchForkPRs ? getForkPRStrategies() : Collections.emptySet();
+ return fetchForkPRs ? getForkPRStrategies() : Collections.emptySet();
}
- return fetchOriginPRs ? getOriginPRStrategies() : Collections.emptySet();
+ return fetchOriginPRs ? getOriginPRStrategies() : Collections.emptySet();
}
/**
diff --git a/src/main/java/org/jenkinsci/plugins/github_branch_source/PushGHEventSubscriber.java b/src/main/java/org/jenkinsci/plugins/github_branch_source/PushGHEventSubscriber.java
index d2d32dc0a..d88144700 100644
--- a/src/main/java/org/jenkinsci/plugins/github_branch_source/PushGHEventSubscriber.java
+++ b/src/main/java/org/jenkinsci/plugins/github_branch_source/PushGHEventSubscriber.java
@@ -319,8 +319,7 @@ && isApiMatch(((GitHubSCMSource) source).getApiUri())
}
}
if (!excluded) {
- return Collections.singletonMap(head,
- new AbstractGitSCMSource.SCMRevisionImpl(head, push.getHead()));
+ return Collections.singletonMap(head, new AbstractGitSCMSource.SCMRevisionImpl(head, push.getHead()));
}
}
if (context.wantTags() && ref.startsWith(R_TAGS)) {
@@ -352,8 +351,7 @@ && isApiMatch(((GitHubSCMSource) source).getApiUri())
}
}
if (!excluded) {
- return Collections.singletonMap(head,
- new GitTagSCMRevision(head, push.getHead()));
+ return Collections.singletonMap(head, new GitTagSCMRevision(head, push.getHead()));
}
}
return Collections.emptyMap();
diff --git a/src/test/java/org/jenkinsci/plugins/github_branch_source/ForkPullRequestDiscoveryTrait2Test.java b/src/test/java/org/jenkinsci/plugins/github_branch_source/ForkPullRequestDiscoveryTrait2Test.java
index c03fa0bc5..b6681bf2c 100644
--- a/src/test/java/org/jenkinsci/plugins/github_branch_source/ForkPullRequestDiscoveryTrait2Test.java
+++ b/src/test/java/org/jenkinsci/plugins/github_branch_source/ForkPullRequestDiscoveryTrait2Test.java
@@ -74,7 +74,7 @@ private void assertRoundTrip(WorkflowMultiBranchProject p, SCMHeadAuthority su
s = new GitHubSCMSource("nobody", "nowhere", null, false);
p.setSourcesList(Collections.singletonList(new BranchSource(s)));
- s.setTraits(Collections.singletonList(new ForkPullRequestDiscoveryTrait(0, trust)));
+ s.setTraits(Collections.singletonList(new ForkPullRequestDiscoveryTrait(0, trust)));
r.configRoundtrip(p);
List traits = ((GitHubSCMSource) p.getSourcesList().get(0).getSource()).getTraits();
assertEquals(1, traits.size());
diff --git a/src/test/java/org/jenkinsci/plugins/github_branch_source/ForkPullRequestDiscoveryTraitTest.java b/src/test/java/org/jenkinsci/plugins/github_branch_source/ForkPullRequestDiscoveryTraitTest.java
index 8a91615c3..14a92c506 100644
--- a/src/test/java/org/jenkinsci/plugins/github_branch_source/ForkPullRequestDiscoveryTraitTest.java
+++ b/src/test/java/org/jenkinsci/plugins/github_branch_source/ForkPullRequestDiscoveryTraitTest.java
@@ -44,8 +44,7 @@ public void given__disoverHeadMerge__when__appliedToContext__then__strategiesCor
assertThat(ctx.wantPRs(), is(true));
assertThat(ctx.prefilters(), is(Collections.emptyList()));
assertThat(ctx.filters(), is(Collections.emptyList()));
- assertThat(ctx.forkPRStrategies(),
- Matchers.>is(EnumSet.allOf(ChangeRequestCheckoutStrategy.class)));
+ assertThat(ctx.forkPRStrategies(), Matchers.is(EnumSet.allOf(ChangeRequestCheckoutStrategy.class)));
assertThat(ctx.authorities(), (Matcher) hasItem(
instanceOf(ForkPullRequestDiscoveryTrait.TrustContributors.class)
));
@@ -70,8 +69,7 @@ public void given__disoverHeadOnly__when__appliedToContext__then__strategiesCorr
assertThat(ctx.wantPRs(), is(true));
assertThat(ctx.prefilters(), is(Collections.emptyList()));
assertThat(ctx.filters(), is(Collections.emptyList()));
- assertThat(ctx.forkPRStrategies(),
- Matchers.>is(EnumSet.of(ChangeRequestCheckoutStrategy.HEAD)));
+ assertThat(ctx.forkPRStrategies(), Matchers.is(EnumSet.of(ChangeRequestCheckoutStrategy.HEAD)));
assertThat(ctx.authorities(), (Matcher) hasItem(
instanceOf(ForkPullRequestDiscoveryTrait.TrustContributors.class)
));
@@ -96,8 +94,7 @@ public void given__disoverMergeOnly__when__appliedToContext__then__strategiesCor
assertThat(ctx.wantPRs(), is(true));
assertThat(ctx.prefilters(), is(Collections.emptyList()));
assertThat(ctx.filters(), is(Collections.emptyList()));
- assertThat(ctx.forkPRStrategies(),
- Matchers.>is(EnumSet.of(ChangeRequestCheckoutStrategy.MERGE)));
+ assertThat(ctx.forkPRStrategies(), Matchers.is(EnumSet.of(ChangeRequestCheckoutStrategy.MERGE)));
assertThat(ctx.authorities(), (Matcher) hasItem(
instanceOf(ForkPullRequestDiscoveryTrait.TrustContributors.class)
));
@@ -122,8 +119,7 @@ public void given__nonDefaultTrust__when__appliedToContext__then__authoritiesCor
assertThat(ctx.wantPRs(), is(true));
assertThat(ctx.prefilters(), is(Collections.emptyList()));
assertThat(ctx.filters(), is(Collections.emptyList()));
- assertThat(ctx.forkPRStrategies(),
- Matchers.>is(EnumSet.allOf(ChangeRequestCheckoutStrategy.class)));
+ assertThat(ctx.forkPRStrategies(), Matchers.is(EnumSet.allOf(ChangeRequestCheckoutStrategy.class)));
assertThat(ctx.authorities(), (Matcher) hasItem(
instanceOf(ForkPullRequestDiscoveryTrait.TrustEveryone.class)
));
diff --git a/src/test/java/org/jenkinsci/plugins/github_branch_source/GitHubNotificationTest.java b/src/test/java/org/jenkinsci/plugins/github_branch_source/GitHubNotificationTest.java
index f42276e9e..03f9c023c 100644
--- a/src/test/java/org/jenkinsci/plugins/github_branch_source/GitHubNotificationTest.java
+++ b/src/test/java/org/jenkinsci/plugins/github_branch_source/GitHubNotificationTest.java
@@ -59,7 +59,7 @@ public void given__defaultNotificationStrategy__when__appliedToContext__then__du
public void given__emptyStrategiesList__when__appliedToContext__then__defaultApplied() throws Exception {
GitHubSCMSourceContext ctx = new GitHubSCMSourceContext(null, SCMHeadObserver.none());
assumeThat(ctx.notificationStrategies().size(), is(1));
- ctx.withNotificationStrategies(Collections.emptyList());
+ ctx.withNotificationStrategies(Collections.emptyList());
assertThat(ctx.notificationStrategies().size(), is(1));
}
@@ -67,7 +67,7 @@ public void given__emptyStrategiesList__when__appliedToContext__then__defaultApp
public void given__defaultStrategy__when__emptyStrategyList__then__strategyAdded() throws Exception {
GitHubSCMSourceContext ctx = new GitHubSCMSourceContext(null, SCMHeadObserver.none());
assumeThat(ctx.notificationStrategies().size(), is(1));
- ctx.withNotificationStrategies(Collections.emptyList());
+ ctx.withNotificationStrategies(Collections.emptyList());
assertThat(ctx.notificationStrategies().size(), is(1));
ctx.withNotificationStrategy(new DefaultGitHubNotificationStrategy());
assertThat(ctx.notificationStrategies().size(), is(1));
@@ -77,9 +77,9 @@ public void given__defaultStrategy__when__emptyStrategyList__then__strategyAdded
public void given__defaultStrategyList__when__emptyStrategyList__then__strategyAdded() throws Exception {
GitHubSCMSourceContext ctx = new GitHubSCMSourceContext(null, SCMHeadObserver.none());
assumeThat(ctx.notificationStrategies().size(), is(1));
- ctx.withNotificationStrategies(Collections.emptyList());
+ ctx.withNotificationStrategies(Collections.emptyList());
assertThat(ctx.notificationStrategies().size(), is(1));
- ctx.withNotificationStrategies(Collections.singletonList(new DefaultGitHubNotificationStrategy()));
+ ctx.withNotificationStrategies(Collections.singletonList(new DefaultGitHubNotificationStrategy()));
assertThat(ctx.notificationStrategies().size(), is(1));
}
@@ -90,7 +90,7 @@ public void given__customStrategy__when__emptyStrategyList__then__noDefaultStrat
ctx.withNotificationStrategy(new TestNotificationStrategy());
List strategies = ctx.notificationStrategies();
assertThat(strategies.size(), is(1));
- assertThat(strategies.get(0), Matchers.instanceOf(TestNotificationStrategy.class));
+ assertThat(strategies.get(0), Matchers.instanceOf(TestNotificationStrategy.class));
}
private final class TestNotificationStrategy extends AbstractGitHubNotificationStrategy {
diff --git a/src/test/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMBuilderTest.java b/src/test/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMBuilderTest.java
index fa5c0a98a..9d9d9b754 100644
--- a/src/test/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMBuilderTest.java
+++ b/src/test/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMBuilderTest.java
@@ -90,13 +90,12 @@ public void setUp() throws IOException {
Credentials sshPrivateKeyCredential = new BasicSSHUserPrivateKey(CredentialsScope.GLOBAL, "user-key", "git",
new BasicSSHUserPrivateKey.UsersPrivateKeySource(), null, null);
SystemCredentialsProvider.getInstance().setDomainCredentialsMap(Collections.singletonMap(Domain.global(),
- Arrays.asList(userPasswordCredential, sshPrivateKeyCredential)));
+ Arrays.asList(userPasswordCredential, sshPrivateKeyCredential)));
}
@After
public void tearDown() throws IOException, InterruptedException {
- SystemCredentialsProvider.getInstance()
- .setDomainCredentialsMap(Collections.>emptyMap());
+ SystemCredentialsProvider.getInstance().setDomainCredentialsMap(Collections.emptyMap());
owner.delete();
}
diff --git a/src/test/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigatorTest.java b/src/test/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigatorTest.java
index 9ffbe5570..645b7a08f 100644
--- a/src/test/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigatorTest.java
+++ b/src/test/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigatorTest.java
@@ -347,12 +347,12 @@ public void appliesFilters() throws Exception {
@Test
public void fetchActions() throws Exception {
- assertThat(navigator.fetchActions(Mockito.mock(SCMNavigatorOwner.class), null, null), Matchers.containsInAnyOrder(
- Matchers.is(
+ assertThat(navigator.fetchActions(Mockito.mock(SCMNavigatorOwner.class), null, null), Matchers.containsInAnyOrder(
+ Matchers.is(
new ObjectMetadataAction("CloudBeers, Inc.", null, "https://github.com/cloudbeers")
),
- Matchers.is(new GitHubOrgMetadataAction("https://avatars.githubusercontent.com/u/4181899?v=3")),
- Matchers.is(new GitHubLink("icon-github-logo", "https://github.com/cloudbeers"))));
+ Matchers.is(new GitHubOrgMetadataAction("https://avatars.githubusercontent.com/u/4181899?v=3")),
+ Matchers.is(new GitHubLink("icon-github-logo", "https://github.com/cloudbeers"))));
}
@Test
diff --git a/src/test/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigatorTraitsTest.java b/src/test/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigatorTraitsTest.java
index 807c7b228..fbd0ee050 100644
--- a/src/test/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigatorTraitsTest.java
+++ b/src/test/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigatorTraitsTest.java
@@ -69,16 +69,16 @@ public void basic_cloud() throws Exception {
not(hasItem(Matchers.>instanceOf(RegexSCMSourceFilterTrait.class))));
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2)),
hasProperty("trust", instanceOf(ForkPullRequestDiscoveryTrait.TrustPermission.class))
@@ -113,21 +113,21 @@ public void basic_server() throws Exception {
not(hasItem(Matchers.>instanceOf(RegexSCMSourceFilterTrait.class))));
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2)),
hasProperty("trust", instanceOf(ForkPullRequestDiscoveryTrait.TrustPermission.class))
),
- Matchers.>allOf(
+ Matchers.allOf(
Matchers.instanceOf(SSHCheckoutTrait.class),
hasProperty("credentialsId", is("8b2e4f77-39c5-41a9-b63b-8d367350bfdf"))
)
@@ -161,21 +161,21 @@ public void use_agent_checkout() throws Exception {
not(hasItem(Matchers.>instanceOf(RegexSCMSourceFilterTrait.class))));
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2)),
hasProperty("trust", instanceOf(ForkPullRequestDiscoveryTrait.TrustPermission.class))
),
- Matchers.>allOf(
+ Matchers.allOf(
Matchers.instanceOf(SSHCheckoutTrait.class),
hasProperty("credentialsId", is(nullValue()))
)
@@ -212,16 +212,16 @@ public void same_checkout_credentials() throws Exception {
not(hasItem(Matchers.>instanceOf(RegexSCMSourceFilterTrait.class))));
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2)),
hasProperty("trust", instanceOf(ForkPullRequestDiscoveryTrait.TrustPermission.class))
@@ -253,25 +253,25 @@ public void limit_repositories() throws Exception {
);
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2)),
hasProperty("trust", instanceOf(ForkPullRequestDiscoveryTrait.TrustPermission.class))
),
- Matchers.>allOf(
+ Matchers.allOf(
Matchers.instanceOf(SSHCheckoutTrait.class),
hasProperty("credentialsId", is("8b2e4f77-39c5-41a9-b63b-8d367350bfdf"))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(RegexSCMSourceFilterTrait.class),
hasProperty("regex", is("limited.*"))
)
@@ -294,21 +294,21 @@ public void exclude_branches() throws Exception {
assertThat(instance.getCredentialsId(), is("bcaef157-f105-407f-b150-df7722eab6c1"));
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2)),
hasProperty("trust", instanceOf(ForkPullRequestDiscoveryTrait.TrustPermission.class))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(WildcardSCMHeadFilterTrait.class),
hasProperty("includes", is("*")),
hasProperty("excludes", is("master"))
@@ -331,21 +331,21 @@ public void limit_branches() throws Exception {
assertThat(instance.getCredentialsId(), is("bcaef157-f105-407f-b150-df7722eab6c1"));
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2)),
hasProperty("trust", instanceOf(ForkPullRequestDiscoveryTrait.TrustPermission.class))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(WildcardSCMHeadFilterTrait.class),
hasProperty("includes", is("feature/*")),
hasProperty("excludes", is(""))
@@ -372,7 +372,7 @@ public void build_000001() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
contains(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
)
@@ -385,7 +385,7 @@ public void build_000010() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
contains(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
)
@@ -398,7 +398,7 @@ public void build_000011() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
contains(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
)
@@ -411,7 +411,7 @@ public void build_000100() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
contains(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
)
@@ -424,11 +424,11 @@ public void build_000101() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
)
@@ -441,11 +441,11 @@ public void build_000110() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
)
@@ -458,11 +458,11 @@ public void build_000111() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
)
@@ -475,7 +475,7 @@ public void build_001000() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
contains(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
)
@@ -488,11 +488,11 @@ public void build_001001() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
)
@@ -505,11 +505,11 @@ public void build_001010() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
)
@@ -522,11 +522,11 @@ public void build_001011() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
)
@@ -539,7 +539,7 @@ public void build_001100() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
contains(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
)
@@ -552,11 +552,11 @@ public void build_001101() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
)
@@ -569,11 +569,11 @@ public void build_001110() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
)
@@ -586,11 +586,11 @@ public void build_001111() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
)
@@ -603,7 +603,7 @@ public void build_010000() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
contains(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(false)),
hasProperty("buildBranchesWithPR", is(true))
@@ -617,12 +617,12 @@ public void build_010001() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(false)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
)
@@ -635,12 +635,12 @@ public void build_010010() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(false)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
)
@@ -653,12 +653,12 @@ public void build_010011() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(false)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
)
@@ -671,12 +671,12 @@ public void build_010100() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(false)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
)
@@ -689,16 +689,16 @@ public void build_010101() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(false)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
)
@@ -711,16 +711,16 @@ public void build_010110() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(false)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
)
@@ -733,16 +733,16 @@ public void build_010111() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(false)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
)
@@ -755,12 +755,12 @@ public void build_011000() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(false)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
)
@@ -773,16 +773,16 @@ public void build_011001() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(false)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
)
@@ -795,16 +795,16 @@ public void build_011010() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(false)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
)
@@ -817,16 +817,16 @@ public void build_011011() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(false)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
)
@@ -839,12 +839,12 @@ public void build_011100() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(false)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
)
@@ -857,16 +857,16 @@ public void build_011101() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(false)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
)
@@ -879,16 +879,16 @@ public void build_011110() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(false)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
)
@@ -901,16 +901,16 @@ public void build_011111() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(false)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
)
@@ -923,7 +923,7 @@ public void build_100000() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
contains(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(false))
@@ -937,12 +937,12 @@ public void build_100001() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(false))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
)
@@ -955,12 +955,12 @@ public void build_100010() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(false))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
)
@@ -973,12 +973,12 @@ public void build_100011() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(false))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
)
@@ -991,12 +991,12 @@ public void build_100100() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(false))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
)
@@ -1009,16 +1009,16 @@ public void build_100101() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(false))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
)
@@ -1031,16 +1031,16 @@ public void build_100110() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(false))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
)
@@ -1053,16 +1053,16 @@ public void build_100111() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(false))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
)
@@ -1075,12 +1075,12 @@ public void build_101000() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(false))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
)
@@ -1093,16 +1093,16 @@ public void build_101001() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(false))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
)
@@ -1115,16 +1115,16 @@ public void build_101010() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(false))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
)
@@ -1137,16 +1137,16 @@ public void build_101011() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(false))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
)
@@ -1159,12 +1159,12 @@ public void build_101100() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(false))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
)
@@ -1177,16 +1177,16 @@ public void build_101101() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(false))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
)
@@ -1199,16 +1199,16 @@ public void build_101110() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(false))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
)
@@ -1221,16 +1221,16 @@ public void build_101111() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(false))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
)
@@ -1243,7 +1243,7 @@ public void build_110000() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
contains(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
@@ -1257,12 +1257,12 @@ public void build_110001() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
)
@@ -1275,12 +1275,12 @@ public void build_110010() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
)
@@ -1293,12 +1293,12 @@ public void build_110011() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
)
@@ -1311,12 +1311,12 @@ public void build_110100() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
)
@@ -1329,16 +1329,16 @@ public void build_110101() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
)
@@ -1351,16 +1351,16 @@ public void build_110110() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
)
@@ -1373,16 +1373,16 @@ public void build_110111() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
)
@@ -1395,12 +1395,12 @@ public void build_111000() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
)
@@ -1413,16 +1413,16 @@ public void build_111001() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
)
@@ -1435,16 +1435,16 @@ public void build_111010() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
)
@@ -1457,16 +1457,16 @@ public void build_111011() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
)
@@ -1479,12 +1479,12 @@ public void build_111100() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
)
@@ -1497,16 +1497,16 @@ public void build_111101() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(2))
)
@@ -1519,16 +1519,16 @@ public void build_111110() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(1))
)
@@ -1541,16 +1541,16 @@ public void build_111111() throws Exception {
GitHubSCMNavigator instance = load();
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(OriginPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategyId", is(3))
)
@@ -1572,12 +1572,12 @@ public void given__legacyCode__when__constructor_cloud__then__discoveryTraitDefa
assertThat(instance.getCredentialsId(), is("bcaef157-f105-407f-b150-df7722eab6c1"));
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategies", is(EnumSet.of(ChangeRequestCheckoutStrategy.MERGE))),
hasProperty("trust", instanceOf(ForkPullRequestDiscoveryTrait.TrustPermission.class))
@@ -1605,17 +1605,17 @@ public void given__legacyCode__when__constructor_server__then__discoveryTraitDef
assertThat(instance.getCredentialsId(), is("bcaef157-f105-407f-b150-df7722eab6c1"));
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(true))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(ForkPullRequestDiscoveryTrait.class),
hasProperty("strategies", is(EnumSet.of(ChangeRequestCheckoutStrategy.MERGE))),
hasProperty("trust", instanceOf(ForkPullRequestDiscoveryTrait.TrustPermission.class))
),
- Matchers.>allOf(
+ Matchers.allOf(
Matchers.instanceOf(SSHCheckoutTrait.class),
hasProperty("credentialsId", is("8b2e4f77-39c5-41a9-b63b-8d367350bfdf"))
)
@@ -1638,16 +1638,16 @@ public void given__instance__when__setTraits_empty__then__traitsEmpty() {
@Test
public void given__instance__when__setTraits__then__traitsSet() {
GitHubSCMNavigator instance = new GitHubSCMNavigator("test");
- instance.setTraits(Arrays.>>asList(new BranchDiscoveryTrait(1),
+ instance.setTraits(Arrays.asList(new BranchDiscoveryTrait(1),
new SSHCheckoutTrait(null)));
assertThat(instance.getTraits(),
containsInAnyOrder(
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(BranchDiscoveryTrait.class),
hasProperty("buildBranch", is(true)),
hasProperty("buildBranchesWithPR", is(false))
),
- Matchers.>allOf(
+ Matchers.allOf(
instanceOf(SSHCheckoutTrait.class),
hasProperty("credentialsId", is(nullValue()))
)
@@ -1700,14 +1700,14 @@ public void given__instance__when__setApiUri_cloudUrl__then__valueApplied() {
@Test
public void given__legacyCode__when__setPattern_default__then__patternSetAndTraitRemoved() {
GitHubSCMNavigator instance = new GitHubSCMNavigator("test");
- instance.setTraits(Arrays.>>asList(new BranchDiscoveryTrait(true, false), new RegexSCMSourceFilterTrait("job.*"),
+ instance.setTraits(Arrays.asList(new BranchDiscoveryTrait(true, false), new RegexSCMSourceFilterTrait("job.*"),
new SSHCheckoutTrait("dummy")));
assertThat(instance.getPattern(), is("job.*"));
- assertThat(instance.getTraits(), Matchers.>hasItem(instanceOf(RegexSCMSourceFilterTrait.class)));
+ assertThat(instance.getTraits(), Matchers.hasItem(instanceOf(RegexSCMSourceFilterTrait.class)));
instance.setPattern(".*");
assertThat(instance.getPattern(), is(".*"));
assertThat(instance.getTraits(),
- not(Matchers.>hasItem(instanceOf(RegexSCMSourceFilterTrait.class))));
+ not(Matchers.hasItem(instanceOf(RegexSCMSourceFilterTrait.class))));
}
@@ -1715,13 +1715,13 @@ public void given__legacyCode__when__setPattern_default__then__patternSetAndTrai
public void given__legacyCode__when__setPattern_custom__then__patternSetAndTraitAdded() {
GitHubSCMNavigator instance = new GitHubSCMNavigator("test");
instance.setTraits(
- Arrays.>>asList(new BranchDiscoveryTrait(true, false), new SSHCheckoutTrait("dummy")));
+ Arrays.asList(new BranchDiscoveryTrait(true, false), new SSHCheckoutTrait("dummy")));
assertThat(instance.getPattern(), is(".*"));
assertThat(instance.getTraits(),
- not(Matchers.>hasItem(instanceOf(RegexSCMSourceFilterTrait.class))));
+ not(Matchers.hasItem(instanceOf(RegexSCMSourceFilterTrait.class))));
instance.setPattern("job.*");
assertThat(instance.getPattern(), is("job.*"));
- assertThat(instance.getTraits(), Matchers.>hasItem(
+ assertThat(instance.getTraits(), Matchers.hasItem(
allOf(instanceOf(RegexSCMSourceFilterTrait.class), hasProperty("regex", is("job.*")))));
}
@@ -1732,12 +1732,12 @@ public void given__legacyCode__when__setPattern_custom__then__patternSetAndTrait
instance.setTraits(new SCMTrait[]{new BranchDiscoveryTrait(true, false), new RegexSCMSourceFilterTrait("job.*"),
new SSHCheckoutTrait("dummy")});
assertThat(instance.getPattern(), is("job.*"));
- assertThat(instance.getTraits(), Matchers.>hasItem(instanceOf(RegexSCMSourceFilterTrait.class)));
+ assertThat(instance.getTraits(), Matchers.hasItem(instanceOf(RegexSCMSourceFilterTrait.class)));
instance.setPattern("project.*");
assertThat(instance.getPattern(), is("project.*"));
- assertThat(instance.getTraits(), not(Matchers.>hasItem(
+ assertThat(instance.getTraits(), not(Matchers.hasItem(
allOf(instanceOf(RegexSCMSourceFilterTrait.class), hasProperty("regex", is("job.*"))))));
- assertThat(instance.getTraits(), Matchers.>hasItem(
+ assertThat(instance.getTraits(), Matchers.hasItem(
allOf(instanceOf(RegexSCMSourceFilterTrait.class), hasProperty("regex", is("project.*")))));
}
@@ -1746,14 +1746,14 @@ public void given__legacyCode__when__setPattern_custom__then__patternSetAndTrait
public void given__legacyCode__when__checkoutCredentials_SAME__then__noTraitAdded() {
GitHubSCMNavigator instance = new GitHubSCMNavigator(null, "test", "scan", GitHubSCMSource.DescriptorImpl.SAME);
assertThat(instance.getCheckoutCredentialsId(), is(GitHubSCMNavigator.DescriptorImpl.SAME));
- assertThat(instance.getTraits(), not(Matchers.>hasItem(instanceOf(SSHCheckoutTrait.class))));
+ assertThat(instance.getTraits(), not(Matchers.hasItem(instanceOf(SSHCheckoutTrait.class))));
}
@Test
public void given__legacyCode__when__checkoutCredentials_null__then__traitAdded_ANONYMOUS() {
GitHubSCMNavigator instance = new GitHubSCMNavigator(null, "test", "scan", null);
assertThat(instance.getCheckoutCredentialsId(), is(GitHubSCMSource.DescriptorImpl.ANONYMOUS));
- assertThat(instance.getTraits(), Matchers.>hasItem(allOf(
+ assertThat(instance.getTraits(), Matchers.hasItem(allOf(
instanceOf(SSHCheckoutTrait.class),
hasProperty("credentialsId", is(nullValue()))
)));
@@ -1763,7 +1763,7 @@ public void given__legacyCode__when__checkoutCredentials_null__then__traitAdded_
public void given__legacyCode__when__checkoutCredentials_value__then__traitAdded() {
GitHubSCMNavigator instance = new GitHubSCMNavigator(null, "test", "scan", "value");
assertThat(instance.getCheckoutCredentialsId(), is("value"));
- assertThat(instance.getTraits(), Matchers.