mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-11 08:21:23 +00:00
Compare commits
129 Commits
github-api
...
github-api
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
349ef7a54c | ||
|
|
94df5fc389 | ||
|
|
906238a297 | ||
|
|
7963fa82b5 | ||
|
|
1aba6012fb | ||
|
|
ff4324ac67 | ||
|
|
11bc669e1d | ||
|
|
dcf26d58e4 | ||
|
|
4d46872c35 | ||
|
|
4f0d62f421 | ||
|
|
f7ad1f517b | ||
|
|
345d6197f3 | ||
|
|
bb4d44138a | ||
|
|
a8ef0cde53 | ||
|
|
77dc009c95 | ||
|
|
aa298c93cc | ||
|
|
dfb0a5240e | ||
|
|
9cfc3c22b5 | ||
|
|
b177d98e29 | ||
|
|
5405fb0370 | ||
|
|
72a1c24b3b | ||
|
|
f146ae94ec | ||
|
|
a0bbba748a | ||
|
|
81bf818573 | ||
|
|
d5913dc292 | ||
|
|
e1e901b794 | ||
|
|
2f2f26767e | ||
|
|
bffa78c1b8 | ||
|
|
c55719c67a | ||
|
|
cb3b4a6642 | ||
|
|
92c141cee6 | ||
|
|
fd1a1a1c23 | ||
|
|
b835884b2e | ||
|
|
660763908d | ||
|
|
fe8bdb755a | ||
|
|
67dc6d2d23 | ||
|
|
9c8d73cbe2 | ||
|
|
5db97d92dd | ||
|
|
ac470dddb5 | ||
|
|
43063fe8ce | ||
|
|
59e0046c1e | ||
|
|
36ab05c265 | ||
|
|
2b2be05dae | ||
|
|
fb1adbd1ef | ||
|
|
ab68a59b25 | ||
|
|
9c7de767e9 | ||
|
|
8ba5cf7c2e | ||
|
|
b194a19b98 | ||
|
|
1d344b016f | ||
|
|
474f3ef4ca | ||
|
|
9830927020 | ||
|
|
727932a442 | ||
|
|
cd92b51845 | ||
|
|
fe26d16411 | ||
|
|
d68c66ce2b | ||
|
|
e7bfbfb48f | ||
|
|
f2a88ae61c | ||
|
|
e2113f6ee5 | ||
|
|
3867224024 | ||
|
|
9ee0bf43bc | ||
|
|
2844542efa | ||
|
|
e3fcae9392 | ||
|
|
c6ccfa91f3 | ||
|
|
b6fcee1cb9 | ||
|
|
9071befb04 | ||
|
|
bdd5fe98f3 | ||
|
|
a3d3e83a49 | ||
|
|
08bde72028 | ||
|
|
108a136368 | ||
|
|
57d87ad6b1 | ||
|
|
0c22815ff7 | ||
|
|
0ca792ecfd | ||
|
|
987c34c69e | ||
|
|
c1c02bc8ab | ||
|
|
4ee369f27c | ||
|
|
c9012efdcb | ||
|
|
41524fc67d | ||
|
|
04ff61e981 | ||
|
|
532468dc67 | ||
|
|
9c9a2dae47 | ||
|
|
c8a868b57f | ||
|
|
4b3f81ee34 | ||
|
|
afa170ba7c | ||
|
|
46e3b2272e | ||
|
|
52472e90ec | ||
|
|
4ef0d00846 | ||
|
|
580f2537f2 | ||
|
|
3d9fd96026 | ||
|
|
f449b92721 | ||
|
|
3b0216b023 | ||
|
|
98cf839737 | ||
|
|
0bb0846505 | ||
|
|
70969400a3 | ||
|
|
147e8d5d12 | ||
|
|
cacc3e6edd | ||
|
|
a284eca147 | ||
|
|
0d3ba9d7f0 | ||
|
|
be8064d642 | ||
|
|
e30dba742d | ||
|
|
44b72ed647 | ||
|
|
666bd77dac | ||
|
|
0a6613e60d | ||
|
|
62e186c123 | ||
|
|
50dd8f5bcc | ||
|
|
d5fcac9c45 | ||
|
|
c2bed85190 | ||
|
|
183b463ef2 | ||
|
|
92fdac44a0 | ||
|
|
12829ecc73 | ||
|
|
51319c3b26 | ||
|
|
8fd827040b | ||
|
|
5ec46eae0d | ||
|
|
32c03301be | ||
|
|
df7f29b2ab | ||
|
|
e863113c36 | ||
|
|
8e2c1d7382 | ||
|
|
ab7b9cccba | ||
|
|
81bf61a161 | ||
|
|
b40f008647 | ||
|
|
734e41702b | ||
|
|
038dd20a91 | ||
|
|
1dd62b8550 | ||
|
|
715deebe05 | ||
|
|
b3fe3d8590 | ||
|
|
f74c3ed3ea | ||
|
|
2c9aebeeed | ||
|
|
7474f1e11f | ||
|
|
dba9c55b64 | ||
|
|
b432364397 |
12
.github/dependabot.yml
vendored
Normal file
12
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "maven"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
time: "02:00"
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
time: "02:00"
|
||||
2
.github/release-drafter.yml
vendored
2
.github/release-drafter.yml
vendored
@@ -1,5 +1,5 @@
|
||||
name-template: 'v$NEXT_PATCH_VERSION 🌈'
|
||||
tag-template: 'v$NEXT_PATCH_VERSION'
|
||||
tag-template: 'github-api-$NEXT_MINOR_VERSION'
|
||||
categories:
|
||||
- title: '🚀 Features'
|
||||
labels:
|
||||
|
||||
6
.github/workflows/maven-build.yml
vendored
6
.github/workflows/maven-build.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
- name: Cached .m2
|
||||
uses: actions/cache@v1
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
@@ -37,7 +37,7 @@ jobs:
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
- uses: actions/cache@v1
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
@@ -58,7 +58,7 @@ jobs:
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
- uses: actions/cache@v1
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
|
||||
54
pom.xml
54
pom.xml
@@ -2,7 +2,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.kohsuke</groupId>
|
||||
<artifactId>github-api</artifactId>
|
||||
<version>1.114</version>
|
||||
<version>1.116</version>
|
||||
<name>GitHub API for Java</name>
|
||||
<url>https://github-api.kohsuke.org/</url>
|
||||
<description>GitHub API for Java</description>
|
||||
@@ -11,7 +11,7 @@
|
||||
<connection>scm:git:git@github.com/hub4j/${project.artifactId}.git</connection>
|
||||
<developerConnection>scm:git:ssh://git@github.com/hub4j/${project.artifactId}.git</developerConnection>
|
||||
<url>https://github.com/hub4j/github-api/</url>
|
||||
<tag>github-api-1.114</tag>
|
||||
<tag>github-api-1.116</tag>
|
||||
</scm>
|
||||
|
||||
<distributionManagement>
|
||||
@@ -33,8 +33,8 @@
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<spotbugs-maven-plugin.version>4.0.0</spotbugs-maven-plugin.version>
|
||||
<spotbugs.version>4.0.4</spotbugs.version>
|
||||
<spotbugs-maven-plugin.version>4.0.4</spotbugs-maven-plugin.version>
|
||||
<spotbugs.version>4.1.1</spotbugs.version>
|
||||
<spotbugs-maven-plugin.failOnError>true</spotbugs-maven-plugin.failOnError>
|
||||
<hamcrest.version>2.2</hamcrest.version>
|
||||
<okhttp3.version>4.4.1</okhttp3.version>
|
||||
@@ -79,6 +79,14 @@
|
||||
</testResources>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.22.2</version>
|
||||
<configuration>
|
||||
<!-- SUREFIRE-1226 workaround -->
|
||||
<trimStackTrace>false</trimStackTrace>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
@@ -233,7 +241,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>3.9.0</version>
|
||||
<version>3.9.1</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
@@ -280,16 +288,31 @@
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.22.2</version>
|
||||
<configuration>
|
||||
<!-- SUREFIRE-1226 workaround -->
|
||||
<trimStackTrace>false</trimStackTrace>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-test</id>
|
||||
<configuration>
|
||||
<excludesFile>src/test/resources/slow-or-flaky-tests.txt</excludesFile>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>slow-or-flaky-test</id>
|
||||
<phase>test</phase>
|
||||
<goals>
|
||||
<goal>test</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<rerunFailingTestsCount>2</rerunFailingTestsCount>
|
||||
<!-- There are some tests that take longer or are a little flaky. Run them here. -->
|
||||
<includesFile>src/test/resources/slow-or-flaky-tests.txt</includesFile>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>animal-sniffer-maven-plugin</artifactId>
|
||||
<version>1.18</version>
|
||||
<version>1.19</version>
|
||||
<configuration>
|
||||
<signature>
|
||||
<groupId>org.codehaus.mojo.signature</groupId>
|
||||
@@ -322,7 +345,7 @@
|
||||
<plugin>
|
||||
<groupId>net.revelc.code.formatter</groupId>
|
||||
<artifactId>formatter-maven-plugin</artifactId>
|
||||
<version>2.11.0</version>
|
||||
<version>2.12.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
@@ -330,6 +353,7 @@
|
||||
</goals>
|
||||
<configuration>
|
||||
<configFile>src/main/resources/eclipse/formatter.xml</configFile>
|
||||
<cachedir>${project.build.directory}/.cache</cachedir>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
@@ -445,7 +469,7 @@
|
||||
<dependency>
|
||||
<groupId>org.kohsuke.stapler</groupId>
|
||||
<artifactId>stapler</artifactId>
|
||||
<version>1.259</version>
|
||||
<version>1.260</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -495,7 +519,7 @@
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<version>3.3.3</version>
|
||||
<version>3.4.6</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -507,7 +531,7 @@
|
||||
<dependency>
|
||||
<groupId>com.github.tomakehurst</groupId>
|
||||
<artifactId>wiremock-jre8-standalone</artifactId>
|
||||
<version>2.26.3</version>
|
||||
<version>2.27.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -9,6 +9,8 @@ import java.net.URL;
|
||||
import java.util.Collection;
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.annotation.CheckForNull;
|
||||
|
||||
/**
|
||||
* A branch in a repository.
|
||||
*
|
||||
@@ -101,7 +103,11 @@ public class GHBranch {
|
||||
* the io exception
|
||||
*/
|
||||
public GHBranchProtection getProtection() throws IOException {
|
||||
return root.createRequest().setRawUrlPath(protection_url).fetch(GHBranchProtection.class).wrap(this);
|
||||
return root.createRequest()
|
||||
.withPreview(Previews.LUKE_CAGE)
|
||||
.setRawUrlPath(protection_url)
|
||||
.fetch(GHBranchProtection.class)
|
||||
.wrap(this);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -161,6 +167,59 @@ public class GHBranch {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge a branch into this branch.
|
||||
*
|
||||
* @param headBranch
|
||||
* the branch whose head will be merged
|
||||
*
|
||||
* @param commitMessage
|
||||
* the commit message
|
||||
*
|
||||
* @return the merge {@link GHCommit} created, or {@code null} if the base already contains the head (nothing to
|
||||
* merge).
|
||||
*
|
||||
* @throws IOException
|
||||
* if merging fails
|
||||
*/
|
||||
@CheckForNull
|
||||
public GHCommit merge(GHBranch headBranch, String commitMessage) throws IOException {
|
||||
return merge(headBranch.getName(), commitMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge a ref into this branch.
|
||||
*
|
||||
* @param head
|
||||
* the ref name that will be merged into this branch. Follows the usual ref naming rules, could be a
|
||||
* branch name, tag, or commit sha.
|
||||
*
|
||||
* @param commitMessage
|
||||
* the commit message
|
||||
*
|
||||
* @return the merge {@link GHCommit} created, or {@code null} if the base already contains the head (nothing to
|
||||
* merge).
|
||||
*
|
||||
* @throws IOException
|
||||
* if merging fails
|
||||
*/
|
||||
@CheckForNull
|
||||
public GHCommit merge(String head, String commitMessage) throws IOException {
|
||||
GHCommit result = root.createRequest()
|
||||
.withUrlPath(owner.getApiTailUrl("merges"))
|
||||
.method("POST")
|
||||
.with("commit_message", commitMessage)
|
||||
.with("base", this.name)
|
||||
.with("head", head)
|
||||
.fetch(GHCommit.class);
|
||||
|
||||
if (result != null) {
|
||||
result.wrapUp(owner);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
String getApiRoute() {
|
||||
return owner.getApiTailUrl("/branches/" + name);
|
||||
}
|
||||
|
||||
@@ -10,6 +10,8 @@ import static org.kohsuke.github.Previews.ZZZAX;
|
||||
|
||||
/**
|
||||
* The type GHBranchProtection.
|
||||
*
|
||||
* @see <a href="https://docs.github.com/en/rest/reference/repos#get-branch-protection">GitHub Branch Protection</a>
|
||||
*/
|
||||
@SuppressFBWarnings(
|
||||
value = { "UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD", "UWF_UNWRITTEN_FIELD", "NP_UNWRITTEN_FIELD",
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
package org.kohsuke.github;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Represents a check run.
|
||||
@@ -14,6 +18,8 @@ import java.util.Date;
|
||||
@SuppressFBWarnings(value = { "UWF_UNWRITTEN_FIELD", "NP_UNWRITTEN_FIELD", "URF_UNREAD_FIELD" },
|
||||
justification = "JSON API")
|
||||
public class GHCheckRun extends GHObject {
|
||||
|
||||
@JsonProperty("repository")
|
||||
GHRepository owner;
|
||||
GitHub root;
|
||||
|
||||
@@ -34,7 +40,7 @@ public class GHCheckRun extends GHObject {
|
||||
|
||||
GHCheckRun wrap(GHRepository owner) {
|
||||
this.owner = owner;
|
||||
this.root = owner.root;
|
||||
wrap(owner.root);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -42,7 +48,24 @@ public class GHCheckRun extends GHObject {
|
||||
this.root = root;
|
||||
if (owner != null) {
|
||||
owner.wrap(root);
|
||||
if (pullRequests != null && pullRequests.length != 0) {
|
||||
for (GHPullRequest singlePull : pullRequests) {
|
||||
singlePull.wrap(owner);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (checkSuite != null) {
|
||||
if (owner != null) {
|
||||
checkSuite.wrap(owner);
|
||||
} else {
|
||||
checkSuite.wrap(root);
|
||||
}
|
||||
}
|
||||
if (app != null) {
|
||||
app.wrapUp(root);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -74,8 +97,14 @@ public class GHCheckRun extends GHObject {
|
||||
return conclusion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Final conclusion of the check.
|
||||
*
|
||||
* From <a href="https://docs.github.com/en/rest/reference/checks#create-a-check-run--parameters">Check Run
|
||||
* Parameters - <code>conclusion</code></a>.
|
||||
*/
|
||||
public static enum Conclusion {
|
||||
SUCCESS, FAILURE, NEUTRAL, CANCELLED, TIMED_OUT, ACTION_REQUIRED
|
||||
SUCCESS, FAILURE, NEUTRAL, CANCELLED, TIMED_OUT, ACTION_REQUIRED, SKIPPED
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -99,15 +128,22 @@ public class GHCheckRun extends GHObject {
|
||||
/**
|
||||
* Gets the pull requests participated in this check run.
|
||||
*
|
||||
* @return Pull requests of this check run
|
||||
* Note this field is only populated for events. When getting a {@link GHCheckRun} outside of an event, this is
|
||||
* always empty.
|
||||
*
|
||||
* @return the list of {@link GHPullRequest}s for this check run. Only populated for events.
|
||||
* @throws IOException
|
||||
* the io exception
|
||||
*/
|
||||
GHPullRequest[] getPullRequests() throws IOException {
|
||||
public List<GHPullRequest> getPullRequests() throws IOException {
|
||||
if (pullRequests != null && pullRequests.length != 0) {
|
||||
for (GHPullRequest singlePull : pullRequests) {
|
||||
singlePull.refresh();
|
||||
// Only refresh if we haven't do so before
|
||||
singlePull.refresh(singlePull.getTitle());
|
||||
}
|
||||
return Collections.unmodifiableList(Arrays.asList(pullRequests));
|
||||
}
|
||||
return pullRequests;
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
package org.kohsuke.github;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Represents a check suite.
|
||||
@@ -14,6 +18,8 @@ import java.util.Date;
|
||||
@SuppressFBWarnings(value = { "UWF_UNWRITTEN_FIELD", "NP_UNWRITTEN_FIELD", "URF_UNREAD_FIELD" },
|
||||
justification = "JSON API")
|
||||
public class GHCheckSuite extends GHObject {
|
||||
|
||||
@JsonProperty("repository")
|
||||
GHRepository owner;
|
||||
GitHub root;
|
||||
|
||||
@@ -32,7 +38,7 @@ public class GHCheckSuite extends GHObject {
|
||||
|
||||
GHCheckSuite wrap(GHRepository owner) {
|
||||
this.owner = owner;
|
||||
this.root = owner.root;
|
||||
this.wrap(owner.root);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -40,6 +46,14 @@ public class GHCheckSuite extends GHObject {
|
||||
this.root = root;
|
||||
if (owner != null) {
|
||||
owner.wrap(root);
|
||||
if (pullRequests != null && pullRequests.length != 0) {
|
||||
for (GHPullRequest singlePull : pullRequests) {
|
||||
singlePull.wrap(owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (app != null) {
|
||||
app.wrapUp(root);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
@@ -153,15 +167,22 @@ public class GHCheckSuite extends GHObject {
|
||||
/**
|
||||
* Gets the pull requests participated in this check suite.
|
||||
*
|
||||
* @return Pull requests
|
||||
* Note this field is only populated for events. When getting a {@link GHCheckSuite} outside of an event, this is
|
||||
* always empty.
|
||||
*
|
||||
* @return the list of {@link GHPullRequest}s for this check suite. Only populated for events.
|
||||
* @throws IOException
|
||||
* the io exception
|
||||
*/
|
||||
GHPullRequest[] getPullRequests() throws IOException {
|
||||
public List<GHPullRequest> getPullRequests() throws IOException {
|
||||
if (pullRequests != null && pullRequests.length != 0) {
|
||||
for (GHPullRequest singlePull : pullRequests) {
|
||||
singlePull.refresh();
|
||||
// Only refresh if we haven't do so before
|
||||
singlePull.refresh(singlePull.getTitle());
|
||||
}
|
||||
return Collections.unmodifiableList(Arrays.asList(pullRequests));
|
||||
}
|
||||
return pullRequests;
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -30,6 +30,7 @@ public class GHContent implements Refreshable {
|
||||
private String sha;
|
||||
private String name;
|
||||
private String path;
|
||||
private String target;
|
||||
private String content;
|
||||
private String url; // this is the API url
|
||||
private String git_url; // this is the Blob url
|
||||
@@ -99,6 +100,15 @@ public class GHContent implements Refreshable {
|
||||
return path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets target of a symlink. This will only be set if {@code "symlink".equals(getType())}
|
||||
*
|
||||
* @return the target
|
||||
*/
|
||||
public String getTarget() {
|
||||
return target;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the decoded content that is stored at this location.
|
||||
*
|
||||
|
||||
@@ -3,6 +3,8 @@ package org.kohsuke.github;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
|
||||
import static org.kohsuke.github.Previews.BAPTISE;
|
||||
|
||||
/**
|
||||
* Creates a repository
|
||||
*
|
||||
@@ -11,7 +13,7 @@ import java.net.URL;
|
||||
public class GHCreateRepositoryBuilder {
|
||||
private final GitHub root;
|
||||
protected final Requester builder;
|
||||
private final String apiUrlTail;
|
||||
private String apiUrlTail;
|
||||
|
||||
GHCreateRepositoryBuilder(GitHub root, String apiUrlTail, String name) {
|
||||
this.root = root;
|
||||
@@ -200,6 +202,51 @@ public class GHCreateRepositoryBuilder {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specifies whether the repository is a template.
|
||||
*
|
||||
* @param enabled
|
||||
* true if enabled
|
||||
* @return a builder to continue with building
|
||||
*/
|
||||
@Preview
|
||||
@Deprecated
|
||||
public GHCreateRepositoryBuilder templateRepository(boolean enabled) {
|
||||
this.builder.withPreview(BAPTISE);
|
||||
this.builder.with("is_template", enabled);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specifies the ownership of the repository.
|
||||
*
|
||||
* @param owner
|
||||
* organization or personage
|
||||
* @return a builder to continue with building
|
||||
*/
|
||||
public GHCreateRepositoryBuilder owner(String owner) {
|
||||
this.builder.with("owner", owner);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create repository from template repository.
|
||||
*
|
||||
* @param templateOwner
|
||||
* template repository owner
|
||||
* @param templateRepo
|
||||
* template repository
|
||||
* @return a builder to continue with building
|
||||
* @see <a href="https://developer.github.com/v3/previews/">GitHub API Previews</a>
|
||||
*/
|
||||
@Preview
|
||||
@Deprecated
|
||||
public GHCreateRepositoryBuilder fromTemplateRepository(String templateOwner, String templateRepo) {
|
||||
this.builder.withPreview(BAPTISE);
|
||||
this.apiUrlTail = "/repos/" + templateOwner + "/" + templateRepo + "/generate";
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a repository with all the parameters.
|
||||
*
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.kohsuke.github;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Represents a deployment
|
||||
@@ -60,7 +61,8 @@ public class GHDeployment extends GHObject {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets payload.
|
||||
* Gets payload. <b>NOTE:</b> only use this method if you can guarantee the payload will be a simple string,
|
||||
* otherwise use {@link #getPayloadObject()}.
|
||||
*
|
||||
* @return the payload
|
||||
*/
|
||||
@@ -68,6 +70,25 @@ public class GHDeployment extends GHObject {
|
||||
return (String) payload;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets payload. <b>NOTE:</b> only use this method if you can guarantee the payload will be a JSON object (Map),
|
||||
* otherwise use {@link #getPayloadObject()}.
|
||||
*
|
||||
* @return the payload
|
||||
*/
|
||||
public Map<String, Object> getPayloadMap() {
|
||||
return (Map<String, Object>) payload;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets payload without assuming its type. It could be a String or a Map.
|
||||
*
|
||||
* @return the payload
|
||||
*/
|
||||
public Object getPayloadObject() {
|
||||
return payload;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets environment.
|
||||
*
|
||||
|
||||
@@ -62,6 +62,8 @@ public enum GHEvent {
|
||||
TEAM,
|
||||
TEAM_ADD,
|
||||
WATCH,
|
||||
WORKFLOW_DISPATCH,
|
||||
WORKFLOW_RUN,
|
||||
|
||||
/**
|
||||
* Special event type that means "every possible event"
|
||||
|
||||
@@ -239,7 +239,7 @@ public class GHIssue extends GHObject implements Reactable {
|
||||
}
|
||||
|
||||
private void editIssue(String key, Object value) throws IOException {
|
||||
root.createRequest().with(key, value).method("PATCH").withUrlPath(getIssuesApiRoute()).send();
|
||||
root.createRequest().withNullable(key, value).method("PATCH").withUrlPath(getIssuesApiRoute()).send();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -296,9 +296,9 @@ public class GHIssue extends GHObject implements Reactable {
|
||||
*/
|
||||
public void setMilestone(GHMilestone milestone) throws IOException {
|
||||
if (milestone == null) {
|
||||
editNullable("milestone", null);
|
||||
editIssue("milestone", null);
|
||||
} else {
|
||||
edit("milestone", milestone.getNumber());
|
||||
editIssue("milestone", milestone.getNumber());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -421,7 +421,7 @@ public class GHOrganization extends GHPerson {
|
||||
* The enum Permission.
|
||||
*/
|
||||
public enum Permission {
|
||||
ADMIN, PUSH, PULL
|
||||
ADMIN, MAINTAIN, PUSH, TRIAGE, PULL
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -154,10 +154,7 @@ public abstract class GHPerson extends GHObject {
|
||||
*/
|
||||
public GHRepository getRepository(String name) throws IOException {
|
||||
try {
|
||||
return root.createRequest()
|
||||
.withUrlPath("/repos/" + login + '/' + name)
|
||||
.fetch(GHRepository.class)
|
||||
.wrap(root);
|
||||
return GHRepository.read(root, login, name);
|
||||
} catch (FileNotFoundException e) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -80,10 +80,8 @@ public class GHProject extends GHObject {
|
||||
} else if (owner_url.contains("/users/")) {
|
||||
owner = root.createRequest().withUrlPath(getOwnerUrl().getPath()).fetch(GHUser.class).wrapUp(root);
|
||||
} else if (owner_url.contains("/repos/")) {
|
||||
owner = root.createRequest()
|
||||
.withUrlPath(getOwnerUrl().getPath())
|
||||
.fetch(GHRepository.class)
|
||||
.wrap(root);
|
||||
String[] pathElements = getOwnerUrl().getPath().split("/");
|
||||
owner = GHRepository.read(root, pathElements[1], pathElements[2]);
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
return null;
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.format.DateTimeParseException;
|
||||
@@ -29,7 +30,7 @@ public class GHRateLimit {
|
||||
/**
|
||||
* Remaining calls that can be made.
|
||||
*
|
||||
* @deprecated This value should never have been made public. Use {@link #getRemaining()}
|
||||
* @deprecated This field should never have been made public. Use {@link #getRemaining()}
|
||||
*/
|
||||
@Deprecated
|
||||
public int remaining;
|
||||
@@ -37,7 +38,7 @@ public class GHRateLimit {
|
||||
/**
|
||||
* Allotted API call per hour.
|
||||
*
|
||||
* @deprecated This value should never have been made public. Use {@link #getLimit()}
|
||||
* @deprecated This field should never have been made public. Use {@link #getLimit()}
|
||||
*/
|
||||
@Deprecated
|
||||
public int limit;
|
||||
@@ -48,7 +49,7 @@ public class GHRateLimit {
|
||||
* date. To use this field in any meaningful way, it must be converted to a long using {@link Date#getTime()}
|
||||
* multiplied by 1000.
|
||||
*
|
||||
* @deprecated This value should never have been made public. Use {@link #getResetDate()}
|
||||
* @deprecated This field should never have been made public. Use {@link #getResetDate()}
|
||||
*/
|
||||
@Deprecated
|
||||
public Date reset;
|
||||
@@ -65,17 +66,58 @@ public class GHRateLimit {
|
||||
@Nonnull
|
||||
private final Record integrationManifest;
|
||||
|
||||
/**
|
||||
* The default GHRateLimit provided to new {@link GitHubClient}s.
|
||||
*
|
||||
* Contains all expired records that will cause {@link GitHubClient#rateLimit(RateLimitTarget)} to refresh with new
|
||||
* data when called.
|
||||
*
|
||||
* Private, but made internal for testing.
|
||||
*/
|
||||
@Nonnull
|
||||
static GHRateLimit Unknown() {
|
||||
return new GHRateLimit(new UnknownLimitRecord(),
|
||||
new UnknownLimitRecord(),
|
||||
new UnknownLimitRecord(),
|
||||
new UnknownLimitRecord());
|
||||
}
|
||||
static final GHRateLimit DEFAULT = new GHRateLimit(UnknownLimitRecord.DEFAULT,
|
||||
UnknownLimitRecord.DEFAULT,
|
||||
UnknownLimitRecord.DEFAULT,
|
||||
UnknownLimitRecord.DEFAULT);
|
||||
|
||||
/**
|
||||
* Creates a new {@link GHRateLimit} from a single record for the specified endpoint with place holders for other
|
||||
* records.
|
||||
*
|
||||
* This is used to create {@link GHRateLimit} instances that can merged with other instances.
|
||||
*
|
||||
* @param record
|
||||
* the rate limit record. Can be a regular {@link Record} constructed from header information or an
|
||||
* {@link UnknownLimitRecord} placeholder.
|
||||
* @param rateLimitTarget
|
||||
* which rate limit record to fill
|
||||
* @return a new {@link GHRateLimit} instance containing the supplied record
|
||||
*/
|
||||
@Nonnull
|
||||
static GHRateLimit fromHeaderRecord(Record header) {
|
||||
return new GHRateLimit(header, new UnknownLimitRecord(), new UnknownLimitRecord(), new UnknownLimitRecord());
|
||||
static GHRateLimit fromRecord(@Nonnull Record record, @Nonnull RateLimitTarget rateLimitTarget) {
|
||||
if (rateLimitTarget == RateLimitTarget.CORE || rateLimitTarget == RateLimitTarget.NONE) {
|
||||
return new GHRateLimit(record,
|
||||
UnknownLimitRecord.DEFAULT,
|
||||
UnknownLimitRecord.DEFAULT,
|
||||
UnknownLimitRecord.DEFAULT);
|
||||
} else if (rateLimitTarget == RateLimitTarget.SEARCH) {
|
||||
return new GHRateLimit(UnknownLimitRecord.DEFAULT,
|
||||
record,
|
||||
UnknownLimitRecord.DEFAULT,
|
||||
UnknownLimitRecord.DEFAULT);
|
||||
} else if (rateLimitTarget == RateLimitTarget.GRAPHQL) {
|
||||
return new GHRateLimit(UnknownLimitRecord.DEFAULT,
|
||||
UnknownLimitRecord.DEFAULT,
|
||||
record,
|
||||
UnknownLimitRecord.DEFAULT);
|
||||
} else if (rateLimitTarget == RateLimitTarget.INTEGRATION_MANIFEST) {
|
||||
return new GHRateLimit(UnknownLimitRecord.DEFAULT,
|
||||
UnknownLimitRecord.DEFAULT,
|
||||
UnknownLimitRecord.DEFAULT,
|
||||
record);
|
||||
} else {
|
||||
throw new IllegalArgumentException("Unknown rate limit target: " + rateLimitTarget.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
@@ -142,7 +184,7 @@ public class GHRateLimit {
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the rate limit reset date for this instance has passed.
|
||||
* Whether the reset date for the Core API rate limit has passed.
|
||||
*
|
||||
* @return true if the rate limit reset date has passed. Otherwise false.
|
||||
* @since 1.100
|
||||
@@ -152,7 +194,7 @@ public class GHRateLimit {
|
||||
}
|
||||
|
||||
/**
|
||||
* The core object provides your rate limit status for all non-search-related resources in the REST API.
|
||||
* The core object provides the rate limit status for all non-search-related resources in the REST API.
|
||||
*
|
||||
* @return a rate limit record
|
||||
* @since 1.100
|
||||
@@ -163,42 +205,43 @@ public class GHRateLimit {
|
||||
}
|
||||
|
||||
/**
|
||||
* The search object provides your rate limit status for the Search API. TODO: integrate with header limit updating.
|
||||
* Issue #605.
|
||||
* The search record provides the rate limit status for the Search API.
|
||||
*
|
||||
* @return a rate limit record
|
||||
* @since 1.115
|
||||
*/
|
||||
@Nonnull
|
||||
Record getSearch() {
|
||||
public Record getSearch() {
|
||||
return search;
|
||||
}
|
||||
|
||||
/**
|
||||
* The graphql object provides your rate limit status for the GraphQL API. TODO: integrate with header limit
|
||||
* updating. Issue #605.
|
||||
* The graphql record provides the rate limit status for the GraphQL API.
|
||||
*
|
||||
* @return a rate limit record
|
||||
* @since 1.115
|
||||
*/
|
||||
@Nonnull
|
||||
Record getGraphQL() {
|
||||
public Record getGraphQL() {
|
||||
return graphql;
|
||||
}
|
||||
|
||||
/**
|
||||
* The integration_manifest object provides your rate limit status for the GitHub App Manifest code conversion
|
||||
* endpoint. TODO: integrate with header limit updating. Issue #605.
|
||||
* The integration manifest record provides the rate limit status for the GitHub App Manifest code conversion
|
||||
* endpoint.
|
||||
*
|
||||
* @return a rate limit record
|
||||
* @since 1.115
|
||||
*/
|
||||
@Nonnull
|
||||
Record getIntegrationManifest() {
|
||||
public Record getIntegrationManifest() {
|
||||
return integrationManifest;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "GHRateLimit {" + "core " + getCore().toString() + "search " + getSearch().toString() + "graphql "
|
||||
+ getGraphQL().toString() + "integrationManifest " + getIntegrationManifest().toString() + '}';
|
||||
return "GHRateLimit {" + "core " + getCore().toString() + ", search " + getSearch().toString() + ", graphql "
|
||||
+ getGraphQL().toString() + ", integrationManifest " + getIntegrationManifest().toString() + "}";
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -221,44 +264,111 @@ public class GHRateLimit {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the appropriate {@link Record} for a particular url path.
|
||||
*
|
||||
* @param urlPath
|
||||
* the url path of the request
|
||||
* @return the {@link Record} for a url path.
|
||||
* Merge a {@link GHRateLimit} with another one to create a new {@link GHRateLimit} keeping the latest
|
||||
* {@link Record}s from each.
|
||||
*
|
||||
* @param newLimit
|
||||
* {@link GHRateLimit} with potentially updated {@link Record}s.
|
||||
* @return a merged {@link GHRateLimit} with the latest {@link Record}s from these two instances. If the merged
|
||||
* instance is equal to the current instance, the current instance is returned.
|
||||
*/
|
||||
@Nonnull
|
||||
Record getRecordForUrlPath(@Nonnull String urlPath) {
|
||||
if (urlPath.equals("/rate_limit")) {
|
||||
return new UnknownLimitRecord();
|
||||
} else if (urlPath.startsWith("/search")) {
|
||||
return getSearch();
|
||||
} else if (urlPath.startsWith("/graphql")) {
|
||||
return getGraphQL();
|
||||
} else if (urlPath.startsWith("/app-manifests")) {
|
||||
return getIntegrationManifest();
|
||||
} else {
|
||||
GHRateLimit getMergedRateLimit(@Nonnull GHRateLimit newLimit) {
|
||||
|
||||
GHRateLimit merged = new GHRateLimit(getCore().currentOrUpdated(newLimit.getCore()),
|
||||
getSearch().currentOrUpdated(newLimit.getSearch()),
|
||||
getGraphQL().currentOrUpdated(newLimit.getGraphQL()),
|
||||
getIntegrationManifest().currentOrUpdated(newLimit.getIntegrationManifest()));
|
||||
|
||||
if (merged.equals(this)) {
|
||||
merged = this;
|
||||
}
|
||||
|
||||
return merged;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the specified {@link Record}.
|
||||
*
|
||||
* {@link RateLimitTarget#NONE} will return {@link UnknownLimitRecord#DEFAULT} to prevent any clients from
|
||||
* accidentally waiting on that record to reset before continuing.
|
||||
*
|
||||
* @param rateLimitTarget
|
||||
* the target rate limit record
|
||||
* @return the target {@link Record} from this instance.
|
||||
*/
|
||||
@Nonnull
|
||||
Record getRecord(@Nonnull RateLimitTarget rateLimitTarget) {
|
||||
if (rateLimitTarget == RateLimitTarget.CORE) {
|
||||
return getCore();
|
||||
} else if (rateLimitTarget == RateLimitTarget.SEARCH) {
|
||||
return getSearch();
|
||||
} else if (rateLimitTarget == RateLimitTarget.GRAPHQL) {
|
||||
return getGraphQL();
|
||||
} else if (rateLimitTarget == RateLimitTarget.INTEGRATION_MANIFEST) {
|
||||
return getIntegrationManifest();
|
||||
} else if (rateLimitTarget == RateLimitTarget.NONE) {
|
||||
return UnknownLimitRecord.DEFAULT;
|
||||
} else {
|
||||
throw new IllegalArgumentException("Unknown rate limit target: " + rateLimitTarget.toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A limit record used as a placeholder when the the actual limit is not known.
|
||||
* <p>
|
||||
* Has a large limit and long duration so that it will doesn't expire too often.
|
||||
*
|
||||
* @since 1.100
|
||||
*/
|
||||
public static class UnknownLimitRecord extends Record {
|
||||
|
||||
// One hour
|
||||
private static final long unknownLimitResetSeconds = 60L * 60L;
|
||||
private static final long defaultUnknownLimitResetSeconds = Duration.ofSeconds(30).getSeconds();
|
||||
|
||||
/**
|
||||
* The number of seconds until a {@link UnknownLimitRecord} will expire.
|
||||
*
|
||||
* This is set to a somewhat short duration, rather than a long one. This avoids
|
||||
* {@link {@link GitHubClient#rateLimit(RateLimitTarget)}} requesting rate limit updates continuously, but also
|
||||
* avoids holding on to stale unknown records indefinitely.
|
||||
*
|
||||
* When merging {@link GHRateLimit} instances, {@link UnknownLimitRecord}s will be superseded by incoming
|
||||
* regular {@link Record}s.
|
||||
*
|
||||
* @see GHRateLimit#getMergedRateLimit(GHRateLimit)
|
||||
*/
|
||||
static long unknownLimitResetSeconds = defaultUnknownLimitResetSeconds;
|
||||
|
||||
static final int unknownLimit = 1000000;
|
||||
static final int unknownRemaining = 999999;
|
||||
|
||||
private UnknownLimitRecord() {
|
||||
super(unknownLimit, unknownRemaining, System.currentTimeMillis() / 1000L + unknownLimitResetSeconds);
|
||||
// The default UnknownLimitRecord is an expired record.
|
||||
private static final UnknownLimitRecord DEFAULT = new UnknownLimitRecord(Long.MIN_VALUE);
|
||||
|
||||
// The starting current UnknownLimitRecord is an expired record.
|
||||
private static UnknownLimitRecord current = DEFAULT;
|
||||
|
||||
/**
|
||||
* Create a new unknown record that resets at the specified time.
|
||||
*
|
||||
* @param resetEpochSeconds
|
||||
* the epoch second time when this record will expire.
|
||||
*/
|
||||
private UnknownLimitRecord(long resetEpochSeconds) {
|
||||
super(unknownLimit, unknownRemaining, resetEpochSeconds);
|
||||
}
|
||||
|
||||
static synchronized Record current() {
|
||||
if (current.isExpired()) {
|
||||
current = new UnknownLimitRecord(System.currentTimeMillis() / 1000L + unknownLimitResetSeconds);
|
||||
}
|
||||
return current;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the current UnknownLimitRecord. For use during testing only.
|
||||
*/
|
||||
static synchronized void reset() {
|
||||
current = DEFAULT;
|
||||
unknownLimitResetSeconds = defaultUnknownLimitResetSeconds;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -274,14 +384,12 @@ public class GHRateLimit {
|
||||
private final int remaining;
|
||||
|
||||
/**
|
||||
* Allotted API call per hour.
|
||||
* Allotted API call per time period.
|
||||
*/
|
||||
private final int limit;
|
||||
|
||||
/**
|
||||
* The time at which the current rate limit window resets in UTC epoch seconds.
|
||||
*
|
||||
* This is the raw value returned by the server.
|
||||
*/
|
||||
private final long resetEpochSeconds;
|
||||
|
||||
@@ -291,9 +399,11 @@ public class GHRateLimit {
|
||||
private final long createdAtEpochSeconds = System.currentTimeMillis() / 1000;
|
||||
|
||||
/**
|
||||
* The time at which the rate limit will reset. This value is calculated based on
|
||||
* {@link #getResetEpochSeconds()} by calling {@link #calculateResetDate}. If the clock on the local machine not
|
||||
* synchronized with the server clock, this time value will be adjusted to match the local machine's clock.
|
||||
* The date at which the rate limit will reset, adjusted to local machine time if the local machine's clock not
|
||||
* synchronized with to the same clock as the GitHub server.
|
||||
*
|
||||
* @see #calculateResetDate(String)
|
||||
* @see #getResetDate()
|
||||
*/
|
||||
@Nonnull
|
||||
private final Date resetDate;
|
||||
@@ -341,12 +451,58 @@ public class GHRateLimit {
|
||||
this.resetDate = calculateResetDate(updatedAt);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the current {@link Record} is outdated compared to another. Rate Limit dates are only accurate
|
||||
* to the second, so we look at other information in the record as well.
|
||||
*
|
||||
* {@link Record}s with earlier {@link #getResetEpochSeconds()} are replaced by those with later.
|
||||
* {@link Record}s with the same {@link #getResetEpochSeconds()} are replaced by those with less remaining
|
||||
* count.
|
||||
*
|
||||
* {@link UnknownLimitRecord}s compare with each other like regular {@link Record}s.
|
||||
*
|
||||
* {@link Record}s are replaced by {@link UnknownLimitRecord}s only when the current {@link Record} is expired
|
||||
* and the {@link UnknownLimitRecord} is not. Otherwise Regular {@link Record}s are not replaced by
|
||||
* {@link UnknownLimitRecord}s.
|
||||
*
|
||||
* Expiration is only considered after other checks, meaning expired records may sometimes be replaced by other
|
||||
* expired records.
|
||||
*
|
||||
* @param other
|
||||
* the other {@link Record}
|
||||
* @return the {@link Record} that is most current
|
||||
*/
|
||||
Record currentOrUpdated(@Nonnull Record other) {
|
||||
// This set of checks avoids most calls to isExpired()
|
||||
// Depends on UnknownLimitRecord.current() to prevent continuous updating of GHRateLimit rateLimit()
|
||||
if (getResetEpochSeconds() > other.getResetEpochSeconds()
|
||||
|| (getResetEpochSeconds() == other.getResetEpochSeconds()
|
||||
&& getRemaining() <= other.getRemaining())) {
|
||||
// If the current record has a later reset
|
||||
// or the current record has the same reset and fewer or same requests remaining
|
||||
// Then it is most recent
|
||||
return this;
|
||||
} else if (!(other instanceof UnknownLimitRecord)) {
|
||||
// If the above is not the case that means other has a later reset
|
||||
// or the same resent and fewer requests remaining.
|
||||
// If the other record is not an unknown record, the the other is more recent
|
||||
return other;
|
||||
} else if (this.isExpired() && !other.isExpired()) {
|
||||
// The other is an unknown record.
|
||||
// If the current record has expired and the other hasn't, return the other.
|
||||
return other;
|
||||
}
|
||||
|
||||
// If none of the above, the current record is most valid.
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Recalculates the {@link #resetDate} relative to the local machine clock.
|
||||
* <p>
|
||||
* {@link RateLimitChecker}s and {@link RateLimitHandler}s use {@link #getResetDate()} to make decisions about
|
||||
* how long to wait for until for the rate limit to reset. That means that {@link #getResetDate()} needs to be
|
||||
* accurate to the local machine.
|
||||
* calculated based on the local machine clock.
|
||||
* </p>
|
||||
* <p>
|
||||
* When we say that the clock on two machines is "synchronized", we mean that the UTC time returned from
|
||||
@@ -415,7 +571,7 @@ public class GHRateLimit {
|
||||
* {@link #getResetDate()} or implement a {@link RateLimitChecker} instead.
|
||||
*
|
||||
* @return a long representing the time in epoch seconds when the rate limit will reset
|
||||
* @see #getResetDate() #getResetDate()
|
||||
* @see #getResetDate()
|
||||
*/
|
||||
public long getResetEpochSeconds() {
|
||||
return resetEpochSeconds;
|
||||
@@ -424,6 +580,8 @@ public class GHRateLimit {
|
||||
/**
|
||||
* Whether the rate limit reset date indicated by this instance is expired
|
||||
*
|
||||
* If attempting to wait for the rate limit to reset, consider implementing a {@link RateLimitChecker} instead.
|
||||
*
|
||||
* @return true if the rate limit reset date has passed. Otherwise false.
|
||||
*/
|
||||
public boolean isExpired() {
|
||||
@@ -431,8 +589,8 @@ public class GHRateLimit {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the date at which the rate limit will reset, adjusted to local machine time if the local machine's
|
||||
* clock not synchronized with to the same clock as the GitHub server.
|
||||
* The date at which the rate limit will reset, adjusted to local machine time if the local machine's clock not
|
||||
* synchronized with to the same clock as the GitHub server.
|
||||
*
|
||||
* If attempting to wait for the rate limit to reset, consider implementing a {@link RateLimitChecker} instead.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.kohsuke.github;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -90,6 +91,78 @@ public class GHRef {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrive a ref of the given type for the current GitHub repository.
|
||||
*
|
||||
* @param repository
|
||||
* the repository to read from
|
||||
* @param refName
|
||||
* eg: heads/branch
|
||||
* @return refs matching the request type
|
||||
* @throws IOException
|
||||
* on failure communicating with GitHub, potentially due to an invalid ref type being requested
|
||||
*/
|
||||
static GHRef read(GHRepository repository, String refName) throws IOException {
|
||||
// Also accept e.g. "refs/heads/branch" for consistency with createRef().
|
||||
if (refName.startsWith("refs/")) {
|
||||
refName = refName.replaceFirst("refs/", "");
|
||||
}
|
||||
|
||||
// We would expect this to use `git/ref/%s` but some versions of GHE seem to not support it
|
||||
// Instead use `git/refs/%s` and check the result actually matches the ref
|
||||
GHRef result = null;
|
||||
try {
|
||||
result = repository.root.createRequest()
|
||||
.withUrlPath(repository.getApiTailUrl(String.format("git/refs/%s", refName)))
|
||||
.fetch(GHRef.class)
|
||||
.wrap(repository.root);
|
||||
} catch (IOException e) {
|
||||
// If the parse exception is due to the above returning an array instead of a single ref
|
||||
// that means the individual ref did not exist. Handled by result check below.
|
||||
// Otherwise, rethrow.
|
||||
if (!(e.getCause() instanceof JsonMappingException)) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
// Verify that the ref returned is the one requested
|
||||
// Used .endsWith(refName) instead of .equals("refs/" + refName) to workaround a GitBucket
|
||||
// issue where the "ref" field omits the "refs/" prefix. "endsWith()" is functionally
|
||||
// the same for this scenario - the server refs matching is prefix-based, so
|
||||
// a ref that ends with the correct string will always be the correct one.
|
||||
if (result == null || !result.getRef().endsWith(refName)) {
|
||||
throw new GHFileNotFoundException(String.format("git/refs/%s", refName)
|
||||
+ " {\"message\":\"Not Found\",\"documentation_url\":\"https://developer.github.com/v3/git/refs/#get-a-reference\"}");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves all refs of the given type for the current GitHub repository.
|
||||
*
|
||||
* @param repository
|
||||
* the repository to read from
|
||||
* @param refType
|
||||
* the type of reg to search for e.g. <code>tags</code> or <code>commits</code>
|
||||
* @return paged iterable of all refs of the specified type
|
||||
* @throws IOException
|
||||
* on failure communicating with GitHub, potentially due to an invalid ref type being requested
|
||||
*/
|
||||
static PagedIterable<GHRef> readMatching(GHRepository repository, String refType) throws IOException {
|
||||
if (refType.startsWith("refs/")) {
|
||||
refType = refType.replaceFirst("refs/", "");
|
||||
}
|
||||
|
||||
String url = repository.getApiTailUrl(String.format("git/refs/%s", refType));
|
||||
// if no types, do not end with slash just to be safe.
|
||||
if (refType.equals("")) {
|
||||
url = url.substring(0, url.length() - 1);
|
||||
}
|
||||
return repository.root.createRequest()
|
||||
.withUrlPath(url)
|
||||
.toIterable(GHRef[].class, item -> item.wrap(repository.root));
|
||||
}
|
||||
|
||||
/**
|
||||
* The type GHObject.
|
||||
*/
|
||||
|
||||
@@ -25,7 +25,6 @@ package org.kohsuke.github;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.JsonParseException;
|
||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||
import com.infradna.tool.bridge_method_injector.WithBridgeMethods;
|
||||
import edu.umd.cs.findbugs.annotations.CheckForNull;
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
@@ -47,6 +46,7 @@ import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
@@ -69,7 +69,9 @@ public class GHRepository extends GHObject {
|
||||
/* package almost final */ transient GitHub root;
|
||||
|
||||
private String nodeId, description, homepage, name, full_name;
|
||||
|
||||
private String html_url; // this is the UI
|
||||
|
||||
/*
|
||||
* The license information makes use of the preview API.
|
||||
*
|
||||
@@ -78,22 +80,30 @@ public class GHRepository extends GHObject {
|
||||
private GHLicense license;
|
||||
|
||||
private String git_url, ssh_url, clone_url, svn_url, mirror_url;
|
||||
|
||||
private GHUser owner; // not fully populated. beware.
|
||||
|
||||
private boolean has_issues, has_wiki, fork, has_downloads, has_pages, archived, has_projects;
|
||||
|
||||
private boolean allow_squash_merge;
|
||||
|
||||
private boolean allow_merge_commit;
|
||||
|
||||
private boolean allow_rebase_merge;
|
||||
|
||||
private boolean delete_branch_on_merge;
|
||||
|
||||
@JsonProperty("private")
|
||||
private boolean _private;
|
||||
|
||||
private int forks_count, stargazers_count, watchers_count, size, open_issues_count, subscribers_count;
|
||||
|
||||
private String pushed_at;
|
||||
|
||||
private Map<Integer, GHMilestone> milestones = new WeakHashMap<Integer, GHMilestone>();
|
||||
|
||||
private String default_branch, language;
|
||||
|
||||
private Map<String, GHCommit> commits = new WeakHashMap<String, GHCommit>();
|
||||
|
||||
@SkipFromToString
|
||||
@@ -101,6 +111,12 @@ public class GHRepository extends GHObject {
|
||||
|
||||
private GHRepository source, parent;
|
||||
|
||||
private Boolean isTemplate;
|
||||
|
||||
static GHRepository read(GitHub root, String owner, String name) throws IOException {
|
||||
return root.createRequest().withUrlPath("/repos/" + owner + '/' + name).fetch(GHRepository.class).wrap(root);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create deployment gh deployment builder.
|
||||
*
|
||||
@@ -682,6 +698,28 @@ public class GHRepository extends GHObject {
|
||||
return _private;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is template boolean.
|
||||
*
|
||||
* @return the boolean
|
||||
*/
|
||||
@Deprecated
|
||||
@Preview
|
||||
public boolean isTemplate() {
|
||||
// isTemplate is still in preview, we do not want to retrieve it unless needed.
|
||||
if (isTemplate == null) {
|
||||
try {
|
||||
populate();
|
||||
} catch (IOException e) {
|
||||
// Convert this to a runtime exception to avoid messy method signature
|
||||
throw new GHException("Could not populate the template setting of the repository", e);
|
||||
}
|
||||
// if this somehow is not populated, set it to false;
|
||||
isTemplate = Boolean.TRUE.equals(isTemplate);
|
||||
}
|
||||
return isTemplate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Has downloads boolean.
|
||||
*
|
||||
@@ -971,12 +1009,12 @@ public class GHRepository extends GHObject {
|
||||
@NonNull String method,
|
||||
@CheckForNull GHOrganization.Permission permission) throws IOException {
|
||||
Requester requester = root.createRequest().method(method);
|
||||
|
||||
if (permission != null) {
|
||||
requester = requester.with("permission", permission).inBody();
|
||||
}
|
||||
|
||||
for (GHUser user : users) {
|
||||
// Make sure that the users collection doesn't have any duplicates
|
||||
for (GHUser user : new LinkedHashSet<GHUser>(users)) {
|
||||
requester.withUrlPath(getApiTailUrl("collaborators/" + user.getLogin())).send();
|
||||
}
|
||||
}
|
||||
@@ -1003,8 +1041,9 @@ public class GHRepository extends GHObject {
|
||||
|
||||
private void edit(String key, String value) throws IOException {
|
||||
Requester requester = root.createRequest();
|
||||
if (!key.equals("name"))
|
||||
if (!key.equals("name")) {
|
||||
requester.with("name", name); // even when we don't change the name, we need to send it in
|
||||
}
|
||||
requester.with(key, value).method("PATCH").withUrlPath(getApiTailUrl("")).send();
|
||||
}
|
||||
|
||||
@@ -1249,8 +1288,9 @@ public class GHRepository extends GHObject {
|
||||
// this API is asynchronous. we need to wait for a bit
|
||||
for (int i = 0; i < 10; i++) {
|
||||
GHRepository r = root.getMyself().getRepository(name);
|
||||
if (r != null)
|
||||
if (r != null) {
|
||||
return r;
|
||||
}
|
||||
try {
|
||||
Thread.sleep(3000);
|
||||
} catch (InterruptedException e) {
|
||||
@@ -1279,8 +1319,9 @@ public class GHRepository extends GHObject {
|
||||
// this API is asynchronous. we need to wait for a bit
|
||||
for (int i = 0; i < 10; i++) {
|
||||
GHRepository r = org.getRepository(name);
|
||||
if (r != null)
|
||||
if (r != null) {
|
||||
return r;
|
||||
}
|
||||
try {
|
||||
Thread.sleep(3000);
|
||||
} catch (InterruptedException e) {
|
||||
@@ -1541,8 +1582,7 @@ public class GHRepository extends GHObject {
|
||||
* on failure communicating with GitHub, potentially due to an invalid ref type being requested
|
||||
*/
|
||||
public PagedIterable<GHRef> listRefs() throws IOException {
|
||||
final String url = String.format("/repos/%s/%s/git/refs", getOwnerName(), name);
|
||||
return root.createRequest().withUrlPath(url).toIterable(GHRef[].class, item -> item.wrap(root));
|
||||
return listRefs("");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1568,11 +1608,7 @@ public class GHRepository extends GHObject {
|
||||
* on failure communicating with GitHub, potentially due to an invalid ref type being requested
|
||||
*/
|
||||
public PagedIterable<GHRef> listRefs(String refType) throws IOException {
|
||||
if (refType.startsWith("refs/")) {
|
||||
refType = refType.replaceFirst("refs/", "");
|
||||
}
|
||||
final String url = String.format("/repos/%s/%s/git/refs/%s", getOwnerName(), name, refType);
|
||||
return root.createRequest().withUrlPath(url).toIterable(GHRef[].class, item -> item.wrap(root));
|
||||
return GHRef.readMatching(this, refType);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1585,34 +1621,7 @@ public class GHRepository extends GHObject {
|
||||
* on failure communicating with GitHub, potentially due to an invalid ref type being requested
|
||||
*/
|
||||
public GHRef getRef(String refName) throws IOException {
|
||||
// Also accept e.g. "refs/heads/branch" for consistency with createRef().
|
||||
if (refName.startsWith("refs/")) {
|
||||
refName = refName.replaceFirst("refs/", "");
|
||||
}
|
||||
|
||||
// We would expect this to use `git/ref/%s` but some versions of GHE seem to not support it
|
||||
// Instead use `git/refs/%s` and check the result actually matches the ref
|
||||
GHRef result = null;
|
||||
try {
|
||||
result = root.createRequest()
|
||||
.withUrlPath(getApiTailUrl(String.format("git/refs/%s", refName)))
|
||||
.fetch(GHRef.class)
|
||||
.wrap(root);
|
||||
} catch (IOException e) {
|
||||
// If the parse exception is due to the above returning an array instead of a single ref
|
||||
// that means the individual ref did not exist
|
||||
if (!(e.getCause() instanceof JsonMappingException)) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
// Verify that the ref returned is the one requested
|
||||
if (result == null || !result.getRef().equals("refs/" + refName)) {
|
||||
throw new GHFileNotFoundException(String.format("git/refs/%s", refName)
|
||||
+ " {\"message\":\"Not Found\",\"documentation_url\":\"https://developer.github.com/v3/git/refs/#get-a-reference\"}");
|
||||
}
|
||||
return result;
|
||||
|
||||
return GHRef.read(this, refName);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2754,8 +2763,9 @@ public class GHRepository extends GHObject {
|
||||
}
|
||||
|
||||
String getApiTailUrl(String tail) {
|
||||
if (tail.length() > 0 && !tail.startsWith("/"))
|
||||
if (tail.length() > 0 && !tail.startsWith("/")) {
|
||||
tail = '/' + tail;
|
||||
}
|
||||
return "/repos/" + getOwnerName() + "/" + name + tail;
|
||||
}
|
||||
|
||||
@@ -2862,8 +2872,9 @@ public class GHRepository extends GHObject {
|
||||
* The IO exception
|
||||
*/
|
||||
void populate() throws IOException {
|
||||
if (root.isOffline())
|
||||
if (root.isOffline()) {
|
||||
return; // can't populate if the root is offline
|
||||
}
|
||||
|
||||
final URL url = Objects.requireNonNull(getUrl(), "Missing instance URL!");
|
||||
|
||||
@@ -2872,10 +2883,10 @@ public class GHRepository extends GHObject {
|
||||
// There is bug in Push event payloads that returns the wrong url.
|
||||
// All other occurrences of "url" take the form "https://api.github.com/...".
|
||||
// For Push event repository records, they take the form "https://github.com/{fullName}".
|
||||
root.createRequest().setRawUrlPath(url.toString()).fetchInto(this).wrap(root);
|
||||
root.createRequest().withPreview(BAPTISE).setRawUrlPath(url.toString()).fetchInto(this).wrap(root);
|
||||
} catch (HttpException e) {
|
||||
if (e.getCause() instanceof JsonParseException) {
|
||||
root.createRequest().withUrlPath("/repos/" + full_name).fetchInto(this).wrap(root);
|
||||
root.createRequest().withPreview(BAPTISE).withUrlPath("/repos/" + full_name).fetchInto(this).wrap(root);
|
||||
} else {
|
||||
throw e;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ public abstract class GHSearchBuilder<T> extends GHQueryBuilder<T> {
|
||||
super(root);
|
||||
this.receiverType = receiverType;
|
||||
req.withUrlPath(getApiUrl());
|
||||
req.rateLimit(RateLimitTarget.SEARCH);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -174,6 +174,19 @@ public class GHTeam extends GHObject implements Refreshable {
|
||||
return root.createRequest().withUrlPath(api("/members")).toIterable(GHUser[].class, item -> item.wrapUp(root));
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the teams that are children of this team.
|
||||
*
|
||||
* @return the paged iterable
|
||||
* @throws IOException
|
||||
* the io exception
|
||||
*/
|
||||
public PagedIterable<GHTeam> listChildTeams() throws IOException {
|
||||
return root.createRequest()
|
||||
.withUrlPath(api("/teams"))
|
||||
.toIterable(GHTeam[].class, item -> item.wrapUp(this.organization));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets members.
|
||||
*
|
||||
|
||||
@@ -75,7 +75,7 @@ public class GHTeamBuilder {
|
||||
* parentTeamId of team
|
||||
* @return a builder to continue with building
|
||||
*/
|
||||
public GHTeamBuilder parentTeamId(int parentTeamId) {
|
||||
public GHTeamBuilder parentTeamId(long parentTeamId) {
|
||||
this.builder.with("parent_team_id", parentTeamId);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -373,12 +373,20 @@ public class GitHub {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current rate limit.
|
||||
* Gets the current full rate limit information from the server.
|
||||
*
|
||||
* For some versions of GitHub Enterprise, the {@code /rate_limit} endpoint returns a {@code 404 Not Found}. In that
|
||||
* case, the most recent {@link GHRateLimit} information will be returned, including rate limit information returned
|
||||
* in the response header for this request in if was present.
|
||||
*
|
||||
* For most use cases it would be better to implement a {@link RateLimitChecker} and add it via
|
||||
* {@link GitHubBuilder#withRateLimitChecker(RateLimitChecker)}.
|
||||
*
|
||||
* @return the rate limit
|
||||
* @throws IOException
|
||||
* the io exception
|
||||
*/
|
||||
@Nonnull
|
||||
public GHRateLimit getRateLimit() throws IOException {
|
||||
return client.getRateLimit();
|
||||
}
|
||||
@@ -388,8 +396,11 @@ public class GitHub {
|
||||
* GitHub Enterprise) or if no requests have been made.
|
||||
*
|
||||
* @return the most recently observed rate limit data or {@code null}.
|
||||
* @deprecated implement a {@link RateLimitChecker} and add it via
|
||||
* {@link GitHubBuilder#withRateLimitChecker(RateLimitChecker)}.
|
||||
*/
|
||||
@CheckForNull
|
||||
@Nonnull
|
||||
@Deprecated
|
||||
public GHRateLimit lastRateLimit() {
|
||||
return client.lastRateLimit();
|
||||
}
|
||||
@@ -400,10 +411,13 @@ public class GitHub {
|
||||
* @return the current rate limit data.
|
||||
* @throws IOException
|
||||
* if we couldn't get the current rate limit data.
|
||||
* @deprecated implement a {@link RateLimitChecker} and add it via
|
||||
* {@link GitHubBuilder#withRateLimitChecker(RateLimitChecker)}.
|
||||
*/
|
||||
@Nonnull
|
||||
@Deprecated
|
||||
public GHRateLimit rateLimit() throws IOException {
|
||||
return client.rateLimit();
|
||||
return client.rateLimit(RateLimitTarget.CORE);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -518,7 +532,7 @@ public class GitHub {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the repository object from 'user/reponame' string that GitHub calls as "repository name"
|
||||
* Gets the repository object from 'owner/repo' string that GitHub calls as "repository name"
|
||||
*
|
||||
* @param name
|
||||
* the name
|
||||
@@ -529,9 +543,10 @@ public class GitHub {
|
||||
*/
|
||||
public GHRepository getRepository(String name) throws IOException {
|
||||
String[] tokens = name.split("/");
|
||||
return createRequest().withUrlPath("/repos/" + tokens[0] + '/' + tokens[1])
|
||||
.fetch(GHRepository.class)
|
||||
.wrap(this);
|
||||
if (tokens.length < 2) {
|
||||
throw new IllegalArgumentException("Repository name must be in format owner/repo");
|
||||
}
|
||||
return GHRepository.read(this, tokens[0], tokens[1]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -358,6 +358,18 @@ public class GitHubBuilder implements Cloneable {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a {@link RateLimitChecker} for the Core API for this {@link GitHubBuilder}.
|
||||
*
|
||||
* @param coreRateLimitChecker
|
||||
* the {@link RateLimitChecker} for core GitHub API requests
|
||||
* @return the git hub builder
|
||||
* @see #withRateLimitChecker(RateLimitChecker, RateLimitTarget)
|
||||
*/
|
||||
public GitHubBuilder withRateLimitChecker(@Nonnull RateLimitChecker coreRateLimitChecker) {
|
||||
return withRateLimitChecker(coreRateLimitChecker, RateLimitTarget.CORE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a {@link RateLimitChecker} to this {@link GitHubBuilder}.
|
||||
* <p>
|
||||
@@ -376,15 +388,15 @@ public class GitHubBuilder implements Cloneable {
|
||||
* request.
|
||||
* </p>
|
||||
*
|
||||
* @param coreRateLimitChecker
|
||||
* the {@link RateLimitChecker} for core GitHub API requests
|
||||
* @param rateLimitChecker
|
||||
* the {@link RateLimitChecker} for requests
|
||||
* @param rateLimitTarget
|
||||
* the {@link RateLimitTarget} specifying which rate limit record to check
|
||||
* @return the git hub builder
|
||||
*/
|
||||
public GitHubBuilder withRateLimitChecker(@Nonnull RateLimitChecker coreRateLimitChecker) {
|
||||
this.rateLimitChecker = new GitHubRateLimitChecker(coreRateLimitChecker,
|
||||
RateLimitChecker.NONE,
|
||||
RateLimitChecker.NONE,
|
||||
RateLimitChecker.NONE);
|
||||
public GitHubBuilder withRateLimitChecker(@Nonnull RateLimitChecker rateLimitChecker,
|
||||
@Nonnull RateLimitTarget rateLimitTarget) {
|
||||
this.rateLimitChecker = this.rateLimitChecker.with(rateLimitChecker, rateLimitTarget);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ import com.fasterxml.jackson.databind.ObjectWriter;
|
||||
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
|
||||
import com.fasterxml.jackson.databind.introspect.VisibilityChecker;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
@@ -20,15 +19,15 @@ import java.net.SocketException;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.Instant;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Base64;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.TimeZone;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@@ -45,7 +44,7 @@ import static java.util.logging.Level.*;
|
||||
* A GitHub API Client
|
||||
* <p>
|
||||
* A GitHubClient can be used to send requests and retrieve their responses. GitHubClient is thread-safe and can be used
|
||||
* to send multiple requests. GitHubClient also track some GitHub API information such as {@link #rateLimit()}.
|
||||
* to send multiple requests. GitHubClient also track some GitHub API information such as {@link GHRateLimit}.
|
||||
* </p>
|
||||
*/
|
||||
abstract class GitHubClient {
|
||||
@@ -71,18 +70,18 @@ abstract class GitHubClient {
|
||||
|
||||
private HttpConnector connector;
|
||||
|
||||
private final Object headerRateLimitLock = new Object();
|
||||
private GHRateLimit headerRateLimit = null;
|
||||
private volatile GHRateLimit rateLimit = null;
|
||||
private final Object rateLimitLock = new Object();
|
||||
|
||||
@Nonnull
|
||||
private GHRateLimit rateLimit = GHRateLimit.DEFAULT;
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(GitHubClient.class.getName());
|
||||
|
||||
private static final ObjectMapper MAPPER = new ObjectMapper();
|
||||
static final String GITHUB_URL = "https://api.github.com";
|
||||
|
||||
private static final String[] TIME_FORMATS = { "yyyy/MM/dd HH:mm:ss ZZZZ", "yyyy-MM-dd'T'HH:mm:ss'Z'",
|
||||
"yyyy-MM-dd'T'HH:mm:ss.S'Z'" // GitHub App endpoints return a different date format
|
||||
};
|
||||
private static final DateTimeFormatter DATE_TIME_PARSER_SLASHES = DateTimeFormatter
|
||||
.ofPattern("yyyy/MM/dd HH:mm:ss Z");
|
||||
|
||||
static {
|
||||
MAPPER.setVisibility(new VisibilityChecker.Std(NONE, NONE, NONE, NONE, ANY));
|
||||
@@ -142,10 +141,8 @@ abstract class GitHubClient {
|
||||
}
|
||||
|
||||
private <T> T fetch(Class<T> type, String urlPath) throws IOException {
|
||||
return this
|
||||
.sendRequest(GitHubRequest.newBuilder().withApiUrl(getApiUrl()).withUrlPath(urlPath).build(),
|
||||
(responseInfo) -> GitHubResponse.parseBody(responseInfo, type))
|
||||
.body();
|
||||
GitHubRequest request = GitHubRequest.newBuilder().withApiUrl(getApiUrl()).withUrlPath(urlPath).build();
|
||||
return this.sendRequest(request, (responseInfo) -> GitHubResponse.parseBody(responseInfo, type)).body();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -209,11 +206,14 @@ abstract class GitHubClient {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current rate limit from the server.
|
||||
* Gets the current full rate limit information from the server.
|
||||
*
|
||||
* For some versions of GitHub Enterprise, the {@code /rate_limit} endpoint returns a {@code 404 Not Found}. In
|
||||
* that, if {@link #lastRateLimit()} is not {@code null} and is not expired, it will be returned. Otherwise, a
|
||||
* placeholder {@link GHRateLimit} instance with {@link GHRateLimit.UnknownLimitRecord}s will be returned.
|
||||
* For some versions of GitHub Enterprise, the {@code /rate_limit} endpoint returns a {@code 404 Not Found}. In that
|
||||
* case, the most recent {@link GHRateLimit} information will be returned, including rate limit information returned
|
||||
* in the response header for this request in if was present.
|
||||
*
|
||||
* For most use cases it would be better to implement a {@link RateLimitChecker} and add it via
|
||||
* {@link GitHubBuilder#withRateLimitChecker(RateLimitChecker)}.
|
||||
*
|
||||
* @return the rate limit
|
||||
* @throws IOException
|
||||
@@ -221,59 +221,95 @@ abstract class GitHubClient {
|
||||
*/
|
||||
@Nonnull
|
||||
public GHRateLimit getRateLimit() throws IOException {
|
||||
return getRateLimit(RateLimitTarget.NONE);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
GHRateLimit getRateLimit(@Nonnull RateLimitTarget rateLimitTarget) throws IOException {
|
||||
GHRateLimit result;
|
||||
try {
|
||||
result = fetch(JsonRateLimit.class, "/rate_limit").resources;
|
||||
GitHubRequest request = GitHubRequest.newBuilder()
|
||||
.rateLimit(RateLimitTarget.NONE)
|
||||
.withApiUrl(getApiUrl())
|
||||
.withUrlPath("/rate_limit")
|
||||
.build();
|
||||
result = this
|
||||
.sendRequest(request, (responseInfo) -> GitHubResponse.parseBody(responseInfo, JsonRateLimit.class))
|
||||
.body().resources;
|
||||
} catch (FileNotFoundException e) {
|
||||
// For some versions of GitHub Enterprise, the rate_limit endpoint returns a 404.
|
||||
LOGGER.log(FINE, "/rate_limit returned 404 Not Found.");
|
||||
|
||||
// However some newer versions of GHE include rate limit header information
|
||||
// Use that if available
|
||||
result = lastRateLimit();
|
||||
if (result == null || result.isExpired()) {
|
||||
// return a default rate limit
|
||||
result = GHRateLimit.Unknown();
|
||||
}
|
||||
// If the header info is missing and the endpoint returns 404, fill the rate limit
|
||||
// with unknown
|
||||
result = GHRateLimit.fromRecord(GHRateLimit.UnknownLimitRecord.current(), rateLimitTarget);
|
||||
}
|
||||
|
||||
return rateLimit = result;
|
||||
return updateRateLimit(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the most recently observed rate limit data or {@code null} if either there is no rate limit (for example
|
||||
* GitHub Enterprise) or if no requests have been made.
|
||||
* Returns the most recently observed rate limit data.
|
||||
*
|
||||
* @return the most recently observed rate limit data or {@code null}.
|
||||
* Generally, instead of calling this you should implement a {@link RateLimitChecker} or call
|
||||
*
|
||||
* @return the most recently observed rate limit data. This may include expired or
|
||||
* {@link GHRateLimit.UnknownLimitRecord} entries.
|
||||
* @deprecated implement a {@link RateLimitChecker} and add it via
|
||||
* {@link GitHubBuilder#withRateLimitChecker(RateLimitChecker)}.
|
||||
*/
|
||||
@CheckForNull
|
||||
public GHRateLimit lastRateLimit() {
|
||||
synchronized (headerRateLimitLock) {
|
||||
return headerRateLimit;
|
||||
@Nonnull
|
||||
@Deprecated
|
||||
GHRateLimit lastRateLimit() {
|
||||
synchronized (rateLimitLock) {
|
||||
return rateLimit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current rate limit while trying not to actually make any remote requests unless absolutely necessary.
|
||||
* Gets the current rate limit for an endpoint while trying not to actually make any remote requests unless
|
||||
* absolutely necessary.
|
||||
*
|
||||
* If {@link #lastRateLimit()} is not {@code null} and is not expired, it will be returned. If the information
|
||||
* returned from the last call to {@link #getRateLimit()} is not {@code null} and is not expired, then it will be
|
||||
* returned. Otherwise, the result of a call to {@link #getRateLimit()} will be returned.
|
||||
* If the {@link GHRateLimit.Record} for {@code urlPath} is not expired, it is returned. If the
|
||||
* {@link GHRateLimit.Record} for {@code urlPath} is expired, {@link #getRateLimit()} will be called to get the
|
||||
* current rate limit.
|
||||
*
|
||||
* @return the current rate limit data.
|
||||
* @param rateLimitTarget
|
||||
* the endpoint to get the rate limit for.
|
||||
*
|
||||
* @return the current rate limit data. {@link GHRateLimit.Record}s in this instance may be expired when returned.
|
||||
* @throws IOException
|
||||
* if there was an error getting current rate limit data.
|
||||
*/
|
||||
@Nonnull
|
||||
public GHRateLimit rateLimit() throws IOException {
|
||||
synchronized (headerRateLimitLock) {
|
||||
if (headerRateLimit != null && !headerRateLimit.isExpired()) {
|
||||
return headerRateLimit;
|
||||
GHRateLimit rateLimit(@Nonnull RateLimitTarget rateLimitTarget) throws IOException {
|
||||
synchronized (rateLimitLock) {
|
||||
if (rateLimit.getRecord(rateLimitTarget).isExpired()) {
|
||||
getRateLimit(rateLimitTarget);
|
||||
}
|
||||
return rateLimit;
|
||||
}
|
||||
GHRateLimit result = this.rateLimit;
|
||||
if (result == null || result.isExpired()) {
|
||||
result = getRateLimit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the Rate Limit with the latest info from response header.
|
||||
*
|
||||
* Due to multi-threading, requests might complete out of order. This method calls
|
||||
* {@link GHRateLimit#getMergedRateLimit(GHRateLimit)} to ensure the most current records are used.
|
||||
*
|
||||
* @param observed
|
||||
* {@link GHRateLimit.Record} constructed from the response header information
|
||||
*/
|
||||
private GHRateLimit updateRateLimit(@Nonnull GHRateLimit observed) {
|
||||
synchronized (rateLimitLock) {
|
||||
observed = rateLimit.getMergedRateLimit(observed);
|
||||
|
||||
if (rateLimit != observed) {
|
||||
rateLimit = observed;
|
||||
LOGGER.log(FINE, "Rate limit now: {0}", rateLimit);
|
||||
}
|
||||
return rateLimit;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -369,7 +405,7 @@ abstract class GitHubClient {
|
||||
// Setting "Cache-Control" to "no-cache" stops the cache from supplying
|
||||
// "If-Modified-Since" or "If-None-Match" values.
|
||||
// This makes GitHub give us current data (not incorrectly cached data)
|
||||
request = request.toBuilder().withHeader("Cache-Control", "no-cache").build();
|
||||
request = request.toBuilder().setHeader("Cache-Control", "no-cache").build();
|
||||
continue;
|
||||
}
|
||||
if (!(isRateLimitResponse(responseInfo) || isAbuseLimitResponse(responseInfo))) {
|
||||
@@ -517,58 +553,25 @@ abstract class GitHubClient {
|
||||
}
|
||||
|
||||
private void noteRateLimit(@Nonnull GitHubResponse.ResponseInfo responseInfo) {
|
||||
if (responseInfo.request().urlPath().startsWith("/search")) {
|
||||
// the search API uses a different rate limit
|
||||
return;
|
||||
}
|
||||
|
||||
String limitString = responseInfo.headerField("X-RateLimit-Limit");
|
||||
if (StringUtils.isBlank(limitString)) {
|
||||
// if we are missing a header, return fast
|
||||
return;
|
||||
}
|
||||
String remainingString = responseInfo.headerField("X-RateLimit-Remaining");
|
||||
if (StringUtils.isBlank(remainingString)) {
|
||||
// if we are missing a header, return fast
|
||||
return;
|
||||
}
|
||||
String resetString = responseInfo.headerField("X-RateLimit-Reset");
|
||||
if (StringUtils.isBlank(resetString)) {
|
||||
// if we are missing a header, return fast
|
||||
return;
|
||||
}
|
||||
|
||||
int limit, remaining;
|
||||
long reset;
|
||||
try {
|
||||
String limitString = Objects.requireNonNull(responseInfo.headerField("X-RateLimit-Limit"),
|
||||
"Missing X-RateLimit-Limit");
|
||||
String remainingString = Objects.requireNonNull(responseInfo.headerField("X-RateLimit-Remaining"),
|
||||
"Missing X-RateLimit-Remaining");
|
||||
String resetString = Objects.requireNonNull(responseInfo.headerField("X-RateLimit-Reset"),
|
||||
"Missing X-RateLimit-Reset");
|
||||
int limit, remaining;
|
||||
long reset;
|
||||
limit = Integer.parseInt(limitString);
|
||||
} catch (NumberFormatException e) {
|
||||
if (LOGGER.isLoggable(FINEST)) {
|
||||
LOGGER.log(FINEST, "Malformed X-RateLimit-Limit header value " + limitString, e);
|
||||
}
|
||||
return;
|
||||
}
|
||||
try {
|
||||
|
||||
remaining = Integer.parseInt(remainingString);
|
||||
} catch (NumberFormatException e) {
|
||||
if (LOGGER.isLoggable(FINEST)) {
|
||||
LOGGER.log(FINEST, "Malformed X-RateLimit-Remaining header value " + remainingString, e);
|
||||
}
|
||||
return;
|
||||
}
|
||||
try {
|
||||
reset = Long.parseLong(resetString);
|
||||
} catch (NumberFormatException e) {
|
||||
GHRateLimit.Record observed = new GHRateLimit.Record(limit, remaining, reset, responseInfo);
|
||||
updateRateLimit(GHRateLimit.fromRecord(observed, responseInfo.request().rateLimitTarget()));
|
||||
} catch (NumberFormatException | NullPointerException e) {
|
||||
if (LOGGER.isLoggable(FINEST)) {
|
||||
LOGGER.log(FINEST, "Malformed X-RateLimit-Reset header value " + resetString, e);
|
||||
LOGGER.log(FINEST, "Missing or malformed X-RateLimit header: ", e);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
GHRateLimit.Record observed = new GHRateLimit.Record(limit, remaining, reset, responseInfo);
|
||||
|
||||
updateCoreRateLimit(observed);
|
||||
}
|
||||
|
||||
private static void detectOTPRequired(@Nonnull GitHubResponse.ResponseInfo responseInfo) throws GHIOException {
|
||||
@@ -588,23 +591,6 @@ abstract class GitHubClient {
|
||||
"This operation requires a credential but none is given to the GitHub constructor");
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the Rate Limit with the latest info from response header. Due to multi-threading requests might complete
|
||||
* out of order, we want to pick the one with the most recent info from the server. Calls
|
||||
* {@link #shouldReplace(GHRateLimit.Record, GHRateLimit.Record)}
|
||||
*
|
||||
* @param observed
|
||||
* {@link GHRateLimit.Record} constructed from the response header information
|
||||
*/
|
||||
private void updateCoreRateLimit(@Nonnull GHRateLimit.Record observed) {
|
||||
synchronized (headerRateLimitLock) {
|
||||
if (headerRateLimit == null || shouldReplace(observed, headerRateLimit.getCore())) {
|
||||
headerRateLimit = GHRateLimit.fromHeaderRecord(observed);
|
||||
LOGGER.log(FINE, "Rate limit now: {0}", headerRateLimit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static class GHApiInfo {
|
||||
private String rate_limit_url;
|
||||
|
||||
@@ -654,37 +640,6 @@ abstract class GitHubClient {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if one {@link GHRateLimit.Record} should replace another. Header date is only accurate to the second,
|
||||
* so we look at the information in the record itself.
|
||||
*
|
||||
* {@link GHRateLimit.UnknownLimitRecord}s are always replaced by regular {@link GHRateLimit.Record}s. Regular
|
||||
* {@link GHRateLimit.Record}s are never replaced by {@link GHRateLimit.UnknownLimitRecord}s. Candidates with
|
||||
* resetEpochSeconds later than current record are more recent. Candidates with the same reset and a lower remaining
|
||||
* count are more recent. Candidates with an earlier reset are older.
|
||||
*
|
||||
* @param candidate
|
||||
* {@link GHRateLimit.Record} constructed from the response header information
|
||||
* @param current
|
||||
* the current {@link GHRateLimit.Record} record
|
||||
*/
|
||||
static boolean shouldReplace(@Nonnull GHRateLimit.Record candidate, @Nonnull GHRateLimit.Record current) {
|
||||
if (candidate instanceof GHRateLimit.UnknownLimitRecord
|
||||
&& !(current instanceof GHRateLimit.UnknownLimitRecord)) {
|
||||
// Unknown candidate never replaces a regular record
|
||||
return false;
|
||||
} else if (current instanceof GHRateLimit.UnknownLimitRecord
|
||||
&& !(candidate instanceof GHRateLimit.UnknownLimitRecord)) {
|
||||
// Any real record should replace an unknown Record.
|
||||
return true;
|
||||
} else {
|
||||
// records of the same type compare to each other as normal.
|
||||
return current.getResetEpochSeconds() < candidate.getResetEpochSeconds()
|
||||
|| (current.getResetEpochSeconds() == candidate.getResetEpochSeconds()
|
||||
&& current.getRemaining() > candidate.getRemaining());
|
||||
}
|
||||
}
|
||||
|
||||
static URL parseURL(String s) {
|
||||
try {
|
||||
return s == null ? null : new URL(s);
|
||||
@@ -696,22 +651,24 @@ abstract class GitHubClient {
|
||||
static Date parseDate(String timestamp) {
|
||||
if (timestamp == null)
|
||||
return null;
|
||||
for (String f : TIME_FORMATS) {
|
||||
try {
|
||||
SimpleDateFormat df = new SimpleDateFormat(f);
|
||||
df.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||
return df.parse(timestamp);
|
||||
} catch (ParseException e) {
|
||||
// try next
|
||||
}
|
||||
|
||||
return Date.from(parseInstant(timestamp));
|
||||
}
|
||||
|
||||
static Instant parseInstant(String timestamp) {
|
||||
if (timestamp == null)
|
||||
return null;
|
||||
|
||||
if (timestamp.charAt(4) == '/') {
|
||||
// Unsure where this is used, but retained for compatibility.
|
||||
return Instant.from(DATE_TIME_PARSER_SLASHES.parse(timestamp));
|
||||
} else {
|
||||
return Instant.from(DateTimeFormatter.ISO_OFFSET_DATE_TIME.parse(timestamp));
|
||||
}
|
||||
throw new IllegalStateException("Unable to parse the timestamp: " + timestamp);
|
||||
}
|
||||
|
||||
static String printDate(Date dt) {
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
|
||||
df.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||
return df.format(dt);
|
||||
return DateTimeFormatter.ISO_INSTANT.format(Instant.ofEpochMilli(dt.getTime()).truncatedTo(ChronoUnit.SECONDS));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,7 +24,7 @@ import static org.apache.commons.lang3.StringUtils.defaultString;
|
||||
* A GitHub API Client for HttpUrlConnection
|
||||
* <p>
|
||||
* A GitHubClient can be used to send requests and retrieve their responses. GitHubClient is thread-safe and can be used
|
||||
* to send multiple requests. GitHubClient also track some GitHub API information such as {@link #rateLimit()}.
|
||||
* to send multiple requests. GitHubClient also track some GitHub API information such as {@link GHRateLimit}.
|
||||
* </p>
|
||||
* <p>
|
||||
* GitHubHttpUrlConnectionClient gets a new {@link HttpURLConnection} for each call to send.
|
||||
|
||||
@@ -3,26 +3,28 @@ package org.kohsuke.github;
|
||||
import java.io.IOException;
|
||||
import java.io.InterruptedIOException;
|
||||
import java.util.Objects;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* A GitHub API Rate Limit Checker called before each request. This class provides the basic infrastructure for calling
|
||||
* the appropriate {@link RateLimitChecker} for a request and retrying as many times as needed. This class supports more
|
||||
* complex throttling strategies and polling, but leaves the specifics to the {@link RateLimitChecker} implementations.
|
||||
* A GitHub API Rate Limit Checker called before each request.
|
||||
*
|
||||
* <p>
|
||||
* GitHub allots a certain number of requests to each user or application per period of time (usually per hour). The
|
||||
* number of requests remaining is returned in the response header and can also be requested using
|
||||
* {@link GitHub#getRateLimit()}. This requests per interval is referred to as the "rate limit".
|
||||
* GitHub allots a certain number of requests to each user or application per period of time. The number of requests
|
||||
* remaining and the time when the number will be reset is returned in the response header and can also be requested
|
||||
* using {@link GitHub#getRateLimit()}. The "requests per interval" is referred to as the "rate limit".
|
||||
* </p>
|
||||
* <p>
|
||||
* GitHub prefers that clients stop before exceeding their rate limit rather than stopping after they exceed it. The
|
||||
* {@link RateLimitChecker} is called before each request to check the rate limit and wait if the checker criteria are
|
||||
* met.
|
||||
* Different parts of the GitHub API have separate rate limits, but most of REST API uses {@link RateLimitTarget#CORE}.
|
||||
* Checking your rate limit using {@link GitHub#getRateLimit()} does not effect your rate limit. GitHub prefers that
|
||||
* clients stop before exceeding their rate limit rather than stopping after they exceed it.
|
||||
* </p>
|
||||
* <p>
|
||||
* Checking your rate limit using {@link GitHub#getRateLimit()} does not effect your rate limit, but each {@link GitHub}
|
||||
* instance will attempt to cache and reuse the last see rate limit rather than making a new request.
|
||||
* This class provides the infrastructure for calling the appropriate {@link RateLimitChecker} before each request and
|
||||
* retrying than call many times as needed. Each {@link RateLimitChecker} decides whether to wait and for how long. This
|
||||
* allows for a wide range of {@link RateLimitChecker} implementations, including complex throttling strategies and
|
||||
* polling.
|
||||
* </p>
|
||||
*/
|
||||
class GitHubRateLimitChecker {
|
||||
@@ -39,6 +41,8 @@ class GitHubRateLimitChecker {
|
||||
@Nonnull
|
||||
private final RateLimitChecker integrationManifest;
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(GitHubRateLimitChecker.class.getName());
|
||||
|
||||
GitHubRateLimitChecker() {
|
||||
this(RateLimitChecker.NONE, RateLimitChecker.NONE, RateLimitChecker.NONE, RateLimitChecker.NONE);
|
||||
}
|
||||
@@ -48,40 +52,57 @@ class GitHubRateLimitChecker {
|
||||
@Nonnull RateLimitChecker graphql,
|
||||
@Nonnull RateLimitChecker integrationManifest) {
|
||||
this.core = Objects.requireNonNull(core);
|
||||
|
||||
// for now only support rate limiting on core
|
||||
// remove these asserts when that changes
|
||||
assert search == RateLimitChecker.NONE;
|
||||
assert graphql == RateLimitChecker.NONE;
|
||||
assert integrationManifest == RateLimitChecker.NONE;
|
||||
|
||||
this.search = Objects.requireNonNull(search);
|
||||
this.graphql = Objects.requireNonNull(graphql);
|
||||
this.integrationManifest = Objects.requireNonNull(integrationManifest);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new {@link GitHubRateLimitChecker} with a new checker for a particular target.
|
||||
*
|
||||
* Only one {@link RateLimitChecker} is allowed per target.
|
||||
*
|
||||
* @param checker
|
||||
* the {@link RateLimitChecker} to apply.
|
||||
* @param rateLimitTarget
|
||||
* the {@link RateLimitTarget} for this checker. If {@link RateLimitTarget#NONE}, checker will be ignored
|
||||
* and no change will be made.
|
||||
* @return a new {@link GitHubRateLimitChecker}
|
||||
*/
|
||||
GitHubRateLimitChecker with(@Nonnull RateLimitChecker checker, @Nonnull RateLimitTarget rateLimitTarget) {
|
||||
return new GitHubRateLimitChecker(rateLimitTarget == RateLimitTarget.CORE ? checker : core,
|
||||
rateLimitTarget == RateLimitTarget.SEARCH ? checker : search,
|
||||
rateLimitTarget == RateLimitTarget.GRAPHQL ? checker : graphql,
|
||||
rateLimitTarget == RateLimitTarget.INTEGRATION_MANIFEST ? checker : integrationManifest);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether there is sufficient requests remaining within this client's rate limit quota to make the current
|
||||
* request.
|
||||
* <p>
|
||||
* This method does not do the actual check. Instead it select the appropriate {@link RateLimitChecker} and
|
||||
* {@link GHRateLimit.Record} for the current request's urlPath. If the {@link RateLimitChecker} for this the
|
||||
* current request's urlPath is {@link RateLimitChecker#NONE} the rate limit is not checked. If not, it calls
|
||||
* {@link RateLimitChecker#checkRateLimit(GHRateLimit.Record, long)}. which decides if the rate limit has been
|
||||
* exceeded and then sleeps for as long is it choose.
|
||||
* This method does not do the actual check. Instead it selects the appropriate {@link RateLimitChecker} and
|
||||
* {@link GHRateLimit.Record} for the current request's {@link RateLimitTarget}. It then calls
|
||||
* {@link RateLimitChecker#checkRateLimit(GHRateLimit.Record, long)}.
|
||||
* </p>
|
||||
* <p>
|
||||
* It is up to the {@link RateLimitChecker#checkRateLimit(GHRateLimit.Record, long)} which decide if the rate limit
|
||||
* has been exceeded. If it has, that method will sleep for as long is it chooses and then return {@code true}. If
|
||||
* not, that method will return {@code false}.
|
||||
* It is up to {@link RateLimitChecker#checkRateLimit(GHRateLimit.Record, long)} to which decide if the rate limit
|
||||
* has been exceeded. If it has, {@link RateLimitChecker#checkRateLimit(GHRateLimit.Record, long)} will sleep for as
|
||||
* long is it chooses and then return {@code true}. If not, that method will return {@code false}.
|
||||
* </p>
|
||||
* <p>
|
||||
* As long as {@link RateLimitChecker#checkRateLimit(GHRateLimit.Record, long)} returns {@code true}, this method
|
||||
* will request updated rate limit information and call
|
||||
* {@link RateLimitChecker#checkRateLimit(GHRateLimit.Record, long)} again. This looping allows implementers of
|
||||
* {@link RateLimitChecker#checkRateLimit(GHRateLimit.Record, long)} to apply any number of strategies to
|
||||
* controlling the speed at which requests are made. When it returns {@code false} this method will return and the
|
||||
* request will be sent.
|
||||
* {@link RateLimitChecker#checkRateLimit(GHRateLimit.Record, long)} again. This looping allows different
|
||||
* {@link RateLimitChecker} implementations to apply any number of strategies to controlling the speed at which
|
||||
* requests are made.
|
||||
* </p>
|
||||
* <p>
|
||||
* When the {@link RateLimitChecker} returns {@code false} this method will return and the request processing will
|
||||
* continue.
|
||||
* </p>
|
||||
* <p>
|
||||
* If the {@link RateLimitChecker} for this the current request's urlPath is {@link RateLimitChecker#NONE} the rate
|
||||
* limit is not checked.
|
||||
* </p>
|
||||
*
|
||||
* @param client
|
||||
@@ -92,14 +113,14 @@ class GitHubRateLimitChecker {
|
||||
* if there is an I/O error
|
||||
*/
|
||||
void checkRateLimit(GitHubClient client, GitHubRequest request) throws IOException {
|
||||
RateLimitChecker guard = selectChecker(request.urlPath());
|
||||
RateLimitChecker guard = selectChecker(request.rateLimitTarget());
|
||||
if (guard == RateLimitChecker.NONE) {
|
||||
return;
|
||||
}
|
||||
|
||||
// For the first rate limit, accept the current limit if a valid one is already present.
|
||||
GHRateLimit rateLimit = client.rateLimit();
|
||||
GHRateLimit.Record rateLimitRecord = rateLimit.getRecordForUrlPath(request.urlPath());
|
||||
GHRateLimit rateLimit = client.rateLimit(request.rateLimitTarget());
|
||||
GHRateLimit.Record rateLimitRecord = rateLimit.getRecord(request.rateLimitTarget());
|
||||
long waitCount = 0;
|
||||
try {
|
||||
while (guard.checkRateLimit(rateLimitRecord, waitCount)) {
|
||||
@@ -112,8 +133,8 @@ class GitHubRateLimitChecker {
|
||||
Thread.sleep(1000);
|
||||
|
||||
// After the first wait, always request a new rate limit from the server.
|
||||
rateLimit = client.getRateLimit();
|
||||
rateLimitRecord = rateLimit.getRecordForUrlPath(request.urlPath());
|
||||
rateLimit = client.getRateLimit(request.rateLimitTarget());
|
||||
rateLimitRecord = rateLimit.getRecord(request.rateLimitTarget());
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
throw (IOException) new InterruptedIOException(e.getMessage()).initCause(e);
|
||||
@@ -121,25 +142,28 @@ class GitHubRateLimitChecker {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the appropriate {@link RateLimitChecker} for a particular url path. Similar to
|
||||
* {@link GHRateLimit#getRecordForUrlPath(String)}.
|
||||
* Gets the appropriate {@link RateLimitChecker} for a particular target.
|
||||
*
|
||||
* @param urlPath
|
||||
* the url path of the request
|
||||
* @return the {@link RateLimitChecker} for a url path.
|
||||
* Analogous with {@link GHRateLimit#getRecord(RateLimitTarget)}.
|
||||
*
|
||||
* @param rateLimitTarget
|
||||
* the rate limit to check
|
||||
* @return the {@link RateLimitChecker} for a particular target
|
||||
*/
|
||||
@Nonnull
|
||||
private RateLimitChecker selectChecker(@Nonnull String urlPath) {
|
||||
if (urlPath.equals("/rate_limit")) {
|
||||
private RateLimitChecker selectChecker(@Nonnull RateLimitTarget rateLimitTarget) {
|
||||
if (rateLimitTarget == RateLimitTarget.NONE) {
|
||||
return RateLimitChecker.NONE;
|
||||
} else if (urlPath.startsWith("/search")) {
|
||||
} else if (rateLimitTarget == RateLimitTarget.CORE) {
|
||||
return core;
|
||||
} else if (rateLimitTarget == RateLimitTarget.SEARCH) {
|
||||
return search;
|
||||
} else if (urlPath.startsWith("/graphql")) {
|
||||
} else if (rateLimitTarget == RateLimitTarget.GRAPHQL) {
|
||||
return graphql;
|
||||
} else if (urlPath.startsWith("/app-manifests")) {
|
||||
} else if (rateLimitTarget == RateLimitTarget.INTEGRATION_MANIFEST) {
|
||||
return integrationManifest;
|
||||
} else {
|
||||
return core;
|
||||
throw new IllegalArgumentException("Unknown rate limit target: " + rateLimitTarget.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ class GitHubRequest {
|
||||
private final String apiUrl;
|
||||
private final String urlPath;
|
||||
private final String method;
|
||||
private final RateLimitTarget rateLimitTarget;
|
||||
private final InputStream body;
|
||||
private final boolean forceBody;
|
||||
|
||||
@@ -56,6 +57,7 @@ class GitHubRequest {
|
||||
@Nonnull String apiUrl,
|
||||
@Nonnull String urlPath,
|
||||
@Nonnull String method,
|
||||
@Nonnull RateLimitTarget rateLimitTarget,
|
||||
@CheckForNull InputStream body,
|
||||
boolean forceBody) throws MalformedURLException {
|
||||
this.args = Collections.unmodifiableList(new ArrayList<>(args));
|
||||
@@ -64,6 +66,7 @@ class GitHubRequest {
|
||||
this.apiUrl = apiUrl;
|
||||
this.urlPath = urlPath;
|
||||
this.method = method;
|
||||
this.rateLimitTarget = rateLimitTarget;
|
||||
this.body = body;
|
||||
this.forceBody = forceBody;
|
||||
String tailApiUrl = buildTailApiUrl();
|
||||
@@ -119,6 +122,16 @@ class GitHubRequest {
|
||||
return method;
|
||||
}
|
||||
|
||||
/**
|
||||
* The rate limit target for this request.
|
||||
*
|
||||
* @return the rate limit to use for this request.
|
||||
*/
|
||||
@Nonnull
|
||||
public RateLimitTarget rateLimitTarget() {
|
||||
return rateLimitTarget;
|
||||
}
|
||||
|
||||
/**
|
||||
* The arguments for this request. Depending on the {@link #method()} and {@code #inBody()} these maybe added to the
|
||||
* url or to the request body.
|
||||
@@ -217,7 +230,15 @@ class GitHubRequest {
|
||||
* @return a {@link Builder} based on this request.
|
||||
*/
|
||||
public Builder<?> toBuilder() {
|
||||
return new Builder<>(args, headers, injectedMappingValues, apiUrl, urlPath, method, body, forceBody);
|
||||
return new Builder<>(args,
|
||||
headers,
|
||||
injectedMappingValues,
|
||||
apiUrl,
|
||||
urlPath,
|
||||
method,
|
||||
rateLimitTarget,
|
||||
body,
|
||||
forceBody);
|
||||
}
|
||||
|
||||
private String buildTailApiUrl() {
|
||||
@@ -281,6 +302,10 @@ class GitHubRequest {
|
||||
*/
|
||||
@Nonnull
|
||||
private String method;
|
||||
|
||||
@Nonnull
|
||||
private RateLimitTarget rateLimitTarget;
|
||||
|
||||
private InputStream body;
|
||||
private boolean forceBody;
|
||||
|
||||
@@ -294,6 +319,7 @@ class GitHubRequest {
|
||||
GitHubClient.GITHUB_URL,
|
||||
"/",
|
||||
"GET",
|
||||
RateLimitTarget.CORE,
|
||||
null,
|
||||
false);
|
||||
}
|
||||
@@ -304,6 +330,7 @@ class GitHubRequest {
|
||||
@Nonnull String apiUrl,
|
||||
@Nonnull String urlPath,
|
||||
@Nonnull String method,
|
||||
@Nonnull RateLimitTarget rateLimitTarget,
|
||||
@CheckForNull @WillClose InputStream body,
|
||||
boolean forceBody) {
|
||||
this.args = new ArrayList<>(args);
|
||||
@@ -312,6 +339,7 @@ class GitHubRequest {
|
||||
this.apiUrl = apiUrl;
|
||||
this.urlPath = urlPath;
|
||||
this.method = method;
|
||||
this.rateLimitTarget = rateLimitTarget;
|
||||
this.body = body;
|
||||
this.forceBody = forceBody;
|
||||
}
|
||||
@@ -324,7 +352,15 @@ class GitHubRequest {
|
||||
* if the GitHub API URL cannot be constructed
|
||||
*/
|
||||
public GitHubRequest build() throws MalformedURLException {
|
||||
return new GitHubRequest(args, headers, injectedMappingValues, apiUrl, urlPath, method, body, forceBody);
|
||||
return new GitHubRequest(args,
|
||||
headers,
|
||||
injectedMappingValues,
|
||||
apiUrl,
|
||||
urlPath,
|
||||
method,
|
||||
rateLimitTarget,
|
||||
body,
|
||||
forceBody);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -348,9 +384,11 @@ class GitHubRequest {
|
||||
* the name
|
||||
* @param value
|
||||
* the value
|
||||
* @return the request builder
|
||||
*/
|
||||
public void setHeader(String name, String value) {
|
||||
public B setHeader(String name, String value) {
|
||||
headers.put(name, value);
|
||||
return (B) this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -363,8 +401,11 @@ class GitHubRequest {
|
||||
* @return the request builder
|
||||
*/
|
||||
public B withHeader(String name, String value) {
|
||||
setHeader(name, value);
|
||||
return (B) this;
|
||||
String oldValue = headers.get(name);
|
||||
if (!StringUtils.isBlank(oldValue)) {
|
||||
value = oldValue + ", " + value;
|
||||
}
|
||||
return setHeader(name, value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -562,6 +603,18 @@ class GitHubRequest {
|
||||
return (B) this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method requester.
|
||||
*
|
||||
* @param rateLimitTarget
|
||||
* the rate limit target for this request. Default is {@link RateLimitTarget#CORE}.
|
||||
* @return the request builder
|
||||
*/
|
||||
public B rateLimit(@Nonnull RateLimitTarget rateLimitTarget) {
|
||||
this.rateLimitTarget = rateLimitTarget;
|
||||
return (B) this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Content type requester.
|
||||
*
|
||||
@@ -623,13 +676,9 @@ class GitHubRequest {
|
||||
tailUrlPath += "/" + String.join("/", urlPathItems);
|
||||
}
|
||||
|
||||
if (this.urlPath.endsWith("/")) {
|
||||
tailUrlPath = StringUtils.stripStart(tailUrlPath, "/");
|
||||
} else {
|
||||
tailUrlPath = StringUtils.prependIfMissing(tailUrlPath, "/");
|
||||
}
|
||||
tailUrlPath = StringUtils.prependIfMissing(tailUrlPath, "/");
|
||||
|
||||
this.urlPath += urlPathEncode(tailUrlPath);
|
||||
this.urlPath = urlPathEncode(tailUrlPath);
|
||||
return (B) this;
|
||||
}
|
||||
|
||||
|
||||
@@ -78,9 +78,14 @@ class GitHubResponse<T> {
|
||||
@CheckForNull
|
||||
static <T> T parseBody(ResponseInfo responseInfo, Class<T> type) throws IOException {
|
||||
|
||||
if (responseInfo.statusCode() == HttpURLConnection.HTTP_NO_CONTENT && type != null && type.isArray()) {
|
||||
// no content
|
||||
return type.cast(Array.newInstance(type.getComponentType(), 0));
|
||||
if (responseInfo.statusCode() == HttpURLConnection.HTTP_NO_CONTENT) {
|
||||
if (type != null && type.isArray()) {
|
||||
// no content for array should be empty array
|
||||
return type.cast(Array.newInstance(type.getComponentType(), 0));
|
||||
} else {
|
||||
// no content for object should be null
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
String data = responseInfo.getBodyAsString();
|
||||
|
||||
@@ -15,6 +15,14 @@ class Previews {
|
||||
*/
|
||||
static final String ANTIOPE = "application/vnd.github.antiope-preview+json";
|
||||
|
||||
/**
|
||||
* Create repository from template repository
|
||||
*
|
||||
* @see <a href="https://developer.github.com/v3/previews/#create-and-use-repository-templates">GitHub API
|
||||
* Previews</a>
|
||||
*/
|
||||
static final String BAPTISE = "application/vnd.github.baptiste-preview+json";
|
||||
|
||||
/**
|
||||
* Commit Search
|
||||
*
|
||||
@@ -58,6 +66,14 @@ class Previews {
|
||||
*/
|
||||
static final String MERCY = "application/vnd.github.mercy-preview+json";
|
||||
|
||||
/**
|
||||
* New visibility parameter for the Repositories API
|
||||
*
|
||||
* @see <a href="https://developer.github.com/v3/previews/#new-visibility-parameter-for-the-repositories-api">GitHub
|
||||
* API Previews</a>
|
||||
*/
|
||||
static final String NEBULA = "application/vnd.github.nebula-preview+json";
|
||||
|
||||
/**
|
||||
* Draft pull requests
|
||||
*
|
||||
@@ -78,4 +94,5 @@ class Previews {
|
||||
* @see <a href="https://developer.github.com/v3/previews/#require-signed-commits">GitHub API Previews</a>
|
||||
*/
|
||||
static final String ZZZAX = "application/vnd.github.zzzax-preview+json";
|
||||
|
||||
}
|
||||
|
||||
@@ -5,20 +5,17 @@ import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* A GitHub API Rate Limit Checker called before each request
|
||||
*
|
||||
* <p>
|
||||
* GitHub allots a certain number of requests to each user or application per period of time (usually per hour). The
|
||||
* number of requests remaining is returned in the response header and can also be requested using
|
||||
* {@link GitHub#getRateLimit()}. This requests per interval is referred to as the "rate limit".
|
||||
* GitHub allots a certain number of requests to each user or application per period of time. The number of requests
|
||||
* remaining and the time when the number will be reset is returned in the response header and can also be requested
|
||||
* using {@link GitHub#getRateLimit()}. The "requests per interval" is referred to as the "rate limit".
|
||||
* </p>
|
||||
* <p>
|
||||
* GitHub prefers that clients stop before exceeding their rate limit rather than stopping after they exceed it. The
|
||||
* {@link RateLimitChecker} is called before each request to check the rate limit and wait if the checker criteria are
|
||||
* met.
|
||||
* </p>
|
||||
* <p>
|
||||
* Checking your rate limit using {@link GitHub#getRateLimit()} does not effect your rate limit, but each {@link GitHub}
|
||||
* instance will attempt to cache and reuse the last see rate limit rather than making a new request.
|
||||
* </p>
|
||||
*/
|
||||
public abstract class RateLimitChecker {
|
||||
|
||||
@@ -33,28 +30,21 @@ public abstract class RateLimitChecker {
|
||||
* free to choose whatever strategy they prefer for what is considered to exceed the budget and how long to sleep.
|
||||
*
|
||||
* <p>
|
||||
* The caller of this method figures out which {@link GHRateLimit.Record} applies for the current request add
|
||||
* The caller of this method figures out which {@link GHRateLimit.Record} applies for the current request and
|
||||
* provides it to this method.
|
||||
* </p>
|
||||
* <p>
|
||||
* It is important to remember that rate limit reset times are only accurate to the second. Trying to sleep to
|
||||
* exactly the reset time would be likely to produce worse behavior rather than better. For this reason
|
||||
* {@link GitHubRateLimitChecker} may choose to add more sleep times when a checker indicates the rate limit was
|
||||
* exceeded.
|
||||
* As long as this method returns {@code true} it is guaranteed that {@link GitHubRateLimitChecker} will retrieve
|
||||
* updated rate limit information and call this method again with {@code count} incremented by one. When this
|
||||
* checker returns {@code false}, the calling {@link GitHubRateLimitChecker} will let the request continue.
|
||||
* </p>
|
||||
* <p>
|
||||
* As long as this method returns {@code true} it is guaranteed that {@link GitHubRateLimitChecker} will get updated
|
||||
* rate limit information and call this method again with {@code count} incremented by one. After this method
|
||||
* returns {@code true} at least once, the calling {@link GitHubRateLimitChecker} may choose to wait some additional
|
||||
* period of time between calls to this checker.
|
||||
* Rate limit reset times are only accurate to the second. Trying to sleep to exactly the reset time could result in
|
||||
* requests being sent before the new rate limit was available. For this reason, if this method returned
|
||||
* {@code true} at least once for a particular request, {@link GitHubRateLimitChecker} may choose to sleep for some
|
||||
* small additional between calls and before letting the request continue.
|
||||
* </p>
|
||||
* <p>
|
||||
* After this checker returns {@code false}, the calling {@link GitHubRateLimitChecker} will let the request
|
||||
* continue. If this method returned {@code true} at least once for a particular request, the calling
|
||||
* {@link GitHubRateLimitChecker} may choose to wait some additional period of time before letting the request be
|
||||
* sent.
|
||||
* </p>
|
||||
*
|
||||
*
|
||||
* @param rateLimitRecord
|
||||
* the current {@link GHRateLimit.Record} to check against.
|
||||
* @param count
|
||||
|
||||
36
src/main/java/org/kohsuke/github/RateLimitTarget.java
Normal file
36
src/main/java/org/kohsuke/github/RateLimitTarget.java
Normal file
@@ -0,0 +1,36 @@
|
||||
package org.kohsuke.github;
|
||||
|
||||
/**
|
||||
* Specifies the rate limit record of an operation.
|
||||
*
|
||||
* @see GitHubBuilder#withRateLimitChecker(RateLimitChecker, RateLimitTarget)
|
||||
*/
|
||||
public enum RateLimitTarget {
|
||||
/**
|
||||
* Selects or updates the {@link GHRateLimit#getCore()} record.
|
||||
*/
|
||||
CORE,
|
||||
|
||||
/**
|
||||
* Selects or updates the {@link GHRateLimit#getSearch()} record.
|
||||
*/
|
||||
SEARCH,
|
||||
|
||||
/**
|
||||
* Selects or updates the {@link GHRateLimit#getGraphQL()} record.
|
||||
*/
|
||||
GRAPHQL,
|
||||
|
||||
/**
|
||||
* Selects or updates the {@link GHRateLimit#getIntegrationManifest()} record.
|
||||
*/
|
||||
INTEGRATION_MANIFEST,
|
||||
|
||||
/**
|
||||
* Selects no rate limit.
|
||||
*
|
||||
* This request uses no rate limit. If the response header includes rate limit information, it will apply to
|
||||
* {@link #CORE}.
|
||||
*/
|
||||
NONE
|
||||
}
|
||||
31
src/site/apt/createorglevelresources.apt
Normal file
31
src/site/apt/createorglevelresources.apt
Normal file
@@ -0,0 +1,31 @@
|
||||
Creating resources at the organization level
|
||||
|
||||
In order to create resources in GitHub for a given organization, you must first create an object of type <<<GHOrganization>>>.
|
||||
As an example:
|
||||
|
||||
+-----+
|
||||
GHOrganization organizationClient(GitHub gitHub, String organizationName) throws IOException {
|
||||
return gitHub.getOrganization(organizationName);
|
||||
}
|
||||
+-----+
|
||||
|
||||
Now you can easily work with the GHOrganization, and all methods that will create resources will create them
|
||||
in the given organization.
|
||||
|
||||
One of the most common use cases is to create a repository in a given organization:
|
||||
|
||||
+-----+
|
||||
void createRepository(GHOrganization organization) {
|
||||
organization.createRepository("repository-name")
|
||||
.private_(true)
|
||||
.wiki(false)
|
||||
.projects(false)
|
||||
.description("Description")
|
||||
.allowMergeCommit(true)
|
||||
.allowSquashMerge(false)
|
||||
.allowRebaseMerge(false)
|
||||
.create()
|
||||
}
|
||||
+-----+
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
<item name="JWT Authentication" href="/githubappjwtauth.html"/>
|
||||
<item name="App Installation Token " href="/githubappappinsttokenauth.html"/>
|
||||
</item>
|
||||
<item name="Working with organizations" href="/createorglevelresources.html"/>
|
||||
</menu>
|
||||
|
||||
<menu name="References">
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.util.Map.Entry;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
import static org.hamcrest.CoreMatchers.sameInstance;
|
||||
import static org.hamcrest.Matchers.hasProperty;
|
||||
import static org.hamcrest.Matchers.oneOf;
|
||||
|
||||
@@ -108,7 +109,7 @@ public class AppTest extends AbstractGitHubWireMockTest {
|
||||
gitHub = getGitHubBuilder().withOAuthToken("bogus", "user")
|
||||
.withEndpoint(mockGitHub.apiServer().baseUrl())
|
||||
.build();
|
||||
assertThat(gitHub.lastRateLimit(), nullValue());
|
||||
assertThat(gitHub.lastRateLimit(), sameInstance(GHRateLimit.DEFAULT));
|
||||
assertFalse(gitHub.isCredentialValid());
|
||||
// For invalid credentials, we get a 401 but it includes anonymous rate limit headers
|
||||
assertThat(gitHub.lastRateLimit().getCore(), not(instanceOf(GHRateLimit.UnknownLimitRecord.class)));
|
||||
@@ -118,18 +119,22 @@ public class AppTest extends AbstractGitHubWireMockTest {
|
||||
@Test
|
||||
public void testCredentialValidEnterprise() throws IOException {
|
||||
// Simulated GHE: getRateLimit returns 404
|
||||
assertThat(gitHub.lastRateLimit(), nullValue());
|
||||
assertThat(gitHub.lastRateLimit(), sameInstance(GHRateLimit.DEFAULT));
|
||||
assertThat(gitHub.lastRateLimit().getCore().isExpired(), is(true));
|
||||
assertTrue(gitHub.isCredentialValid());
|
||||
// lastRateLimit stays null when 404 is encountered
|
||||
assertThat(gitHub.lastRateLimit(), nullValue());
|
||||
|
||||
// lastRateLimitUpdates because 404 still includes header rate limit info
|
||||
assertThat(gitHub.lastRateLimit(), notNullValue());
|
||||
assertThat(gitHub.lastRateLimit(), not(equalTo(GHRateLimit.DEFAULT)));
|
||||
assertThat(gitHub.lastRateLimit().getCore().isExpired(), is(false));
|
||||
|
||||
gitHub = getGitHubBuilder().withOAuthToken("bogus", "user")
|
||||
.withEndpoint(mockGitHub.apiServer().baseUrl())
|
||||
.build();
|
||||
assertThat(gitHub.lastRateLimit(), nullValue());
|
||||
assertThat(gitHub.lastRateLimit(), sameInstance(GHRateLimit.DEFAULT));
|
||||
assertFalse(gitHub.isCredentialValid());
|
||||
// Simulated GHE: For invalid credentials, we get a 401 that does not include ratelimit info
|
||||
assertThat(gitHub.lastRateLimit(), nullValue());
|
||||
assertThat(gitHub.lastRateLimit(), sameInstance(GHRateLimit.DEFAULT));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -6,6 +6,8 @@ import org.kohsuke.github.GHBranchProtection.EnforceAdmins;
|
||||
import org.kohsuke.github.GHBranchProtection.RequiredReviews;
|
||||
import org.kohsuke.github.GHBranchProtection.RequiredStatusChecks;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
|
||||
public class GHBranchProtectionTest extends AbstractGitHubWireMockTest {
|
||||
private static final String BRANCH = "master";
|
||||
private static final String BRANCH_REF = "heads/" + BRANCH;
|
||||
@@ -32,6 +34,14 @@ public class GHBranchProtectionTest extends AbstractGitHubWireMockTest {
|
||||
.includeAdmins()
|
||||
.enable();
|
||||
|
||||
verifyBranchProtection(protection);
|
||||
|
||||
// Get goes through a different code path. Make sure it also gets the correct data.
|
||||
protection = branch.getProtection();
|
||||
verifyBranchProtection(protection);
|
||||
}
|
||||
|
||||
private void verifyBranchProtection(GHBranchProtection protection) {
|
||||
RequiredStatusChecks statusChecks = protection.getRequiredStatusChecks();
|
||||
assertNotNull(statusChecks);
|
||||
assertTrue(statusChecks.isRequiresBranchUpToDate());
|
||||
@@ -66,7 +76,20 @@ public class GHBranchProtectionTest extends AbstractGitHubWireMockTest {
|
||||
public void testEnableRequireReviewsOnly() throws Exception {
|
||||
GHBranchProtection protection = branch.enableProtection().requireReviews().enable();
|
||||
|
||||
RequiredReviews requiredReviews = protection.getRequiredReviews();
|
||||
assertNotNull(protection.getRequiredReviews());
|
||||
assertFalse(requiredReviews.isDismissStaleReviews());
|
||||
assertFalse(requiredReviews.isRequireCodeOwnerReviews());
|
||||
assertThat(protection.getRequiredReviews().getRequiredReviewers(), equalTo(1));
|
||||
|
||||
// Get goes through a different code path. Make sure it also gets the correct data.
|
||||
protection = branch.getProtection();
|
||||
requiredReviews = protection.getRequiredReviews();
|
||||
|
||||
assertNotNull(protection.getRequiredReviews());
|
||||
assertFalse(requiredReviews.isDismissStaleReviews());
|
||||
assertFalse(requiredReviews.isRequireCodeOwnerReviews());
|
||||
assertThat(protection.getRequiredReviews().getRequiredReviewers(), equalTo(1));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
47
src/test/java/org/kohsuke/github/GHBranchTest.java
Normal file
47
src/test/java/org/kohsuke/github/GHBranchTest.java
Normal file
@@ -0,0 +1,47 @@
|
||||
package org.kohsuke.github;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import static org.hamcrest.Matchers.*;
|
||||
|
||||
public class GHBranchTest extends AbstractGitHubWireMockTest {
|
||||
private static final String BRANCH_1 = "testBranch1";
|
||||
private static final String BRANCH_2 = "testBranch2";
|
||||
|
||||
private GHRepository repository;
|
||||
|
||||
@Test
|
||||
public void testMergeBranch() throws Exception {
|
||||
repository = getTempRepository();
|
||||
|
||||
String masterHead = repository.getRef("heads/master").getObject().getSha();
|
||||
createRefAndPostContent(BRANCH_1, masterHead);
|
||||
createRefAndPostContent(BRANCH_2, masterHead);
|
||||
|
||||
GHBranch otherBranch = repository.getBranch(BRANCH_2);
|
||||
String commitMessage = "merging " + BRANCH_2;
|
||||
GHCommit mergeCommit = repository.getBranch(BRANCH_1).merge(otherBranch, commitMessage);
|
||||
assertThat(mergeCommit, notNullValue());
|
||||
assertThat(mergeCommit.getCommitShortInfo().getMessage(), equalTo(commitMessage));
|
||||
|
||||
// Merging commit sha should work
|
||||
commitMessage = "merging from " + mergeCommit.getSHA1();
|
||||
GHBranch master = repository.getBranch("master");
|
||||
mergeCommit = master.merge(mergeCommit.getSHA1(), commitMessage);
|
||||
|
||||
assertThat(mergeCommit, notNullValue());
|
||||
assertThat(mergeCommit.getCommitShortInfo().getMessage(), equalTo(commitMessage));
|
||||
|
||||
mergeCommit = master.merge(mergeCommit.getSHA1(), commitMessage);
|
||||
// Should be null since all changes already merged
|
||||
assertThat(mergeCommit, nullValue());
|
||||
}
|
||||
|
||||
private void createRefAndPostContent(String branchName, String sha) throws IOException {
|
||||
String refName = "refs/heads/" + branchName;
|
||||
repository.createRef(refName, sha);
|
||||
repository.createContent().content(branchName).message(branchName).path(branchName).branch(branchName).commit();
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
import static org.hamcrest.Matchers.hasProperty;
|
||||
|
||||
/**
|
||||
* Integration test for {@link GHContent}.
|
||||
@@ -170,4 +171,24 @@ public class GHContentIntegrationTest extends AbstractGitHubWireMockTest {
|
||||
final GHContent fileContent2 = repo.getFileContent(fileContent.getPath());
|
||||
assertThat(IOUtils.readLines(fileContent2.read(), StandardCharsets.UTF_8), hasItems("test"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetFileContentWithSymlink() throws Exception {
|
||||
final GHRepository repo = gitHub.getRepository("hub4j-test-org/GHContentIntegrationTest");
|
||||
|
||||
final GHContent fileContent = repo.getFileContent("ghcontent-ro/a-symlink-to-a-file");
|
||||
// for whatever reason GH says this is a file :-o
|
||||
assertThat(IOUtils.toString(fileContent.read(), StandardCharsets.UTF_8), is("thanks for reading me\n"));
|
||||
|
||||
final GHContent dirContent = repo.getFileContent("ghcontent-ro/a-symlink-to-a-dir");
|
||||
// but symlinks to directories are symlinks!
|
||||
assertThat(dirContent,
|
||||
allOf(hasProperty("target", is("a-dir-with-3-entries")), hasProperty("type", is("symlink"))));
|
||||
|
||||
// future somehow...
|
||||
|
||||
// final GHContent fileContent2 = repo.getFileContent("ghcontent-ro/a-symlink-to-a-dir/entry-one");
|
||||
// this needs special handling and will 404 from GitHub
|
||||
// assertThat(IOUtils.toString(fileContent.read(), StandardCharsets.UTF_8), is(""));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package org.kohsuke.github;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Martin van Zijl
|
||||
@@ -10,17 +12,42 @@ import java.io.IOException;
|
||||
public class GHDeploymentTest extends AbstractGitHubWireMockTest {
|
||||
|
||||
@Test
|
||||
public void testGetDeploymentById() throws IOException {
|
||||
GHRepository repo = getRepository();
|
||||
GHDeployment deployment = repo.getDeployment(178653229);
|
||||
public void testGetDeploymentByIdStringPayload() throws IOException {
|
||||
final GHRepository repo = getRepository();
|
||||
final GHDeployment deployment = repo.getDeployment(178653229);
|
||||
assertNotNull(deployment);
|
||||
assertEquals(178653229, deployment.getId());
|
||||
assertEquals("production", deployment.getEnvironment());
|
||||
assertEquals("custom", deployment.getPayload());
|
||||
assertEquals("custom", deployment.getPayloadObject());
|
||||
assertEquals("master", deployment.getRef());
|
||||
assertEquals("3a09d2de4a9a1322a0ba2c3e2f54a919ca8fe353", deployment.getSha());
|
||||
assertEquals("deploy", deployment.getTask());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetDeploymentByIdObjectPayload() throws IOException {
|
||||
final GHRepository repo = getRepository();
|
||||
final GHDeployment deployment = repo.getDeployment(178653229);
|
||||
assertNotNull(deployment);
|
||||
assertEquals(178653229, deployment.getId());
|
||||
assertEquals("production", deployment.getEnvironment());
|
||||
assertEquals("master", deployment.getRef());
|
||||
assertEquals("3a09d2de4a9a1322a0ba2c3e2f54a919ca8fe353", deployment.getSha());
|
||||
assertEquals("deploy", deployment.getTask());
|
||||
final Map<String, Object> payload = deployment.getPayloadMap();
|
||||
assertEquals(4, payload.size());
|
||||
assertEquals(1, payload.get("custom1"));
|
||||
assertEquals("two", payload.get("custom2"));
|
||||
assertEquals(Arrays.asList("3", 3, "three"), payload.get("custom3"));
|
||||
assertNull(payload.get("custom4"));
|
||||
}
|
||||
|
||||
protected GHRepository getRepository() throws IOException {
|
||||
return getRepository(gitHub);
|
||||
}
|
||||
|
||||
private GHRepository getRepository(GitHub gitHub) throws IOException {
|
||||
private GHRepository getRepository(final GitHub gitHub) throws IOException {
|
||||
return gitHub.getOrganization("hub4j-test-org").getRepository("github-api");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.kohsuke.github;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Collections;
|
||||
import java.util.TimeZone;
|
||||
@@ -387,7 +388,25 @@ public class GHEventPayloadTest extends AbstractGitHubWireMockTest {
|
||||
@Payload("check-run")
|
||||
public void checkRunEvent() throws Exception {
|
||||
GHEventPayload.CheckRun event = GitHub.offline()
|
||||
.parseEventPayload(payload.asReader(), GHEventPayload.CheckRun.class);
|
||||
.parseEventPayload(payload.asReader(mockGitHub::mapToMockGitHub), GHEventPayload.CheckRun.class);
|
||||
GHCheckRun checkRun = verifyBasicCheckRunEvent(event);
|
||||
assertThat("pull body not populated offline", checkRun.getPullRequests().get(0).getBody(), nullValue());
|
||||
assertThat("using offline github", mockGitHub.getRequestCount(), equalTo(0));
|
||||
|
||||
gitHub = getGitHubBuilder().withEndpoint(mockGitHub.apiServer().baseUrl()).build();
|
||||
event = gitHub.parseEventPayload(payload.asReader(mockGitHub::mapToMockGitHub), GHEventPayload.CheckRun.class);
|
||||
checkRun = verifyBasicCheckRunEvent(event);
|
||||
|
||||
int expectedRequestCount = mockGitHub.isUseProxy() ? 3 : 2;
|
||||
assertThat("pull body should be populated",
|
||||
checkRun.getPullRequests().get(0).getBody(),
|
||||
equalTo("This is a pretty simple change that we need to pull into master."));
|
||||
assertThat("multiple getPullRequests() calls are made, the pull is populated only once",
|
||||
mockGitHub.getRequestCount(),
|
||||
equalTo(expectedRequestCount));
|
||||
}
|
||||
|
||||
private GHCheckRun verifyBasicCheckRunEvent(GHEventPayload.CheckRun event) throws IOException {
|
||||
assertThat(event.getRepository().getName(), is("Hello-World"));
|
||||
assertThat(event.getRepository().getOwner().getLogin(), is("Codertocat"));
|
||||
assertThat(event.getAction(), is("created"));
|
||||
@@ -406,9 +425,9 @@ public class GHEventPayloadTest extends AbstractGitHubWireMockTest {
|
||||
assertThat(formatter.format(checkRun.getCompletedAt()), is("2019-05-15T20:22:22Z"));
|
||||
|
||||
assertThat(checkRun.getConclusion(), is("success"));
|
||||
assertThat(checkRun.getUrl().toString(),
|
||||
is("https://api.github.com/repos/Codertocat/Hello-World/check-runs/128620228"));
|
||||
assertThat(checkRun.getHtmlUrl().toString(), is("https://github.com/Codertocat/Hello-World/runs/128620228"));
|
||||
assertThat(checkRun.getUrl().toString(), endsWith("/repos/Codertocat/Hello-World/check-runs/128620228"));
|
||||
assertThat(checkRun.getHtmlUrl().toString(),
|
||||
endsWith("https://github.com/Codertocat/Hello-World/runs/128620228"));
|
||||
assertThat(checkRun.getDetailsUrl().toString(), is("https://octocoders.io"));
|
||||
assertThat(checkRun.getApp().getId(), is(29310L));
|
||||
assertThat(checkRun.getCheckSuite().getId(), is(118578147L));
|
||||
@@ -417,18 +436,41 @@ public class GHEventPayloadTest extends AbstractGitHubWireMockTest {
|
||||
assertThat(checkRun.getOutput().getText(), nullValue());
|
||||
assertThat(checkRun.getOutput().getAnnotationsCount(), is(0));
|
||||
assertThat(checkRun.getOutput().getAnnotationsUrl().toString(),
|
||||
is("https://api.github.com/repos/Codertocat/Hello-World/check-runs/128620228/annotations"));
|
||||
endsWith("/repos/Codertocat/Hello-World/check-runs/128620228/annotations"));
|
||||
|
||||
// Checks the deserialization of sender
|
||||
assertThat(event.getSender().getId(), is(21031067L));
|
||||
|
||||
assertThat(checkRun.getPullRequests(), notNullValue());
|
||||
assertThat(checkRun.getPullRequests().size(), equalTo(1));
|
||||
assertThat(checkRun.getPullRequests().get(0).getNumber(), equalTo(2));
|
||||
return checkRun;
|
||||
}
|
||||
|
||||
@Test
|
||||
@Payload("check-suite")
|
||||
public void checkSuiteEvent() throws Exception {
|
||||
GHEventPayload.CheckSuite event = GitHub.offline()
|
||||
.parseEventPayload(payload.asReader(), GHEventPayload.CheckSuite.class);
|
||||
.parseEventPayload(payload.asReader(mockGitHub::mapToMockGitHub), GHEventPayload.CheckSuite.class);
|
||||
GHCheckSuite checkSuite = verifyBasicCheckSuiteEvent(event);
|
||||
assertThat("pull body not populated offline", checkSuite.getPullRequests().get(0).getBody(), nullValue());
|
||||
assertThat("using offline github", mockGitHub.getRequestCount(), equalTo(0));
|
||||
|
||||
gitHub = getGitHubBuilder().withEndpoint(mockGitHub.apiServer().baseUrl()).build();
|
||||
event = gitHub.parseEventPayload(payload.asReader(mockGitHub::mapToMockGitHub),
|
||||
GHEventPayload.CheckSuite.class);
|
||||
checkSuite = verifyBasicCheckSuiteEvent(event);
|
||||
|
||||
int expectedRequestCount = mockGitHub.isUseProxy() ? 3 : 2;
|
||||
assertThat("pull body should be populated",
|
||||
checkSuite.getPullRequests().get(0).getBody(),
|
||||
equalTo("This is a pretty simple change that we need to pull into master."));
|
||||
assertThat("multiple getPullRequests() calls are made, the pull is populated only once",
|
||||
mockGitHub.getRequestCount(),
|
||||
lessThanOrEqualTo(expectedRequestCount));
|
||||
}
|
||||
|
||||
private GHCheckSuite verifyBasicCheckSuiteEvent(GHEventPayload.CheckSuite event) throws IOException {
|
||||
assertThat(event.getRepository().getName(), is("Hello-World"));
|
||||
assertThat(event.getRepository().getOwner().getLogin(), is("Codertocat"));
|
||||
assertThat(event.getAction(), is("completed"));
|
||||
@@ -445,7 +487,7 @@ public class GHEventPayloadTest extends AbstractGitHubWireMockTest {
|
||||
assertThat(checkSuite.getAfter(), is("ec26c3e57ca3a959ca5aad62de7213c562f8c821"));
|
||||
assertThat(checkSuite.getLatestCheckRunsCount(), is(1));
|
||||
assertThat(checkSuite.getCheckRunsUrl().toString(),
|
||||
is("https://api.github.com/repos/Codertocat/Hello-World/check-suites/118578147/check-runs"));
|
||||
endsWith("/repos/Codertocat/Hello-World/check-suites/118578147/check-runs"));
|
||||
assertThat(checkSuite.getHeadCommit().getMessage(), is("Update README.md"));
|
||||
assertThat(checkSuite.getHeadCommit().getId(), is("ec26c3e57ca3a959ca5aad62de7213c562f8c821"));
|
||||
assertThat(checkSuite.getHeadCommit().getTreeId(), is("31b122c26a97cf9af023e9ddab94a82c6e77b0ea"));
|
||||
@@ -457,6 +499,11 @@ public class GHEventPayloadTest extends AbstractGitHubWireMockTest {
|
||||
assertThat(formatter.format(checkSuite.getHeadCommit().getTimestamp()), is("2019-05-15T15:20:30Z"));
|
||||
|
||||
assertThat(checkSuite.getApp().getId(), is(29310L));
|
||||
|
||||
assertThat(checkSuite.getPullRequests(), notNullValue());
|
||||
assertThat(checkSuite.getPullRequests().size(), equalTo(1));
|
||||
assertThat(checkSuite.getPullRequests().get(0).getNumber(), equalTo(2));
|
||||
return checkSuite;
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -70,6 +70,26 @@ public class GHMilestoneTest extends AbstractGitHubWireMockTest {
|
||||
assertEquals(null, issue.getMilestone());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUnsetMilestoneFromPullRequest() throws IOException {
|
||||
GHRepository repo = getRepository();
|
||||
GHMilestone milestone = repo.createMilestone("Unset Test Milestone", "For testUnsetMilestone");
|
||||
GHPullRequest p = repo.createPullRequest("testUnsetMilestoneFromPullRequest",
|
||||
"test/stable",
|
||||
"master",
|
||||
"## test pull request");
|
||||
|
||||
// set the milestone
|
||||
p.setMilestone(milestone);
|
||||
p = repo.getPullRequest(p.getNumber()); // force reload
|
||||
assertEquals(milestone.getNumber(), p.getMilestone().getNumber());
|
||||
|
||||
// remove the milestone
|
||||
p.setMilestone(null);
|
||||
p = repo.getPullRequest(p.getNumber()); // force reload
|
||||
assertNull(p.getMilestone());
|
||||
}
|
||||
|
||||
protected GHRepository getRepository() throws IOException {
|
||||
return getRepository(gitHub);
|
||||
}
|
||||
|
||||
@@ -9,9 +9,12 @@ import org.kohsuke.github.GHOrganization.Permission;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static org.hamcrest.Matchers.*;
|
||||
|
||||
public class GHOrganizationTest extends AbstractGitHubWireMockTest {
|
||||
|
||||
public static final String GITHUB_API_TEST = "github-api-test";
|
||||
public static final String GITHUB_API_TEMPLATE_TEST = "github-api-template-test";
|
||||
public static final String TEAM_NAME_CREATE = "create-team-test";
|
||||
|
||||
@Before
|
||||
@@ -56,6 +59,58 @@ public class GHOrganizationTest extends AbstractGitHubWireMockTest {
|
||||
Assert.assertNotNull(repository.getReadme());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreateRepositoryWithParameterIsTemplate() throws IOException {
|
||||
cleanupRepository(GITHUB_API_TEST_ORG + '/' + GITHUB_API_TEMPLATE_TEST);
|
||||
|
||||
GHOrganization org = gitHub.getOrganization(GITHUB_API_TEST_ORG);
|
||||
GHTeam team = org.getTeamByName("Core Developers");
|
||||
|
||||
int requestCount = mockGitHub.getRequestCount();
|
||||
GHRepository repository = org.createRepository(GITHUB_API_TEMPLATE_TEST)
|
||||
.description("a test template repository used to test kohsuke's github-api")
|
||||
.homepage("http://github-api.kohsuke.org/")
|
||||
.team(team)
|
||||
.autoInit(true)
|
||||
.templateRepository(true)
|
||||
.create();
|
||||
Assert.assertNotNull(repository);
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(requestCount + 1));
|
||||
|
||||
Assert.assertNotNull(repository.getReadme());
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(requestCount + 2));
|
||||
|
||||
// isTemplate() does not call populate() from create
|
||||
assertThat(repository.isTemplate(), equalTo(true));
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(requestCount + 2));
|
||||
|
||||
repository = org.getRepository(GITHUB_API_TEMPLATE_TEST);
|
||||
|
||||
// first isTemplate() calls populate()
|
||||
assertThat(repository.isTemplate(), equalTo(true));
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(requestCount + 4));
|
||||
|
||||
// second isTemplate() does not call populate()
|
||||
assertThat(repository.isTemplate(), equalTo(true));
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(requestCount + 4));
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreateRepositoryWithTemplate() throws IOException {
|
||||
cleanupRepository(GITHUB_API_TEST_ORG + '/' + GITHUB_API_TEST);
|
||||
|
||||
GHOrganization org = gitHub.getOrganization(GITHUB_API_TEST_ORG);
|
||||
GHRepository repository = org.createRepository(GITHUB_API_TEST)
|
||||
.fromTemplateRepository(GITHUB_API_TEST_ORG, GITHUB_API_TEMPLATE_TEST)
|
||||
.owner(GITHUB_API_TEST_ORG)
|
||||
.create();
|
||||
|
||||
Assert.assertNotNull(repository);
|
||||
Assert.assertNotNull(repository.getReadme());
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInviteUser() throws IOException {
|
||||
GHOrganization org = gitHub.getOrganization(GITHUB_API_TEST_ORG);
|
||||
|
||||
@@ -3,13 +3,15 @@ package org.kohsuke.github;
|
||||
import com.fasterxml.jackson.databind.exc.MismatchedInputException;
|
||||
import com.fasterxml.jackson.databind.exc.ValueInstantiationException;
|
||||
import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
|
||||
import org.hamcrest.CoreMatchers;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.time.Duration;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
import static org.hamcrest.CoreMatchers.sameInstance;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
import static org.hamcrest.core.IsInstanceOf.instanceOf;
|
||||
|
||||
@@ -51,13 +53,16 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
|
||||
public void testGitHubRateLimit() throws Exception {
|
||||
// Customized response that templates the date to keep things working
|
||||
snapshotNotAllowed();
|
||||
GHRateLimit.UnknownLimitRecord.reset();
|
||||
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(0));
|
||||
|
||||
// 4897 is just the what the limit was when the snapshot was taken
|
||||
previousLimit = GHRateLimit.fromHeaderRecord(new GHRateLimit.Record(5000,
|
||||
4897,
|
||||
(templating.testStartDate.getTime() + Duration.ofHours(1).toMillis()) / 1000L));
|
||||
previousLimit = GHRateLimit.fromRecord(
|
||||
new GHRateLimit.Record(5000,
|
||||
4897,
|
||||
(templating.testStartDate.getTime() + Duration.ofHours(1).toMillis()) / 1000L),
|
||||
RateLimitTarget.CORE);
|
||||
|
||||
// -------------------------------------------------------------
|
||||
// /user gets response with rate limit information
|
||||
@@ -76,8 +81,8 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
|
||||
// Give this a moment
|
||||
Thread.sleep(1500);
|
||||
|
||||
// ratelimit() uses headerRateLimit if available and headerRateLimit is not expired
|
||||
assertThat(gitHub.rateLimit(), equalTo(headerRateLimit));
|
||||
// ratelimit() uses cached rate limit if available and not expired
|
||||
assertThat(gitHub.rateLimit(), sameInstance(headerRateLimit));
|
||||
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(1));
|
||||
|
||||
@@ -88,8 +93,13 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
|
||||
rateLimit = gitHub.getRateLimit();
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(2));
|
||||
|
||||
// Because remaining and reset date are unchanged, the header should be unchanged as well
|
||||
assertThat(gitHub.lastRateLimit(), sameInstance(headerRateLimit));
|
||||
// Because remaining and reset date are unchanged in core, the header should be unchanged as well
|
||||
// But the overall instance has changed because of filling in of unknown data.
|
||||
assertThat(gitHub.lastRateLimit(), not(sameInstance(headerRateLimit)));
|
||||
// Identical Records should be preserved even when GHRateLimit is merged
|
||||
assertThat(gitHub.lastRateLimit().getCore(), sameInstance(headerRateLimit.getCore()));
|
||||
assertThat(gitHub.lastRateLimit().getSearch(), not(sameInstance(headerRateLimit.getSearch())));
|
||||
headerRateLimit = gitHub.lastRateLimit();
|
||||
|
||||
// rate limit request is free, remaining is unchanged
|
||||
verifyRateLimitValues(previousLimit, previousLimit.getRemaining());
|
||||
@@ -141,9 +151,8 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
|
||||
verifyRateLimitValues(previousLimit, previousLimit.getRemaining(), true);
|
||||
previousLimit = rateLimit;
|
||||
|
||||
// When getRateLimit() succeeds, headerRateLimit updates as usual as well (if needed)
|
||||
// These are separate instances, but should be equal
|
||||
assertThat(gitHub.rateLimit(), not(sameInstance(rateLimit)));
|
||||
// When getRateLimit() succeeds, cached rate limit updates as usual as well (if needed)
|
||||
assertThat(gitHub.rateLimit(), sameInstance(rateLimit));
|
||||
|
||||
// Verify different record instances can be compared
|
||||
assertThat(gitHub.rateLimit().getCore(), equalTo(rateLimit.getCore()));
|
||||
@@ -154,8 +163,43 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
|
||||
|
||||
assertThat(gitHub.rateLimit(), not(sameInstance(headerRateLimit)));
|
||||
assertThat(gitHub.rateLimit(), sameInstance(gitHub.lastRateLimit()));
|
||||
headerRateLimit = gitHub.lastRateLimit();
|
||||
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(5));
|
||||
|
||||
// Verify the requesting a search url updates the search rate limit
|
||||
assertThat(gitHub.lastRateLimit().getSearch().getRemaining(), equalTo(30));
|
||||
|
||||
HashMap<String, Object> searchResult = (HashMap<String, Object>) gitHub.createRequest()
|
||||
.rateLimit(RateLimitTarget.SEARCH)
|
||||
.setRawUrlPath(mockGitHub.apiServer().baseUrl()
|
||||
+ "/search/repositories?q=tetris+language%3Aassembly&sort=stars&order=desc")
|
||||
.fetch(HashMap.class);
|
||||
|
||||
assertThat(searchResult.get("total_count"), equalTo(1918));
|
||||
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(6));
|
||||
|
||||
assertThat(gitHub.lastRateLimit(), not(sameInstance(headerRateLimit)));
|
||||
assertThat(gitHub.lastRateLimit().getCore(), sameInstance(headerRateLimit.getCore()));
|
||||
assertThat(gitHub.lastRateLimit().getSearch(), not(sameInstance(headerRateLimit.getSearch())));
|
||||
assertThat(gitHub.lastRateLimit().getSearch().getRemaining(), equalTo(29));
|
||||
|
||||
PagedSearchIterable<GHRepository> searchResult2 = gitHub.searchRepositories()
|
||||
.q("tetris")
|
||||
.language("assembly")
|
||||
.sort(GHRepositorySearchBuilder.Sort.STARS)
|
||||
.order(GHDirection.DESC)
|
||||
.list();
|
||||
|
||||
assertThat(searchResult2.getTotalCount(), equalTo(1918));
|
||||
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(7));
|
||||
|
||||
assertThat(gitHub.lastRateLimit(), not(sameInstance(headerRateLimit)));
|
||||
assertThat(gitHub.lastRateLimit().getCore(), sameInstance(headerRateLimit.getCore()));
|
||||
assertThat(gitHub.lastRateLimit().getSearch(), not(sameInstance(headerRateLimit.getSearch())));
|
||||
assertThat(gitHub.lastRateLimit().getSearch().getRemaining(), equalTo(28));
|
||||
}
|
||||
|
||||
private void verifyRateLimitValues(GHRateLimit previousLimit, int remaining) {
|
||||
@@ -194,6 +238,8 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
|
||||
public void testGitHubEnterpriseDoesNotHaveRateLimit() throws Exception {
|
||||
// Customized response that results in file not found the same as GitHub Enterprise
|
||||
snapshotNotAllowed();
|
||||
GHRateLimit.UnknownLimitRecord.reset();
|
||||
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(0));
|
||||
GHRateLimit rateLimit = null;
|
||||
|
||||
@@ -203,13 +249,14 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
|
||||
Thread.sleep(1500);
|
||||
|
||||
// -------------------------------------------------------------
|
||||
// Before any queries, rate limit starts as null but may be requested
|
||||
// Before any queries, rate limit starts as default but may be requested
|
||||
gitHub = GitHub.connectToEnterprise(mockGitHub.apiServer().baseUrl(), "bogus", "bogus");
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(0));
|
||||
|
||||
assertThat(gitHub.lastRateLimit(), CoreMatchers.nullValue());
|
||||
assertThat(gitHub.lastRateLimit(), sameInstance(GHRateLimit.DEFAULT));
|
||||
|
||||
rateLimit = gitHub.rateLimit();
|
||||
assertThat(gitHub.lastRateLimit(), not(equalTo(GHRateLimit.DEFAULT)));
|
||||
assertThat(rateLimit.getCore(), instanceOf(GHRateLimit.UnknownLimitRecord.class));
|
||||
assertThat(rateLimit.getLimit(), equalTo(GHRateLimit.UnknownLimitRecord.unknownLimit));
|
||||
assertThat(rateLimit.getRemaining(), equalTo(GHRateLimit.UnknownLimitRecord.unknownRemaining));
|
||||
@@ -218,8 +265,8 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
|
||||
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(1));
|
||||
|
||||
// last is still null, because it actually means lastHeaderRateLimit
|
||||
assertThat(gitHub.lastRateLimit(), CoreMatchers.nullValue());
|
||||
// lastRateLimit the same as rateLimit
|
||||
assertThat(gitHub.lastRateLimit(), sameInstance(rateLimit));
|
||||
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(1));
|
||||
|
||||
@@ -233,13 +280,14 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
|
||||
gitHub.getMyself();
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(2));
|
||||
|
||||
assertThat(gitHub.lastRateLimit(), CoreMatchers.nullValue());
|
||||
assertThat(gitHub.lastRateLimit(), sameInstance(GHRateLimit.DEFAULT));
|
||||
|
||||
rateLimit = gitHub.rateLimit();
|
||||
assertThat(rateLimit.getCore(), instanceOf(GHRateLimit.UnknownLimitRecord.class));
|
||||
assertThat(rateLimit.getLimit(), equalTo(GHRateLimit.UnknownLimitRecord.unknownLimit));
|
||||
assertThat(rateLimit.getRemaining(), equalTo(GHRateLimit.UnknownLimitRecord.unknownRemaining));
|
||||
assertThat(rateLimit.getResetDate().compareTo(lastReset), equalTo(1));
|
||||
// Same unknown instance is reused for a while
|
||||
assertThat(rateLimit.getResetDate().compareTo(lastReset), equalTo(0));
|
||||
lastReset = rateLimit.getResetDate();
|
||||
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(3));
|
||||
@@ -258,17 +306,19 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
|
||||
assertThat(rateLimit.getCore(), instanceOf(GHRateLimit.UnknownLimitRecord.class));
|
||||
assertThat(rateLimit.getLimit(), equalTo(GHRateLimit.UnknownLimitRecord.unknownLimit));
|
||||
assertThat(rateLimit.getRemaining(), equalTo(GHRateLimit.UnknownLimitRecord.unknownRemaining));
|
||||
assertThat(rateLimit.getResetDate().compareTo(lastReset), equalTo(1));
|
||||
// When not expired, unknowns do not replace each other so last reset remains unchanged
|
||||
assertThat(rateLimit.getResetDate().compareTo(lastReset), equalTo(0));
|
||||
|
||||
// Give this a moment
|
||||
Thread.sleep(1500);
|
||||
|
||||
// last is still null, because it actually means lastHeaderRateLimit
|
||||
assertThat(gitHub.lastRateLimit(), CoreMatchers.nullValue());
|
||||
// lastRateLimit the same as rateLimit
|
||||
assertThat(gitHub.lastRateLimit(), sameInstance(rateLimit));
|
||||
|
||||
// ratelimit() tries not to make additional requests, uses queried rate limit since header not available
|
||||
Thread.sleep(1500);
|
||||
assertThat(gitHub.rateLimit(), sameInstance(rateLimit));
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(4));
|
||||
|
||||
// -------------------------------------------------------------
|
||||
// Some versions of GHE include header rate limit information, some do not
|
||||
@@ -282,10 +332,12 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
|
||||
assertThat(rateLimit, notNullValue());
|
||||
assertThat(rateLimit.getLimit(), equalTo(5000));
|
||||
assertThat(rateLimit.getRemaining(), equalTo(4978));
|
||||
// The previous record was an "Unknown", so even though this records resets sooner we take it
|
||||
assertThat(rateLimit.getResetDate().compareTo(lastReset), equalTo(-1));
|
||||
assertThat(rateLimit.getResetDate().compareTo(lastReset), equalTo(1));
|
||||
lastReset = rateLimit.getResetDate();
|
||||
|
||||
// When getting only header updates, the unknowns are also expired
|
||||
assertThat(rateLimit.getSearch().isExpired(), is(true));
|
||||
|
||||
GHRateLimit headerRateLimit = rateLimit;
|
||||
|
||||
// Give this a moment
|
||||
@@ -320,14 +372,49 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
|
||||
// getRateLimit() uses headerRateLimit if /rate_limit returns a 404
|
||||
// and headerRateLimit is available and not expired
|
||||
assertThat(rateLimit, sameInstance(gitHub.lastRateLimit()));
|
||||
headerRateLimit = rateLimit;
|
||||
|
||||
// ratelimit() should prefer headerRateLimit when getRateLimit fails and headerRateLimit is not expired
|
||||
assertThat(gitHub.rateLimit(), sameInstance(rateLimit));
|
||||
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(6));
|
||||
|
||||
// Wait for the header
|
||||
Thread.sleep(1500);
|
||||
// Verify the requesting a search url updates the search rate limit
|
||||
// Core rate limit record should not change while search is updated.
|
||||
assertThat(gitHub.lastRateLimit().getSearch(), instanceOf(GHRateLimit.UnknownLimitRecord.class));
|
||||
assertThat(gitHub.lastRateLimit().getSearch().isExpired(), equalTo(true));
|
||||
|
||||
HashMap<String, Object> searchResult = (HashMap<String, Object>) gitHub.createRequest()
|
||||
.rateLimit(RateLimitTarget.SEARCH)
|
||||
.setRawUrlPath(mockGitHub.apiServer().baseUrl()
|
||||
+ "/search/repositories?q=tetris+language%3Aassembly&sort=stars&order=desc")
|
||||
.fetch(Object.class);
|
||||
|
||||
assertThat(searchResult.get("total_count"), equalTo(1918));
|
||||
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(7));
|
||||
|
||||
assertThat(gitHub.lastRateLimit(), not(sameInstance(headerRateLimit)));
|
||||
assertThat(gitHub.lastRateLimit().getCore(), sameInstance(headerRateLimit.getCore()));
|
||||
assertThat(gitHub.lastRateLimit().getSearch(), not(sameInstance(headerRateLimit.getSearch())));
|
||||
assertThat(gitHub.lastRateLimit().getSearch().getRemaining(), equalTo(29));
|
||||
|
||||
PagedSearchIterable<GHRepository> searchResult2 = gitHub.searchRepositories()
|
||||
.q("tetris")
|
||||
.language("assembly")
|
||||
.sort(GHRepositorySearchBuilder.Sort.STARS)
|
||||
.order(GHDirection.DESC)
|
||||
.list();
|
||||
|
||||
assertThat(searchResult2.getTotalCount(), equalTo(1918));
|
||||
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(8));
|
||||
|
||||
assertThat(gitHub.lastRateLimit(), not(sameInstance(headerRateLimit)));
|
||||
assertThat(gitHub.lastRateLimit().getCore(), sameInstance(headerRateLimit.getCore()));
|
||||
assertThat(gitHub.lastRateLimit().getSearch(), not(sameInstance(headerRateLimit.getSearch())));
|
||||
assertThat(gitHub.lastRateLimit().getSearch().getRemaining(), equalTo(28));
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -372,6 +459,7 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
|
||||
private void executeExpirationTest() throws Exception {
|
||||
// Customized response that templates the date to keep things working
|
||||
snapshotNotAllowed();
|
||||
GHRateLimit.UnknownLimitRecord.reset();
|
||||
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(0));
|
||||
GHRateLimit rateLimit = null;
|
||||
@@ -413,15 +501,15 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
|
||||
|
||||
assertThat("Header instance has expired", gitHub.lastRateLimit().isExpired(), is(true));
|
||||
|
||||
assertThat("rateLimit() will ask server when header instance expires and it has not called getRateLimit() yet",
|
||||
assertThat("rateLimit() will ask server when cached instance has expired",
|
||||
gitHub.rateLimit(),
|
||||
not(sameInstance(rateLimit)));
|
||||
|
||||
assertThat("lastRateLimit() (header instance) is populated as part of internal call to getRateLimit()",
|
||||
assertThat("lastRateLimit() is populated as part of internal call to getRateLimit()",
|
||||
gitHub.lastRateLimit(),
|
||||
not(sameInstance(rateLimit)));
|
||||
|
||||
assertThat("After request, rateLimit() selects header instance since it has been refreshed",
|
||||
assertThat("After request, rateLimit() selects cached since it has been refreshed",
|
||||
gitHub.rateLimit(),
|
||||
sameInstance(gitHub.lastRateLimit()));
|
||||
|
||||
@@ -429,27 +517,27 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
|
||||
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(2));
|
||||
|
||||
// This time, rateLimit() should find an expired header record, but a valid returned record
|
||||
// During the previous call we returned expired header info but valid returned record
|
||||
// Merging means this has already been merged into a valid cached instance
|
||||
Thread.sleep(4000);
|
||||
|
||||
rateLimit = gitHub.rateLimit();
|
||||
|
||||
// Using custom data to have a header instance that expires before the queried instance
|
||||
assertThat(
|
||||
"if header instance expires but queried instance is valid, ratelimit() uses it without asking server",
|
||||
assertThat("if valid ratelimit() uses it without asking server",
|
||||
gitHub.rateLimit(),
|
||||
not(sameInstance(gitHub.lastRateLimit())));
|
||||
sameInstance(gitHub.lastRateLimit()));
|
||||
|
||||
assertThat("ratelimit() should almost never return a return a GHRateLimit that is already expired",
|
||||
gitHub.rateLimit().isExpired(),
|
||||
is(false));
|
||||
|
||||
assertThat("Header instance hasn't been reloaded", gitHub.lastRateLimit(), sameInstance(headerRateLimit));
|
||||
assertThat("Header instance has expired", gitHub.lastRateLimit().isExpired(), is(true));
|
||||
assertThat("Cached instance hasn't been reloaded", gitHub.lastRateLimit(), sameInstance(headerRateLimit));
|
||||
assertThat("Cached instance has not expired", gitHub.lastRateLimit().isExpired(), is(false));
|
||||
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(2));
|
||||
|
||||
// Finally they both expire and rateLimit() should find both expired and get a new record
|
||||
// Finally the cached instance expires and rateLimit() should get a new record
|
||||
Thread.sleep(2000);
|
||||
|
||||
headerRateLimit = gitHub.rateLimit();
|
||||
|
||||
@@ -191,6 +191,7 @@ public class GHRepositoryTest extends AbstractGitHubWireMockTest {
|
||||
List<GHUser> users = new ArrayList<GHUser>();
|
||||
|
||||
users.add(user);
|
||||
users.add(gitHub.getUser("jimmysombrero2"));
|
||||
repo.addCollaborators(users, GHOrganization.Permission.PUSH);
|
||||
|
||||
GHPersonSet<GHUser> collabs = repo.getCollaborators();
|
||||
|
||||
32
src/test/java/org/kohsuke/github/GHTeamBuilderTest.java
Normal file
32
src/test/java/org/kohsuke/github/GHTeamBuilderTest.java
Normal file
@@ -0,0 +1,32 @@
|
||||
package org.kohsuke.github;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class GHTeamBuilderTest extends AbstractGitHubWireMockTest {
|
||||
|
||||
@Test
|
||||
public void testCreateChildTeam() throws IOException {
|
||||
String parentTeamSlug = "dummy-team";
|
||||
String childTeamSlug = "dummy-team-child";
|
||||
String description = "description";
|
||||
|
||||
// Get the parent team
|
||||
GHTeam parentTeam = gitHub.getOrganization(GITHUB_API_TEST_ORG).getTeamBySlug(parentTeamSlug);
|
||||
|
||||
// Create a child team, using the parent team identifier
|
||||
GHTeam childTeam = gitHub.getOrganization(GITHUB_API_TEST_ORG)
|
||||
.createTeam(childTeamSlug)
|
||||
.description(description)
|
||||
.privacy(GHTeam.Privacy.CLOSED)
|
||||
.parentTeamId(parentTeam.getId())
|
||||
.create();
|
||||
|
||||
assertEquals(description, childTeam.getDescription());
|
||||
assertEquals(childTeamSlug, childTeam.getName());
|
||||
assertEquals(childTeamSlug, childTeam.getSlug());
|
||||
assertEquals(GHTeam.Privacy.CLOSED, childTeam.getPrivacy());
|
||||
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import org.junit.Test;
|
||||
import org.kohsuke.github.GHTeam.Privacy;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Set;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@@ -56,4 +57,27 @@ public class GHTeamTest extends AbstractGitHubWireMockTest {
|
||||
assertEquals(privacy, team.getPrivacy());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFetchChildTeams() throws IOException {
|
||||
String teamSlug = "dummy-team";
|
||||
|
||||
GHOrganization org = gitHub.getOrganization(GITHUB_API_TEST_ORG);
|
||||
GHTeam team = org.getTeamBySlug(teamSlug);
|
||||
Set<GHTeam> result = team.listChildTeams().toSet();
|
||||
|
||||
assertEquals(1, result.size());
|
||||
assertEquals("child-team-for-dummy", result.toArray(new GHTeam[]{})[0].getName());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFetchEmptyChildTeams() throws IOException {
|
||||
String teamSlug = "simple-team";
|
||||
|
||||
GHOrganization org = gitHub.getOrganization(GITHUB_API_TEST_ORG);
|
||||
GHTeam team = org.getTeamBySlug(teamSlug);
|
||||
Set<GHTeam> result = team.listChildTeams().toSet();
|
||||
|
||||
assertEquals(0, result.size());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,12 +4,13 @@ import org.junit.Test;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.Instant;
|
||||
import java.time.format.DateTimeParseException;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Date;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
import static org.hamcrest.core.Is.is;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
/**
|
||||
* Unit test for {@link GitHub} static helpers.
|
||||
@@ -20,25 +21,38 @@ public class GitHubStaticTest extends AbstractGitHubWireMockTest {
|
||||
|
||||
@Test
|
||||
public void timeRoundTrip() throws Exception {
|
||||
Instant instantNow = Instant.now();
|
||||
final long stableInstantEpochMilli = 1533721222255L;
|
||||
Instant instantNow = Instant.ofEpochMilli(stableInstantEpochMilli);
|
||||
|
||||
Date instantSeconds = Date.from(instantNow.truncatedTo(ChronoUnit.SECONDS));
|
||||
Date instantMillis = Date.from(instantNow.truncatedTo(ChronoUnit.MILLIS));
|
||||
|
||||
// if we happen to land exactly on zero milliseconds, add 1 milli
|
||||
if (instantSeconds.equals(instantMillis)) {
|
||||
instantMillis = Date.from(instantNow.plusMillis(1).truncatedTo(ChronoUnit.MILLIS));
|
||||
}
|
||||
String instantFormatSlash = formatZonedDate(instantMillis, "yyyy/MM/dd HH:mm:ss ZZZZ", "PST");
|
||||
assertThat(instantFormatSlash, equalTo("2018/08/08 02:40:22 -0700"));
|
||||
|
||||
// TODO: other formats
|
||||
String instantFormatSlash = formatDate(instantMillis, "yyyy/MM/dd HH:mm:ss ZZZZ");
|
||||
String instantFormatDash = formatDate(instantMillis, "yyyy-MM-dd'T'HH:mm:ss'Z'");
|
||||
assertThat(instantFormatDash, equalTo("2018-08-08T09:40:22Z"));
|
||||
|
||||
String instantFormatMillis = formatDate(instantMillis, "yyyy-MM-dd'T'HH:mm:ss.S'Z'");
|
||||
assertThat(instantFormatMillis, equalTo("2018-08-08T09:40:22.255Z"));
|
||||
|
||||
String instantFormatMillisZoned = formatZonedDate(instantMillis, "yyyy-MM-dd'T'HH:mm:ss.SXXX", "PST");
|
||||
assertThat(instantFormatMillisZoned, equalTo("2018-08-08T02:40:22.255-07:00"));
|
||||
|
||||
String instantSecondsFormatMillis = formatDate(instantSeconds, "yyyy-MM-dd'T'HH:mm:ss.S'Z'");
|
||||
assertThat(instantSecondsFormatMillis, equalTo("2018-08-08T09:40:22.0Z"));
|
||||
|
||||
String instantSecondsFormatMillisZoned = formatZonedDate(instantSeconds, "yyyy-MM-dd'T'HH:mm:ss.SSSXXX", "PST");
|
||||
assertThat(instantSecondsFormatMillisZoned, equalTo("2018-08-08T02:40:22.000-07:00"));
|
||||
|
||||
String instantBadFormat = formatDate(instantMillis, "yy-MM-dd'T'HH:mm'Z'");
|
||||
assertThat(instantBadFormat, equalTo("18-08-08T09:40Z"));
|
||||
|
||||
assertThat(GitHubClient.parseDate(GitHubClient.printDate(instantSeconds)),
|
||||
equalTo(GitHubClient.parseDate(GitHubClient.printDate(instantMillis))));
|
||||
assertThat(GitHubClient.printDate(instantSeconds), equalTo("2018-08-08T09:40:22Z"));
|
||||
assertThat(GitHubClient.printDate(GitHubClient.parseDate(instantFormatMillisZoned)),
|
||||
equalTo("2018-08-08T09:40:22Z"));
|
||||
|
||||
assertThat(instantSeconds, equalTo(GitHubClient.parseDate(GitHubClient.printDate(instantSeconds))));
|
||||
|
||||
@@ -51,82 +65,153 @@ public class GitHubStaticTest extends AbstractGitHubWireMockTest {
|
||||
|
||||
// This parser does not truncate to the nearest second, so it will be equal
|
||||
assertThat(instantMillis, equalTo(GitHubClient.parseDate(instantFormatMillis)));
|
||||
assertThat(instantMillis, equalTo(GitHubClient.parseDate(instantFormatMillisZoned)));
|
||||
|
||||
assertThat(instantSeconds, equalTo(GitHubClient.parseDate(instantSecondsFormatMillis)));
|
||||
assertThat(instantSeconds, equalTo(GitHubClient.parseDate(instantSecondsFormatMillisZoned)));
|
||||
|
||||
try {
|
||||
GitHubClient.parseDate(instantBadFormat);
|
||||
fail("Bad time format should throw.");
|
||||
} catch (IllegalStateException e) {
|
||||
assertThat(e.getMessage(), equalTo("Unable to parse the timestamp: " + instantBadFormat));
|
||||
} catch (DateTimeParseException e) {
|
||||
assertThat(e.getMessage(), equalTo("Text '" + instantBadFormat + "' could not be parsed at index 0"));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGitHubRateLimitShouldReplaceRateLimit() throws Exception {
|
||||
|
||||
GHRateLimit.Record unknown0 = GHRateLimit.Unknown().getCore();
|
||||
GHRateLimit.Record unknown1 = GHRateLimit.Unknown().getCore();
|
||||
GHRateLimit.UnknownLimitRecord.reset();
|
||||
GHRateLimit.UnknownLimitRecord.unknownLimitResetSeconds = 5;
|
||||
|
||||
GHRateLimit.Record record0 = new GHRateLimit.Record(10, 10, 10L);
|
||||
GHRateLimit.Record record1 = new GHRateLimit.Record(10, 9, 10L);
|
||||
GHRateLimit.Record record2 = new GHRateLimit.Record(10, 2, 10L);
|
||||
GHRateLimit.Record record3 = new GHRateLimit.Record(10, 10, 20L);
|
||||
GHRateLimit.Record record4 = new GHRateLimit.Record(10, 5, 20L);
|
||||
GHRateLimit.Record unknown0 = GHRateLimit.UnknownLimitRecord.current();
|
||||
|
||||
Thread.sleep(2000);
|
||||
Thread.sleep(1500);
|
||||
GHRateLimit.UnknownLimitRecord.reset();
|
||||
GHRateLimit.UnknownLimitRecord.unknownLimitResetSeconds = 5;
|
||||
|
||||
// For testing, we create an new unknown.
|
||||
GHRateLimit.Record unknown1 = GHRateLimit.UnknownLimitRecord.current();
|
||||
|
||||
assertThat("Valid unknown should not replace an existing one, regardless of created or reset time",
|
||||
unknown1.currentOrUpdated(unknown0),
|
||||
sameInstance(unknown1));
|
||||
assertThat("Valid unknown should not replace an existing one, regardless of created or reset time",
|
||||
unknown0.currentOrUpdated(unknown1),
|
||||
sameInstance(unknown0));
|
||||
|
||||
// Sleep to make different created time
|
||||
Thread.sleep(1500);
|
||||
|
||||
// To reduce object creation: There is only one valid Unknown record at a time.
|
||||
assertThat("Unknown current should should limit the creation of new unknown records",
|
||||
unknown1,
|
||||
sameInstance(GHRateLimit.UnknownLimitRecord.current()));
|
||||
|
||||
long epochSeconds = Instant.now().getEpochSecond();
|
||||
|
||||
GHRateLimit.Record record0 = new GHRateLimit.Record(10, 10, epochSeconds + 10L);
|
||||
GHRateLimit.Record record1 = new GHRateLimit.Record(10, 9, epochSeconds + 10L);
|
||||
GHRateLimit.Record record2 = new GHRateLimit.Record(10, 2, epochSeconds + 10L);
|
||||
GHRateLimit.Record record3 = new GHRateLimit.Record(10, 10, epochSeconds + 20L);
|
||||
GHRateLimit.Record record4 = new GHRateLimit.Record(10, 5, epochSeconds + 20L);
|
||||
GHRateLimit.Record recordExpired0 = new GHRateLimit.Record(10, 10, epochSeconds - 1L);
|
||||
GHRateLimit.Record recordExpired1 = new GHRateLimit.Record(10, 10, epochSeconds + 2L);
|
||||
|
||||
// Sleep to make expired and different created time
|
||||
Thread.sleep(4000);
|
||||
|
||||
GHRateLimit.Record recordWorst = new GHRateLimit.Record(Integer.MAX_VALUE, Integer.MAX_VALUE, Long.MIN_VALUE);
|
||||
GHRateLimit.Record record00 = new GHRateLimit.Record(10, 10, 10L);
|
||||
GHRateLimit.Record unknown2 = GHRateLimit.Unknown().getCore();
|
||||
GHRateLimit.Record record00 = new GHRateLimit.Record(10, 10, epochSeconds + 10L);
|
||||
|
||||
GHRateLimit.Record unknownExpired0 = unknown0;
|
||||
GHRateLimit.Record unknownExpired1 = unknown1;
|
||||
unknown0 = GHRateLimit.UnknownLimitRecord.current();
|
||||
|
||||
// Rate-limit records maybe created and returned in different orders.
|
||||
// We should update to the regular records over unknowns.
|
||||
// We should update to the unexpired regular records over unknowns.
|
||||
// After that, we should update to the candidate if its limit is lower or its reset is later.
|
||||
|
||||
assertThat("Equivalent unknown should not replace", GitHubClient.shouldReplace(unknown0, unknown1), is(false));
|
||||
assertThat("Equivalent unknown should not replace", GitHubClient.shouldReplace(unknown1, unknown0), is(false));
|
||||
assertThat("Expired unknowns should not replace another expired one, regardless of created or reset time",
|
||||
unknownExpired0.currentOrUpdated(unknownExpired1),
|
||||
sameInstance(unknownExpired0));
|
||||
assertThat("Expired unknowns should not replace another expired one, regardless of created or reset time",
|
||||
unknownExpired1.currentOrUpdated(unknownExpired0),
|
||||
sameInstance(unknownExpired1));
|
||||
|
||||
assertThat("Later unknown should replace earlier", GitHubClient.shouldReplace(unknown2, unknown0), is(true));
|
||||
assertThat("Earlier unknown should not replace later",
|
||||
GitHubClient.shouldReplace(unknown0, unknown2),
|
||||
is(false));
|
||||
assertThat("Expired unknown should not be replaced by expired earlier normal record",
|
||||
unknownExpired0.currentOrUpdated(recordExpired0),
|
||||
sameInstance(unknownExpired0));
|
||||
assertThat("Expired normal record should not be replaced an expired earlier unknown record",
|
||||
recordExpired0.currentOrUpdated(unknownExpired0),
|
||||
sameInstance(recordExpired0));
|
||||
|
||||
assertThat("Worst record should replace later unknown",
|
||||
GitHubClient.shouldReplace(recordWorst, unknown1),
|
||||
is(true));
|
||||
assertThat("Unknown should not replace worst record",
|
||||
GitHubClient.shouldReplace(unknown1, recordWorst),
|
||||
is(false));
|
||||
assertThat("Expired unknown should be replaced by expired later normal record",
|
||||
unknownExpired0.currentOrUpdated(recordExpired1),
|
||||
sameInstance(recordExpired1));
|
||||
assertThat(
|
||||
"Expired later normal record should not be replaced an expired unknown record, regardless of created or reset time",
|
||||
recordExpired1.currentOrUpdated(unknownExpired0),
|
||||
sameInstance(recordExpired1));
|
||||
|
||||
assertThat("Earlier record should replace later worst",
|
||||
GitHubClient.shouldReplace(record0, recordWorst),
|
||||
is(true));
|
||||
assertThat("Valid unknown should not be replaced by an expired unknown",
|
||||
unknown0.currentOrUpdated(unknownExpired0),
|
||||
sameInstance(unknown0));
|
||||
assertThat("Expired unknown should be replaced by valid unknown",
|
||||
unknownExpired0.currentOrUpdated(unknown0),
|
||||
sameInstance(unknown0));
|
||||
|
||||
assertThat("Valid unknown should replace an expired normal record",
|
||||
recordExpired1.currentOrUpdated(unknown0),
|
||||
sameInstance(unknown0));
|
||||
assertThat("Valid unknown record should not be replaced by expired normal record",
|
||||
unknown0.currentOrUpdated(recordExpired1),
|
||||
sameInstance(unknown0));
|
||||
|
||||
// In normal comparision, expiration doesn't matter
|
||||
assertThat("Expired normal should not be replaced by an earlier expired one",
|
||||
recordExpired1.currentOrUpdated(recordExpired0),
|
||||
sameInstance(recordExpired1));
|
||||
assertThat("Expired normal should be replaced by a later expired one",
|
||||
recordExpired0.currentOrUpdated(recordExpired1),
|
||||
sameInstance(recordExpired1));
|
||||
|
||||
assertThat("Later worst record should be replaced by earlier record",
|
||||
recordWorst.currentOrUpdated(record0),
|
||||
sameInstance(record0));
|
||||
assertThat("Later worst record should not replace earlier",
|
||||
GitHubClient.shouldReplace(recordWorst, record0),
|
||||
is(false));
|
||||
record0.currentOrUpdated(recordWorst),
|
||||
sameInstance(record0));
|
||||
|
||||
assertThat("Equivalent record should not replace", GitHubClient.shouldReplace(record0, record00), is(false));
|
||||
assertThat("Equivalent record should not replace", GitHubClient.shouldReplace(record00, record0), is(false));
|
||||
assertThat("Equivalent record should not replace other",
|
||||
record00.currentOrUpdated(record0),
|
||||
sameInstance(record00));
|
||||
assertThat("Equivalent record should not replace other",
|
||||
record0.currentOrUpdated(record00),
|
||||
sameInstance(record0));
|
||||
|
||||
assertThat("Lower limit record should replace higher", GitHubClient.shouldReplace(record1, record0), is(true));
|
||||
assertThat("Lower limit record should replace higher", GitHubClient.shouldReplace(record2, record1), is(true));
|
||||
assertThat("Higher limit record should be replaced by lower",
|
||||
record0.currentOrUpdated(record1),
|
||||
sameInstance(record1));
|
||||
assertThat("Higher limit record should be replaced by lower",
|
||||
record1.currentOrUpdated(record2),
|
||||
sameInstance(record2));
|
||||
|
||||
assertThat("Higher limit record should not replace lower",
|
||||
GitHubClient.shouldReplace(record1, record2),
|
||||
is(false));
|
||||
assertThat("Lower limit record should not be replaced higher",
|
||||
record2.currentOrUpdated(record1),
|
||||
sameInstance(record2));
|
||||
|
||||
assertThat("Higher limit record with later reset should replace lower",
|
||||
GitHubClient.shouldReplace(record3, record2),
|
||||
is(true));
|
||||
assertThat("Lower limit record should be replaced by higher limit record with later reset",
|
||||
record2.currentOrUpdated(record3),
|
||||
sameInstance(record3));
|
||||
|
||||
assertThat("Lower limit record with later reset should replace higher",
|
||||
GitHubClient.shouldReplace(record4, record1),
|
||||
is(true));
|
||||
assertThat("Higher limit record should be replaced by lower limit record with later reset",
|
||||
record1.currentOrUpdated(record4),
|
||||
sameInstance(record4));
|
||||
|
||||
assertThat("Lower limit record with earlier reset should not replace higher",
|
||||
GitHubClient.shouldReplace(record2, record4),
|
||||
is(false));
|
||||
assertThat("Higher limit record should not be replaced by lower limit record with earlier reset",
|
||||
record4.currentOrUpdated(record2),
|
||||
sameInstance(record4));
|
||||
|
||||
}
|
||||
|
||||
@@ -157,8 +242,12 @@ public class GitHubStaticTest extends AbstractGitHubWireMockTest {
|
||||
}
|
||||
|
||||
static String formatDate(Date dt, String format) {
|
||||
return formatZonedDate(dt, format, "GMT");
|
||||
}
|
||||
|
||||
static String formatZonedDate(Date dt, String format, String timeZone) {
|
||||
SimpleDateFormat df = new SimpleDateFormat(format);
|
||||
df.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||
df.setTimeZone(TimeZone.getTimeZone(timeZone));
|
||||
return df.format(dt);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ public class RateLimitCheckerTest extends AbstractGitHubWireMockTest {
|
||||
public void testGitHubRateLimit() throws Exception {
|
||||
// Customized response that templates the date to keep things working
|
||||
snapshotNotAllowed();
|
||||
GHRateLimit.UnknownLimitRecord.reset();
|
||||
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(0));
|
||||
|
||||
@@ -45,7 +46,7 @@ public class RateLimitCheckerTest extends AbstractGitHubWireMockTest {
|
||||
.withEndpoint(mockGitHub.apiServer().baseUrl())
|
||||
.build();
|
||||
|
||||
assertThat(gitHub.lastRateLimit(), nullValue());
|
||||
assertThat(gitHub.lastRateLimit(), sameInstance(GHRateLimit.DEFAULT));
|
||||
|
||||
// Checks the rate limit before getting myself
|
||||
gitHub.getMyself();
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.kohsuke.github.junit;
|
||||
|
||||
import com.github.tomakehurst.wiremock.WireMockServer;
|
||||
import com.github.tomakehurst.wiremock.admin.model.*;
|
||||
import com.github.tomakehurst.wiremock.client.CountMatchingStrategy;
|
||||
import com.github.tomakehurst.wiremock.client.MappingBuilder;
|
||||
import com.github.tomakehurst.wiremock.client.VerificationException;
|
||||
import com.github.tomakehurst.wiremock.client.WireMock;
|
||||
@@ -221,6 +222,10 @@ public class WireMockRule implements MethodRule, TestRule, Container, Stubbing,
|
||||
wireMockServer.verify(count, requestPatternBuilder);
|
||||
}
|
||||
|
||||
public void verify(CountMatchingStrategy countMatchingStrategy, RequestPatternBuilder requestPatternBuilder) {
|
||||
wireMockServer.verify(countMatchingStrategy, requestPatternBuilder);
|
||||
}
|
||||
|
||||
public List<LoggedRequest> findAll(RequestPatternBuilder requestPatternBuilder) {
|
||||
return wireMockServer.findAll(requestPatternBuilder);
|
||||
}
|
||||
|
||||
@@ -109,6 +109,10 @@ public class WireMockRuleConfiguration implements Options {
|
||||
return parent.browserProxyingEnabled();
|
||||
}
|
||||
|
||||
public BrowserProxySettings browserProxySettings() {
|
||||
return parent.browserProxySettings();
|
||||
}
|
||||
|
||||
public ProxySettings proxyVia() {
|
||||
return parent.proxyVia();
|
||||
}
|
||||
@@ -180,4 +184,8 @@ public class WireMockRuleConfiguration implements Options {
|
||||
public boolean getStubRequestLoggingDisabled() {
|
||||
return parent.getStubRequestLoggingDisabled();
|
||||
}
|
||||
|
||||
public boolean getStubCorsEnabled() {
|
||||
return parent.getStubCorsEnabled();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"id": 222596043,
|
||||
"node_id": "MDEwOlJlcG9zaXRvcnkyMjI1OTYwNDM=",
|
||||
"id": 280488362,
|
||||
"node_id": "MDEwOlJlcG9zaXRvcnkyODA0ODgzNjI=",
|
||||
"name": "temp-testEnableBranchProtections",
|
||||
"full_name": "hub4j-test-org/temp-testEnableBranchProtections",
|
||||
"private": false,
|
||||
@@ -64,9 +64,9 @@
|
||||
"labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableBranchProtections/labels{/name}",
|
||||
"releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableBranchProtections/releases{/id}",
|
||||
"deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableBranchProtections/deployments",
|
||||
"created_at": "2019-11-19T03:01:26Z",
|
||||
"updated_at": "2019-11-19T03:01:31Z",
|
||||
"pushed_at": "2019-11-19T03:01:27Z",
|
||||
"created_at": "2020-07-17T17:40:22Z",
|
||||
"updated_at": "2020-07-17T17:40:27Z",
|
||||
"pushed_at": "2020-07-17T17:40:24Z",
|
||||
"git_url": "git://github.com/hub4j-test-org/temp-testEnableBranchProtections.git",
|
||||
"ssh_url": "git@github.com:hub4j-test-org/temp-testEnableBranchProtections.git",
|
||||
"clone_url": "https://github.com/hub4j-test-org/temp-testEnableBranchProtections.git",
|
||||
@@ -96,9 +96,11 @@
|
||||
"push": true,
|
||||
"pull": true
|
||||
},
|
||||
"temp_clone_token": "",
|
||||
"allow_squash_merge": true,
|
||||
"allow_merge_commit": true,
|
||||
"allow_rebase_merge": true,
|
||||
"delete_branch_on_merge": false,
|
||||
"organization": {
|
||||
"login": "hub4j-test-org",
|
||||
"id": 7544739,
|
||||
@@ -120,5 +122,5 @@
|
||||
"site_admin": false
|
||||
},
|
||||
"network_count": 0,
|
||||
"subscribers_count": 4
|
||||
"subscribers_count": 8
|
||||
}
|
||||
@@ -1,36 +1,36 @@
|
||||
{
|
||||
"name": "master",
|
||||
"commit": {
|
||||
"sha": "298ffff9c7928b06e9b74d01ae8a34ab98e9b4c2",
|
||||
"node_id": "MDY6Q29tbWl0MjIyNTk2MDQzOjI5OGZmZmY5Yzc5MjhiMDZlOWI3NGQwMWFlOGEzNGFiOThlOWI0YzI=",
|
||||
"sha": "7b85665b2b0b99ac61e7c23a35b0479daa9014d7",
|
||||
"node_id": "MDY6Q29tbWl0MjgwNDg4MzYyOjdiODU2NjViMmIwYjk5YWM2MWU3YzIzYTM1YjA0NzlkYWE5MDE0ZDc=",
|
||||
"commit": {
|
||||
"author": {
|
||||
"name": "Liam Newman",
|
||||
"email": "bitwiseman@gmail.com",
|
||||
"date": "2019-11-19T03:01:27Z"
|
||||
"date": "2020-07-17T17:40:24Z"
|
||||
},
|
||||
"committer": {
|
||||
"name": "GitHub",
|
||||
"email": "noreply@github.com",
|
||||
"date": "2019-11-19T03:01:27Z"
|
||||
"date": "2020-07-17T17:40:24Z"
|
||||
},
|
||||
"message": "Initial commit",
|
||||
"tree": {
|
||||
"sha": "3858cfba073ecd82947ddca0dc3613584db75e4c",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableBranchProtections/git/trees/3858cfba073ecd82947ddca0dc3613584db75e4c"
|
||||
},
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableBranchProtections/git/commits/298ffff9c7928b06e9b74d01ae8a34ab98e9b4c2",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableBranchProtections/git/commits/7b85665b2b0b99ac61e7c23a35b0479daa9014d7",
|
||||
"comment_count": 0,
|
||||
"verification": {
|
||||
"verified": true,
|
||||
"reason": "valid",
|
||||
"signature": "-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJd01sHCRBK7hj4Ov3rIwAAdHIIABgp0lFAcHc2m3RCcuCUqfMl\nzfgjjYNYsqyWgwWeB0c44naL8nqhF/a80KlY4+1T2gVR8GOSZNyC8ewDH/6V+X3q\n5MzjTNJBk2ks5oA4bz2fgdsE7fm8kKDZQRqL9+BN4JF9MNps4M2+nR5Rg4sBm2+A\nSZHcdfzZ6ll0ptcTGl7403Xe9irj/V6iymycUapbK4+RHBotrN6kbBGZtjILempU\nMbYrIuqteQF3B2p9FSXFCJ8SpAL/Cq/GkpGvEbYIPdQ2IFQ6ImiRSf6eNTvSXxtG\nLJygBJsaRCH81FEhBfUnbP+stB9x4dloj/yhPLd6BXv1VCuzT2h9roYtaemjb7c=\n=ycC3\n-----END PGP SIGNATURE-----\n",
|
||||
"payload": "tree 3858cfba073ecd82947ddca0dc3613584db75e4c\nauthor Liam Newman <bitwiseman@gmail.com> 1574132487 -0800\ncommitter GitHub <noreply@github.com> 1574132487 -0800\n\nInitial commit"
|
||||
"signature": "-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJfEeKICRBK7hj4Ov3rIwAAdHIIAIhWRCiGPP64NglqLTELU0qx\nMtPpqwEx7yPwksfvU2XD6WY3NKCHqAlBgIrn6VSsmLx8IF3r0i+hLO4RXOyq+leJ\njmbq697BZNG8OmkB8asAV5r/wow9zL0dvXglpgPdozxPFqTS/aTJWvbwLHZ3UoA7\nCnHnHWVqQMiwBLD/5Jn2pjJ5Oa3C0FfdaocjfZsHZZD7YmfX4rnI8rZW0VpvfzKD\nSs9s5VpsxW/EIQPMAnduntTngdO3Op6dbqbF6PoweS3jDKpACbXI1OZV40LrmvQ6\nBQCSqc0Hy8j04wAswLSI1RdU87ST0fkvB3s61XFB0BO/bxiSSI0U1owMKFkJLIU=\n=+M0n\n-----END PGP SIGNATURE-----\n",
|
||||
"payload": "tree 3858cfba073ecd82947ddca0dc3613584db75e4c\nauthor Liam Newman <bitwiseman@gmail.com> 1595007624 -0700\ncommitter GitHub <noreply@github.com> 1595007624 -0700\n\nInitial commit"
|
||||
}
|
||||
},
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableBranchProtections/commits/298ffff9c7928b06e9b74d01ae8a34ab98e9b4c2",
|
||||
"html_url": "https://github.com/hub4j-test-org/temp-testEnableBranchProtections/commit/298ffff9c7928b06e9b74d01ae8a34ab98e9b4c2",
|
||||
"comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableBranchProtections/commits/298ffff9c7928b06e9b74d01ae8a34ab98e9b4c2/comments",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableBranchProtections/commits/7b85665b2b0b99ac61e7c23a35b0479daa9014d7",
|
||||
"html_url": "https://github.com/hub4j-test-org/temp-testEnableBranchProtections/commit/7b85665b2b0b99ac61e7c23a35b0479daa9014d7",
|
||||
"comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableBranchProtections/commits/7b85665b2b0b99ac61e7c23a35b0479daa9014d7/comments",
|
||||
"author": {
|
||||
"login": "bitwiseman",
|
||||
"id": 1958953,
|
||||
@@ -17,5 +17,14 @@
|
||||
"enforce_admins": {
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableBranchProtections/branches/master/protection/enforce_admins",
|
||||
"enabled": true
|
||||
},
|
||||
"required_linear_history": {
|
||||
"enabled": false
|
||||
},
|
||||
"allow_force_pushes": {
|
||||
"enabled": false
|
||||
},
|
||||
"allow_deletions": {
|
||||
"enabled": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableBranchProtections/branches/master/protection",
|
||||
"required_status_checks": {
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableBranchProtections/branches/master/protection/required_status_checks",
|
||||
"strict": true,
|
||||
"contexts": [
|
||||
"test-status-check"
|
||||
],
|
||||
"contexts_url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableBranchProtections/branches/master/protection/required_status_checks/contexts"
|
||||
},
|
||||
"required_pull_request_reviews": {
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableBranchProtections/branches/master/protection/required_pull_request_reviews",
|
||||
"dismiss_stale_reviews": true,
|
||||
"require_code_owner_reviews": true,
|
||||
"required_approving_review_count": 2
|
||||
},
|
||||
"enforce_admins": {
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableBranchProtections/branches/master/protection/enforce_admins",
|
||||
"enabled": true
|
||||
},
|
||||
"required_linear_history": {
|
||||
"enabled": false
|
||||
},
|
||||
"allow_force_pushes": {
|
||||
"enabled": false
|
||||
},
|
||||
"allow_deletions": {
|
||||
"enabled": false
|
||||
}
|
||||
}
|
||||
@@ -23,17 +23,18 @@
|
||||
"location": "Seattle, WA, USA",
|
||||
"email": "bitwiseman@gmail.com",
|
||||
"hireable": null,
|
||||
"bio": "https://twitter.com/bitwiseman",
|
||||
"public_repos": 176,
|
||||
"bio": null,
|
||||
"twitter_username": "bitwiseman",
|
||||
"public_repos": 196,
|
||||
"public_gists": 7,
|
||||
"followers": 140,
|
||||
"followers": 165,
|
||||
"following": 9,
|
||||
"created_at": "2012-07-11T20:38:33Z",
|
||||
"updated_at": "2019-09-24T19:32:29Z",
|
||||
"private_gists": 7,
|
||||
"total_private_repos": 9,
|
||||
"updated_at": "2020-07-15T22:26:44Z",
|
||||
"private_gists": 19,
|
||||
"total_private_repos": 14,
|
||||
"owned_private_repos": 0,
|
||||
"disk_usage": 33697,
|
||||
"disk_usage": 33700,
|
||||
"collaborators": 0,
|
||||
"two_factor_authentication": true,
|
||||
"plan": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"id": "02ee4913-4f10-4403-9f86-c911719d8b88",
|
||||
"id": "4efe7367-0313-4dff-ac98-6800c1b71d96",
|
||||
"name": "repos_hub4j-test-org_temp-testenablebranchprotections",
|
||||
"request": {
|
||||
"url": "/repos/hub4j-test-org/temp-testEnableBranchProtections",
|
||||
@@ -12,37 +12,35 @@
|
||||
},
|
||||
"response": {
|
||||
"status": 200,
|
||||
"bodyFileName": "repos_hub4j-test-org_temp-02ee4913.json",
|
||||
"bodyFileName": "repos_hub4j-test-org_temp-testenablebranchprotections-2.json",
|
||||
"headers": {
|
||||
"Date": "Tue, 19 Nov 2019 03:01:32 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Date": "Fri, 17 Jul 2020 17:40:28 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Status": "200 OK",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4937",
|
||||
"X-RateLimit-Reset": "1574135997",
|
||||
"X-RateLimit-Remaining": "4967",
|
||||
"X-RateLimit-Reset": "1595008101",
|
||||
"Cache-Control": "private, max-age=60, s-maxage=60",
|
||||
"Vary": [
|
||||
"Accept, Authorization, Cookie, X-GitHub-OTP",
|
||||
"Accept-Encoding"
|
||||
"Accept-Encoding, Accept, X-Requested-With"
|
||||
],
|
||||
"ETag": "W/\"85ef7d73fa0d8de7e964cdc69d1648a0\"",
|
||||
"Last-Modified": "Tue, 19 Nov 2019 03:01:31 GMT",
|
||||
"ETag": "W/\"6013dab6b9fb4f1cf8b48240299ad51f\"",
|
||||
"Last-Modified": "Fri, 17 Jul 2020 17:40:27 GMT",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "repo",
|
||||
"X-GitHub-Media-Type": "unknown, github.v3",
|
||||
"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": "C495:6994:5EFFF:6F6AF:5DD35B05"
|
||||
"X-GitHub-Request-Id": "CEEF:2B4C:15D0835:2472826:5F11E285"
|
||||
}
|
||||
},
|
||||
"uuid": "02ee4913-4f10-4403-9f86-c911719d8b88",
|
||||
"uuid": "4efe7367-0313-4dff-ac98-6800c1b71d96",
|
||||
"persistent": true,
|
||||
"insertionIndex": 2
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"id": "74041767-9edf-4710-baa8-823cb96977dc",
|
||||
"name": "repos_hub4j-test-org_temp-testenablebranchprotections_branches_master",
|
||||
"request": {
|
||||
"url": "/repos/hub4j-test-org/temp-testEnableBranchProtections/branches/master",
|
||||
"method": "GET",
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status": 200,
|
||||
"bodyFileName": "repos_hub4j-test-org_temp-testenablebranchprotections_branches_master-3.json",
|
||||
"headers": {
|
||||
"Server": "GitHub.com",
|
||||
"Date": "Fri, 17 Jul 2020 17:40:28 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Status": "200 OK",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4966",
|
||||
"X-RateLimit-Reset": "1595008101",
|
||||
"Cache-Control": "private, max-age=60, s-maxage=60",
|
||||
"Vary": [
|
||||
"Accept, Authorization, Cookie, X-GitHub-OTP",
|
||||
"Accept-Encoding, Accept, X-Requested-With"
|
||||
],
|
||||
"ETag": "W/\"87757a577671d3f33dc288cf1ed01337\"",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "",
|
||||
"X-GitHub-Media-Type": "unknown, github.v3",
|
||||
"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": "CEEF:2B4C:15D0850:2472E41:5F11E28C"
|
||||
}
|
||||
},
|
||||
"uuid": "74041767-9edf-4710-baa8-823cb96977dc",
|
||||
"persistent": true,
|
||||
"insertionIndex": 3
|
||||
}
|
||||
@@ -1,54 +1,52 @@
|
||||
{
|
||||
"id": "aa97cf7b-7c9d-4c01-b7c5-bccc62b30873",
|
||||
"id": "3cdd44cf-a62c-43f6-abad-de7c8b65bfe3",
|
||||
"name": "repos_hub4j-test-org_temp-testenablebranchprotections_branches_master_protection",
|
||||
"request": {
|
||||
"url": "/repos/hub4j-test-org/temp-testEnableBranchProtections/branches/master/protection",
|
||||
"method": "PUT",
|
||||
"bodyPatterns": [
|
||||
{
|
||||
"equalToJson": "{\"required_pull_request_reviews\":{\"required_approving_review_count\":2,\"require_code_owner_reviews\":true,\"dismiss_stale_reviews\":true},\"required_status_checks\":{\"contexts\":[\"test-status-check\"],\"strict\":true},\"restrictions\":null,\"enforce_admins\":true}",
|
||||
"ignoreArrayOrder": true,
|
||||
"ignoreExtraElements": true
|
||||
}
|
||||
],
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "application/vnd.github.luke-cage-preview+json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"bodyPatterns": [
|
||||
{
|
||||
"equalToJson": "{\"required_pull_request_reviews\":{\"required_approving_review_count\":2,\"require_code_owner_reviews\":true,\"dismiss_stale_reviews\":true},\"required_status_checks\":{\"contexts\":[\"test-status-check\"],\"strict\":true},\"restrictions\":null,\"enforce_admins\":true}",
|
||||
"ignoreArrayOrder": true,
|
||||
"ignoreExtraElements": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"response": {
|
||||
"status": 200,
|
||||
"bodyFileName": "repos_hub4j-test-org_temp-aa97cf7b.json",
|
||||
"bodyFileName": "repos_hub4j-test-org_temp-testenablebranchprotections_branches_master_protection-4.json",
|
||||
"headers": {
|
||||
"Date": "Tue, 19 Nov 2019 03:01:32 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Date": "Fri, 17 Jul 2020 17:40:28 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Status": "200 OK",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4935",
|
||||
"X-RateLimit-Reset": "1574135997",
|
||||
"X-RateLimit-Remaining": "4965",
|
||||
"X-RateLimit-Reset": "1595008101",
|
||||
"Cache-Control": "private, max-age=60, s-maxage=60",
|
||||
"Vary": [
|
||||
"Accept, Authorization, Cookie, X-GitHub-OTP",
|
||||
"Accept-Encoding"
|
||||
"Accept-Encoding, Accept, X-Requested-With"
|
||||
],
|
||||
"ETag": "W/\"51724a4f269fbb64510394b0e2b948b3\"",
|
||||
"ETag": "W/\"a725b1a9d17c9ae6f4c1397a379cbfe1\"",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "",
|
||||
"X-GitHub-Media-Type": "github.luke-cage-preview; format=json",
|
||||
"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": "C495:6994:5F041:6FB54:5DD35B0C"
|
||||
"X-GitHub-Request-Id": "CEEF:2B4C:15D087A:2472E7C:5F11E28C"
|
||||
}
|
||||
},
|
||||
"uuid": "aa97cf7b-7c9d-4c01-b7c5-bccc62b30873",
|
||||
"uuid": "3cdd44cf-a62c-43f6-abad-de7c8b65bfe3",
|
||||
"persistent": true,
|
||||
"insertionIndex": 4
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"id": "d0f2e4e4-01a4-48d4-862a-ae1549171db1",
|
||||
"name": "repos_hub4j-test-org_temp-testenablebranchprotections_branches_master_protection",
|
||||
"request": {
|
||||
"url": "/repos/hub4j-test-org/temp-testEnableBranchProtections/branches/master/protection",
|
||||
"method": "GET",
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "application/vnd.github.luke-cage-preview+json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status": 200,
|
||||
"bodyFileName": "repos_hub4j-test-org_temp-testenablebranchprotections_branches_master_protection-5.json",
|
||||
"headers": {
|
||||
"Server": "GitHub.com",
|
||||
"Date": "Fri, 17 Jul 2020 17:40:29 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Status": "200 OK",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4964",
|
||||
"X-RateLimit-Reset": "1595008101",
|
||||
"Cache-Control": "private, max-age=60, s-maxage=60",
|
||||
"Vary": [
|
||||
"Accept, Authorization, Cookie, X-GitHub-OTP",
|
||||
"Accept-Encoding, Accept, X-Requested-With"
|
||||
],
|
||||
"ETag": "W/\"a725b1a9d17c9ae6f4c1397a379cbfe1\"",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "",
|
||||
"X-GitHub-Media-Type": "github.luke-cage-preview; format=json",
|
||||
"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": "CEEF:2B4C:15D08BF:2472EFB:5F11E28C"
|
||||
}
|
||||
},
|
||||
"uuid": "d0f2e4e4-01a4-48d4-862a-ae1549171db1",
|
||||
"persistent": true,
|
||||
"insertionIndex": 5
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"id": "c38b2b92-6669-42ee-838f-7422bb4f300d",
|
||||
"id": "de42b19c-334e-43e0-ae70-ba154e28c78f",
|
||||
"name": "user",
|
||||
"request": {
|
||||
"url": "/user",
|
||||
@@ -14,35 +14,33 @@
|
||||
"status": 200,
|
||||
"bodyFileName": "user-1.json",
|
||||
"headers": {
|
||||
"Date": "Tue, 19 Nov 2019 03:01:25 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Date": "Fri, 17 Jul 2020 17:40:21 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Status": "200 OK",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4945",
|
||||
"X-RateLimit-Reset": "1574135997",
|
||||
"X-RateLimit-Remaining": "4972",
|
||||
"X-RateLimit-Reset": "1595008101",
|
||||
"Cache-Control": "private, max-age=60, s-maxage=60",
|
||||
"Vary": [
|
||||
"Accept, Authorization, Cookie, X-GitHub-OTP",
|
||||
"Accept-Encoding"
|
||||
"Accept-Encoding, Accept, X-Requested-With"
|
||||
],
|
||||
"ETag": "W/\"a7d3d02f0490e723eacdd27e24979424\"",
|
||||
"Last-Modified": "Tue, 24 Sep 2019 19:32:29 GMT",
|
||||
"ETag": "W/\"8f8e8bafdb06fae53e3e819ac07d01f9\"",
|
||||
"Last-Modified": "Wed, 15 Jul 2020 22:26:44 GMT",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "",
|
||||
"X-GitHub-Media-Type": "unknown, github.v3",
|
||||
"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": "C495:6994:5EC24:6F69A:5DD35B04"
|
||||
"X-GitHub-Request-Id": "CEEF:2B4C:15D0484:24727F8:5F11E285"
|
||||
}
|
||||
},
|
||||
"uuid": "c38b2b92-6669-42ee-838f-7422bb4f300d",
|
||||
"uuid": "de42b19c-334e-43e0-ae70-ba154e28c78f",
|
||||
"persistent": true,
|
||||
"insertionIndex": 1
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"id": 222596057,
|
||||
"node_id": "MDEwOlJlcG9zaXRvcnkyMjI1OTYwNTc=",
|
||||
"id": 280490476,
|
||||
"node_id": "MDEwOlJlcG9zaXRvcnkyODA0OTA0NzY=",
|
||||
"name": "temp-testEnableRequireReviewsOnly",
|
||||
"full_name": "hub4j-test-org/temp-testEnableRequireReviewsOnly",
|
||||
"private": false,
|
||||
@@ -64,9 +64,9 @@
|
||||
"labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableRequireReviewsOnly/labels{/name}",
|
||||
"releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableRequireReviewsOnly/releases{/id}",
|
||||
"deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableRequireReviewsOnly/deployments",
|
||||
"created_at": "2019-11-19T03:01:34Z",
|
||||
"updated_at": "2019-11-19T03:01:40Z",
|
||||
"pushed_at": "2019-11-19T03:01:36Z",
|
||||
"created_at": "2020-07-17T17:50:32Z",
|
||||
"updated_at": "2020-07-17T17:50:36Z",
|
||||
"pushed_at": "2020-07-17T17:50:34Z",
|
||||
"git_url": "git://github.com/hub4j-test-org/temp-testEnableRequireReviewsOnly.git",
|
||||
"ssh_url": "git@github.com:hub4j-test-org/temp-testEnableRequireReviewsOnly.git",
|
||||
"clone_url": "https://github.com/hub4j-test-org/temp-testEnableRequireReviewsOnly.git",
|
||||
@@ -96,9 +96,11 @@
|
||||
"push": true,
|
||||
"pull": true
|
||||
},
|
||||
"temp_clone_token": "",
|
||||
"allow_squash_merge": true,
|
||||
"allow_merge_commit": true,
|
||||
"allow_rebase_merge": true,
|
||||
"delete_branch_on_merge": false,
|
||||
"organization": {
|
||||
"login": "hub4j-test-org",
|
||||
"id": 7544739,
|
||||
@@ -120,5 +122,5 @@
|
||||
"site_admin": false
|
||||
},
|
||||
"network_count": 0,
|
||||
"subscribers_count": 4
|
||||
"subscribers_count": 8
|
||||
}
|
||||
@@ -1,36 +1,36 @@
|
||||
{
|
||||
"name": "master",
|
||||
"commit": {
|
||||
"sha": "d32e320555f9d47f78e64fc3889e567d5eebee8e",
|
||||
"node_id": "MDY6Q29tbWl0MjIyNTk2MDU3OmQzMmUzMjA1NTVmOWQ0N2Y3OGU2NGZjMzg4OWU1NjdkNWVlYmVlOGU=",
|
||||
"sha": "6838de84c122870ab80c61f844a86383e082756b",
|
||||
"node_id": "MDY6Q29tbWl0MjgwNDkwNDc2OjY4MzhkZTg0YzEyMjg3MGFiODBjNjFmODQ0YTg2MzgzZTA4Mjc1NmI=",
|
||||
"commit": {
|
||||
"author": {
|
||||
"name": "Liam Newman",
|
||||
"email": "bitwiseman@gmail.com",
|
||||
"date": "2019-11-19T03:01:35Z"
|
||||
"date": "2020-07-17T17:50:33Z"
|
||||
},
|
||||
"committer": {
|
||||
"name": "GitHub",
|
||||
"email": "noreply@github.com",
|
||||
"date": "2019-11-19T03:01:35Z"
|
||||
"date": "2020-07-17T17:50:33Z"
|
||||
},
|
||||
"message": "Initial commit",
|
||||
"tree": {
|
||||
"sha": "32d1abb4db4e0b5f067f13f8ec544e62126ef47a",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableRequireReviewsOnly/git/trees/32d1abb4db4e0b5f067f13f8ec544e62126ef47a"
|
||||
},
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableRequireReviewsOnly/git/commits/d32e320555f9d47f78e64fc3889e567d5eebee8e",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableRequireReviewsOnly/git/commits/6838de84c122870ab80c61f844a86383e082756b",
|
||||
"comment_count": 0,
|
||||
"verification": {
|
||||
"verified": true,
|
||||
"reason": "valid",
|
||||
"signature": "-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJd01sPCRBK7hj4Ov3rIwAAdHIIADGTF2CM1Q6wUw3RB/sKFvl2\npKkcGV3+0W4+Clnx1k1b60TbjD8hnq+ZtkWxvo3QmUplUapunHoj4zrUkqmzwOVg\nKrCwsvBzSJoRxbKN5j04wCTwB9oUSCEPxs9UxolqCOumwa+GzLv2t4EjGeDEf09S\n18C9Dg9+eiIMaXbO+HXOkltj4V9BTI8+IWA/0EMHVBqeh8daWcbyhQcaHBdkNgR6\nDq9UKMz0Ny2S6/A2v+y8YBj6ftXs+q5/fAPSu6hI4SMAVz26nl1SvkJmR8N79PQ9\nbiybCEzd5is507e8ufr7ElJ/1bfV2z0c0wkXfV6nNX+xYSKP+IfOLAfUljeoCZM=\n=RhfP\n-----END PGP SIGNATURE-----\n",
|
||||
"payload": "tree 32d1abb4db4e0b5f067f13f8ec544e62126ef47a\nauthor Liam Newman <bitwiseman@gmail.com> 1574132495 -0800\ncommitter GitHub <noreply@github.com> 1574132495 -0800\n\nInitial commit"
|
||||
"signature": "-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJfEeTpCRBK7hj4Ov3rIwAAdHIIAI2zbjvmNSVfFgxHrjGfaPe3\nnXJzyEdvVKIQuoWdnz4CcyxfTuY06yTCYVk8bQFXxajMvDxckgk1ltku/fdyPbVn\nQy1r9qfqrv4KaF/Twlpw82OUjN0nXGMofW3eZ8LFGZg+KBJqIg7Nsc3b16Dq4CdB\n+FALZfwCUuDzw5qa6z9Gc2q1M2dFoxsdf2B+0TznEP+zKqPZPaet3BOCojigzFGY\nG/LwtQILJieazwsp2utr/9MjITBWcXiUnIc8eb23Jw7jSWAFM58DtTfjXMiz66y2\nH/bcVYOXtvbvFpjmWPP0IXaAYvIJCHJY4+XfEI/PohI5ICVfvT5D97pvl+6Rt7I=\n=jcxm\n-----END PGP SIGNATURE-----\n",
|
||||
"payload": "tree 32d1abb4db4e0b5f067f13f8ec544e62126ef47a\nauthor Liam Newman <bitwiseman@gmail.com> 1595008233 -0700\ncommitter GitHub <noreply@github.com> 1595008233 -0700\n\nInitial commit"
|
||||
}
|
||||
},
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableRequireReviewsOnly/commits/d32e320555f9d47f78e64fc3889e567d5eebee8e",
|
||||
"html_url": "https://github.com/hub4j-test-org/temp-testEnableRequireReviewsOnly/commit/d32e320555f9d47f78e64fc3889e567d5eebee8e",
|
||||
"comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableRequireReviewsOnly/commits/d32e320555f9d47f78e64fc3889e567d5eebee8e/comments",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableRequireReviewsOnly/commits/6838de84c122870ab80c61f844a86383e082756b",
|
||||
"html_url": "https://github.com/hub4j-test-org/temp-testEnableRequireReviewsOnly/commit/6838de84c122870ab80c61f844a86383e082756b",
|
||||
"comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableRequireReviewsOnly/commits/6838de84c122870ab80c61f844a86383e082756b/comments",
|
||||
"author": {
|
||||
"login": "bitwiseman",
|
||||
"id": 1958953,
|
||||
|
||||
@@ -9,5 +9,14 @@
|
||||
"enforce_admins": {
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableRequireReviewsOnly/branches/master/protection/enforce_admins",
|
||||
"enabled": false
|
||||
},
|
||||
"required_linear_history": {
|
||||
"enabled": false
|
||||
},
|
||||
"allow_force_pushes": {
|
||||
"enabled": false
|
||||
},
|
||||
"allow_deletions": {
|
||||
"enabled": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableRequireReviewsOnly/branches/master/protection",
|
||||
"required_pull_request_reviews": {
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableRequireReviewsOnly/branches/master/protection/required_pull_request_reviews",
|
||||
"dismiss_stale_reviews": false,
|
||||
"require_code_owner_reviews": false,
|
||||
"required_approving_review_count": 1
|
||||
},
|
||||
"enforce_admins": {
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableRequireReviewsOnly/branches/master/protection/enforce_admins",
|
||||
"enabled": false
|
||||
},
|
||||
"required_linear_history": {
|
||||
"enabled": false
|
||||
},
|
||||
"allow_force_pushes": {
|
||||
"enabled": false
|
||||
},
|
||||
"allow_deletions": {
|
||||
"enabled": false
|
||||
}
|
||||
}
|
||||
@@ -23,17 +23,18 @@
|
||||
"location": "Seattle, WA, USA",
|
||||
"email": "bitwiseman@gmail.com",
|
||||
"hireable": null,
|
||||
"bio": "https://twitter.com/bitwiseman",
|
||||
"public_repos": 176,
|
||||
"bio": null,
|
||||
"twitter_username": "bitwiseman",
|
||||
"public_repos": 196,
|
||||
"public_gists": 7,
|
||||
"followers": 140,
|
||||
"followers": 165,
|
||||
"following": 9,
|
||||
"created_at": "2012-07-11T20:38:33Z",
|
||||
"updated_at": "2019-09-24T19:32:29Z",
|
||||
"private_gists": 7,
|
||||
"total_private_repos": 9,
|
||||
"updated_at": "2020-07-15T22:26:44Z",
|
||||
"private_gists": 19,
|
||||
"total_private_repos": 14,
|
||||
"owned_private_repos": 0,
|
||||
"disk_usage": 33697,
|
||||
"disk_usage": 33700,
|
||||
"collaborators": 0,
|
||||
"two_factor_authentication": true,
|
||||
"plan": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"id": "318e0aa4-9fc4-4f30-8174-400001f1bae4",
|
||||
"id": "dbcf605e-c23a-4c9e-9de3-76fddc99b81e",
|
||||
"name": "repos_hub4j-test-org_temp-testenablerequirereviewsonly",
|
||||
"request": {
|
||||
"url": "/repos/hub4j-test-org/temp-testEnableRequireReviewsOnly",
|
||||
@@ -14,35 +14,33 @@
|
||||
"status": 200,
|
||||
"bodyFileName": "repos_hub4j-test-org_temp-testenablerequirereviewsonly-2.json",
|
||||
"headers": {
|
||||
"Date": "Tue, 19 Nov 2019 03:01:41 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Date": "Fri, 17 Jul 2020 17:50:37 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Status": "200 OK",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4924",
|
||||
"X-RateLimit-Reset": "1574135997",
|
||||
"X-RateLimit-Remaining": "4983",
|
||||
"X-RateLimit-Reset": "1595011796",
|
||||
"Cache-Control": "private, max-age=60, s-maxage=60",
|
||||
"Vary": [
|
||||
"Accept, Authorization, Cookie, X-GitHub-OTP",
|
||||
"Accept-Encoding"
|
||||
"Accept-Encoding, Accept, X-Requested-With"
|
||||
],
|
||||
"ETag": "W/\"2b8d8ba2c42054c376d47a34ded30f4b\"",
|
||||
"Last-Modified": "Tue, 19 Nov 2019 03:01:40 GMT",
|
||||
"ETag": "W/\"24c6fd90675a7e045f47e789b9b023e1\"",
|
||||
"Last-Modified": "Fri, 17 Jul 2020 17:50:36 GMT",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "repo",
|
||||
"X-GitHub-Media-Type": "unknown, github.v3",
|
||||
"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": "C49E:6D70:39A9D:4459F:5DD35B0D"
|
||||
"X-GitHub-Request-Id": "D206:1C0D:B36E85:1A833E0:5F11E4E7"
|
||||
}
|
||||
},
|
||||
"uuid": "318e0aa4-9fc4-4f30-8174-400001f1bae4",
|
||||
"uuid": "dbcf605e-c23a-4c9e-9de3-76fddc99b81e",
|
||||
"persistent": true,
|
||||
"insertionIndex": 2
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"id": "0e0c4c56-198f-4d87-b13e-b146cad7ffdb",
|
||||
"id": "210178dc-b484-4bc9-82f5-6b790d736fe1",
|
||||
"name": "repos_hub4j-test-org_temp-testenablerequirereviewsonly_branches_master",
|
||||
"request": {
|
||||
"url": "/repos/hub4j-test-org/temp-testEnableRequireReviewsOnly/branches/master",
|
||||
@@ -14,34 +14,32 @@
|
||||
"status": 200,
|
||||
"bodyFileName": "repos_hub4j-test-org_temp-testenablerequirereviewsonly_branches_master-3.json",
|
||||
"headers": {
|
||||
"Date": "Tue, 19 Nov 2019 03:01:41 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Date": "Fri, 17 Jul 2020 17:50:37 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Status": "200 OK",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4923",
|
||||
"X-RateLimit-Reset": "1574135997",
|
||||
"X-RateLimit-Remaining": "4982",
|
||||
"X-RateLimit-Reset": "1595011795",
|
||||
"Cache-Control": "private, max-age=60, s-maxage=60",
|
||||
"Vary": [
|
||||
"Accept, Authorization, Cookie, X-GitHub-OTP",
|
||||
"Accept-Encoding"
|
||||
"Accept-Encoding, Accept, X-Requested-With"
|
||||
],
|
||||
"ETag": "W/\"51ae00091b56c866a8b2b00d1a3e57ec\"",
|
||||
"ETag": "W/\"423aa2b6a060ed86558d7b5538ce392b\"",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "",
|
||||
"X-GitHub-Media-Type": "unknown, github.v3",
|
||||
"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": "C49E:6D70:39AA6:447F2:5DD35B15"
|
||||
"X-GitHub-Request-Id": "D206:1C0D:B36E8D:1A8382D:5F11E4ED"
|
||||
}
|
||||
},
|
||||
"uuid": "0e0c4c56-198f-4d87-b13e-b146cad7ffdb",
|
||||
"uuid": "210178dc-b484-4bc9-82f5-6b790d736fe1",
|
||||
"persistent": true,
|
||||
"insertionIndex": 3
|
||||
}
|
||||
@@ -1,54 +1,52 @@
|
||||
{
|
||||
"id": "b57fab91-f2a6-4d52-b6d4-05e4a8be5df4",
|
||||
"id": "816d7fb5-30e5-486c-8948-11c4e46d9dab",
|
||||
"name": "repos_hub4j-test-org_temp-testenablerequirereviewsonly_branches_master_protection",
|
||||
"request": {
|
||||
"url": "/repos/hub4j-test-org/temp-testEnableRequireReviewsOnly/branches/master/protection",
|
||||
"method": "PUT",
|
||||
"bodyPatterns": [
|
||||
{
|
||||
"equalToJson": "{\"required_pull_request_reviews\":{},\"required_status_checks\":null,\"restrictions\":null,\"enforce_admins\":false}",
|
||||
"ignoreArrayOrder": true,
|
||||
"ignoreExtraElements": true
|
||||
}
|
||||
],
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "application/vnd.github.luke-cage-preview+json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"bodyPatterns": [
|
||||
{
|
||||
"equalToJson": "{\"required_pull_request_reviews\":{},\"required_status_checks\":null,\"restrictions\":null,\"enforce_admins\":false}",
|
||||
"ignoreArrayOrder": true,
|
||||
"ignoreExtraElements": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"response": {
|
||||
"status": 200,
|
||||
"bodyFileName": "repos_hub4j-test-org_temp-testenablerequirereviewsonly_branches_master_protection-b57fab91.json",
|
||||
"bodyFileName": "repos_hub4j-test-org_temp-testenablerequirereviewsonly_branches_master_protection-4.json",
|
||||
"headers": {
|
||||
"Date": "Tue, 19 Nov 2019 03:01:41 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Date": "Fri, 17 Jul 2020 17:50:38 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Status": "200 OK",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4922",
|
||||
"X-RateLimit-Reset": "1574135997",
|
||||
"X-RateLimit-Remaining": "4981",
|
||||
"X-RateLimit-Reset": "1595011796",
|
||||
"Cache-Control": "private, max-age=60, s-maxage=60",
|
||||
"Vary": [
|
||||
"Accept, Authorization, Cookie, X-GitHub-OTP",
|
||||
"Accept-Encoding"
|
||||
"Accept-Encoding, Accept, X-Requested-With"
|
||||
],
|
||||
"ETag": "W/\"b2d6921837e9e4b720085673dae0aa59\"",
|
||||
"ETag": "W/\"f50071de6fc1a497405fe0ad6da7d674\"",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "",
|
||||
"X-GitHub-Media-Type": "github.luke-cage-preview; format=json",
|
||||
"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": "C49E:6D70:39AC3:44807:5DD35B15"
|
||||
"X-GitHub-Request-Id": "D206:1C0D:B36E9D:1A83850:5F11E4ED"
|
||||
}
|
||||
},
|
||||
"uuid": "b57fab91-f2a6-4d52-b6d4-05e4a8be5df4",
|
||||
"uuid": "816d7fb5-30e5-486c-8948-11c4e46d9dab",
|
||||
"persistent": true,
|
||||
"insertionIndex": 4
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"id": "b1c8333e-1271-46b7-8af0-74517e351f3a",
|
||||
"name": "repos_hub4j-test-org_temp-testenablerequirereviewsonly_branches_master_protection",
|
||||
"request": {
|
||||
"url": "/repos/hub4j-test-org/temp-testEnableRequireReviewsOnly/branches/master/protection",
|
||||
"method": "GET",
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "application/vnd.github.luke-cage-preview+json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status": 200,
|
||||
"bodyFileName": "repos_hub4j-test-org_temp-testenablerequirereviewsonly_branches_master_protection-5.json",
|
||||
"headers": {
|
||||
"Server": "GitHub.com",
|
||||
"Date": "Fri, 17 Jul 2020 17:50:38 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Status": "200 OK",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4980",
|
||||
"X-RateLimit-Reset": "1595011796",
|
||||
"Cache-Control": "private, max-age=60, s-maxage=60",
|
||||
"Vary": [
|
||||
"Accept, Authorization, Cookie, X-GitHub-OTP",
|
||||
"Accept-Encoding, Accept, X-Requested-With"
|
||||
],
|
||||
"ETag": "W/\"f50071de6fc1a497405fe0ad6da7d674\"",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "",
|
||||
"X-GitHub-Media-Type": "github.luke-cage-preview; format=json",
|
||||
"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": "D206:1C0D:B36EC0:1A83892:5F11E4EE"
|
||||
}
|
||||
},
|
||||
"uuid": "b1c8333e-1271-46b7-8af0-74517e351f3a",
|
||||
"persistent": true,
|
||||
"insertionIndex": 5
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"id": "64a67881-ce5e-4dd2-9d28-af9f67a4d9d1",
|
||||
"id": "e512d80f-bfc2-4e1f-89f8-5bd8eb5dbcd0",
|
||||
"name": "user",
|
||||
"request": {
|
||||
"url": "/user",
|
||||
@@ -14,35 +14,33 @@
|
||||
"status": 200,
|
||||
"bodyFileName": "user-1.json",
|
||||
"headers": {
|
||||
"Date": "Tue, 19 Nov 2019 03:01:33 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Date": "Fri, 17 Jul 2020 17:50:31 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Status": "200 OK",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4932",
|
||||
"X-RateLimit-Reset": "1574135997",
|
||||
"X-RateLimit-Remaining": "4988",
|
||||
"X-RateLimit-Reset": "1595011796",
|
||||
"Cache-Control": "private, max-age=60, s-maxage=60",
|
||||
"Vary": [
|
||||
"Accept, Authorization, Cookie, X-GitHub-OTP",
|
||||
"Accept-Encoding"
|
||||
"Accept-Encoding, Accept, X-Requested-With"
|
||||
],
|
||||
"ETag": "W/\"a7d3d02f0490e723eacdd27e24979424\"",
|
||||
"Last-Modified": "Tue, 24 Sep 2019 19:32:29 GMT",
|
||||
"ETag": "W/\"8f8e8bafdb06fae53e3e819ac07d01f9\"",
|
||||
"Last-Modified": "Wed, 15 Jul 2020 22:26:44 GMT",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "",
|
||||
"X-GitHub-Media-Type": "unknown, github.v3",
|
||||
"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": "C49E:6D70:398BA:44594:5DD35B0D"
|
||||
"X-GitHub-Request-Id": "D206:1C0D:B36CFC:1A833CE:5F11E4E7"
|
||||
}
|
||||
},
|
||||
"uuid": "64a67881-ce5e-4dd2-9d28-af9f67a4d9d1",
|
||||
"uuid": "e512d80f-bfc2-4e1f-89f8-5bd8eb5dbcd0",
|
||||
"persistent": true,
|
||||
"insertionIndex": 1
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
"method": "GET",
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
|
||||
"equalTo": "application/vnd.github.luke-cage-preview+json"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -42,4 +42,4 @@
|
||||
"uuid": "d15b0d15-1264-481d-9ec5-0e156de6f80a",
|
||||
"persistent": true,
|
||||
"insertionIndex": 6
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
{
|
||||
"id": 283313593,
|
||||
"node_id": "MDEwOlJlcG9zaXRvcnkyODMzMTM1OTM=",
|
||||
"name": "temp-testMergeBranch",
|
||||
"full_name": "hub4j-test-org/temp-testMergeBranch",
|
||||
"private": false,
|
||||
"owner": {
|
||||
"login": "hub4j-test-org",
|
||||
"id": 7544739,
|
||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/hub4j-test-org",
|
||||
"html_url": "https://github.com/hub4j-test-org",
|
||||
"followers_url": "https://api.github.com/users/hub4j-test-org/followers",
|
||||
"following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/hub4j-test-org/orgs",
|
||||
"repos_url": "https://api.github.com/users/hub4j-test-org/repos",
|
||||
"events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/hub4j-test-org/received_events",
|
||||
"type": "Organization",
|
||||
"site_admin": false
|
||||
},
|
||||
"html_url": "https://github.com/hub4j-test-org/temp-testMergeBranch",
|
||||
"description": "A test repository for testing the github-api project: temp-testMergeBranch",
|
||||
"fork": false,
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch",
|
||||
"forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/forks",
|
||||
"keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/keys{/key_id}",
|
||||
"collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/collaborators{/collaborator}",
|
||||
"teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/teams",
|
||||
"hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/hooks",
|
||||
"issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/issues/events{/number}",
|
||||
"events_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/events",
|
||||
"assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/assignees{/user}",
|
||||
"branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/branches{/branch}",
|
||||
"tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/tags",
|
||||
"blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/blobs{/sha}",
|
||||
"git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/tags{/sha}",
|
||||
"git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/refs{/sha}",
|
||||
"trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/trees{/sha}",
|
||||
"statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/statuses/{sha}",
|
||||
"languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/languages",
|
||||
"stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/stargazers",
|
||||
"contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/contributors",
|
||||
"subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/subscribers",
|
||||
"subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/subscription",
|
||||
"commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/commits{/sha}",
|
||||
"git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/commits{/sha}",
|
||||
"comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/comments{/number}",
|
||||
"issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/issues/comments{/number}",
|
||||
"contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/contents/{+path}",
|
||||
"compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/compare/{base}...{head}",
|
||||
"merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/merges",
|
||||
"archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/{archive_format}{/ref}",
|
||||
"downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/downloads",
|
||||
"issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/issues{/number}",
|
||||
"pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/pulls{/number}",
|
||||
"milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/milestones{/number}",
|
||||
"notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/notifications{?since,all,participating}",
|
||||
"labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/labels{/name}",
|
||||
"releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/releases{/id}",
|
||||
"deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/deployments",
|
||||
"created_at": "2020-07-28T19:54:49Z",
|
||||
"updated_at": "2020-07-28T19:54:53Z",
|
||||
"pushed_at": "2020-07-28T19:54:51Z",
|
||||
"git_url": "git://github.com/hub4j-test-org/temp-testMergeBranch.git",
|
||||
"ssh_url": "git@github.com:hub4j-test-org/temp-testMergeBranch.git",
|
||||
"clone_url": "https://github.com/hub4j-test-org/temp-testMergeBranch.git",
|
||||
"svn_url": "https://github.com/hub4j-test-org/temp-testMergeBranch",
|
||||
"homepage": "http://github-api.kohsuke.org/",
|
||||
"size": 0,
|
||||
"stargazers_count": 0,
|
||||
"watchers_count": 0,
|
||||
"language": null,
|
||||
"has_issues": true,
|
||||
"has_projects": true,
|
||||
"has_downloads": true,
|
||||
"has_wiki": true,
|
||||
"has_pages": false,
|
||||
"forks_count": 0,
|
||||
"mirror_url": null,
|
||||
"archived": false,
|
||||
"disabled": false,
|
||||
"open_issues_count": 0,
|
||||
"license": null,
|
||||
"forks": 0,
|
||||
"open_issues": 0,
|
||||
"watchers": 0,
|
||||
"default_branch": "master",
|
||||
"permissions": {
|
||||
"admin": true,
|
||||
"push": true,
|
||||
"pull": true
|
||||
},
|
||||
"temp_clone_token": "",
|
||||
"allow_squash_merge": true,
|
||||
"allow_merge_commit": true,
|
||||
"allow_rebase_merge": true,
|
||||
"delete_branch_on_merge": false,
|
||||
"organization": {
|
||||
"login": "hub4j-test-org",
|
||||
"id": 7544739,
|
||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/hub4j-test-org",
|
||||
"html_url": "https://github.com/hub4j-test-org",
|
||||
"followers_url": "https://api.github.com/users/hub4j-test-org/followers",
|
||||
"following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/hub4j-test-org/orgs",
|
||||
"repos_url": "https://api.github.com/users/hub4j-test-org/repos",
|
||||
"events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/hub4j-test-org/received_events",
|
||||
"type": "Organization",
|
||||
"site_admin": false
|
||||
},
|
||||
"network_count": 0,
|
||||
"subscribers_count": 8
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
{
|
||||
"name": "master",
|
||||
"commit": {
|
||||
"sha": "688a1c3f8bc67deb767f68560ed8c7350d70d50f",
|
||||
"node_id": "MDY6Q29tbWl0MjgzMzEzNTkzOjY4OGExYzNmOGJjNjdkZWI3NjdmNjg1NjBlZDhjNzM1MGQ3MGQ1MGY=",
|
||||
"commit": {
|
||||
"author": {
|
||||
"name": "Liam Newman",
|
||||
"email": "bitwiseman@gmail.com",
|
||||
"date": "2020-07-28T19:54:50Z"
|
||||
},
|
||||
"committer": {
|
||||
"name": "GitHub",
|
||||
"email": "noreply@github.com",
|
||||
"date": "2020-07-28T19:54:50Z"
|
||||
},
|
||||
"message": "Initial commit",
|
||||
"tree": {
|
||||
"sha": "c6da5eb430eb876e5a03323a62ea01365a753d3b",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/trees/c6da5eb430eb876e5a03323a62ea01365a753d3b"
|
||||
},
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/commits/688a1c3f8bc67deb767f68560ed8c7350d70d50f",
|
||||
"comment_count": 0,
|
||||
"verification": {
|
||||
"verified": true,
|
||||
"reason": "valid",
|
||||
"signature": "-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJfIIKKCRBK7hj4Ov3rIwAAdHIIAH1NiSMFO1907U4QdfRgdqCP\nQHgc6KsflfLPxeP/Tt02Q+BJQeN8e1/IMXziwOp5dt5+CSuGFLN9U41fsBOxIRk6\nagqX5q4KleZaUEjOik2PfmXkwO+mQU64CX2QdpfHuqZNvCl6H1G4dnEAWdM1E3oA\nvLMIOHdjy6Fc1VJzmcc8+RVzUvKv/9Fq0uU6WR9Jl6TfMnfGqtVwQ1USuerhnIs0\nPSI9Yo12Wy8b+8psD3bwBcjbX8r6ItM//DjzU3XcKRZxv54u7tgQuLELqxh9dQSu\nCDSV9/LyHpMC3WMRAupusGsb4rMKeN+C7NYC4ZMmoRmwvWAhRKjTtCHBP8Ksapo=\n=OLMl\n-----END PGP SIGNATURE-----\n",
|
||||
"payload": "tree c6da5eb430eb876e5a03323a62ea01365a753d3b\nauthor Liam Newman <bitwiseman@gmail.com> 1595966090 -0700\ncommitter GitHub <noreply@github.com> 1595966090 -0700\n\nInitial commit"
|
||||
}
|
||||
},
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/commits/688a1c3f8bc67deb767f68560ed8c7350d70d50f",
|
||||
"html_url": "https://github.com/hub4j-test-org/temp-testMergeBranch/commit/688a1c3f8bc67deb767f68560ed8c7350d70d50f",
|
||||
"comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/commits/688a1c3f8bc67deb767f68560ed8c7350d70d50f/comments",
|
||||
"author": {
|
||||
"login": "bitwiseman",
|
||||
"id": 1958953,
|
||||
"node_id": "MDQ6VXNlcjE5NTg5NTM=",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/bitwiseman",
|
||||
"html_url": "https://github.com/bitwiseman",
|
||||
"followers_url": "https://api.github.com/users/bitwiseman/followers",
|
||||
"following_url": "https://api.github.com/users/bitwiseman/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/bitwiseman/orgs",
|
||||
"repos_url": "https://api.github.com/users/bitwiseman/repos",
|
||||
"events_url": "https://api.github.com/users/bitwiseman/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/bitwiseman/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"committer": {
|
||||
"login": "web-flow",
|
||||
"id": 19864447,
|
||||
"node_id": "MDQ6VXNlcjE5ODY0NDQ3",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/19864447?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/web-flow",
|
||||
"html_url": "https://github.com/web-flow",
|
||||
"followers_url": "https://api.github.com/users/web-flow/followers",
|
||||
"following_url": "https://api.github.com/users/web-flow/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/web-flow/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/web-flow/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/web-flow/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/web-flow/orgs",
|
||||
"repos_url": "https://api.github.com/users/web-flow/repos",
|
||||
"events_url": "https://api.github.com/users/web-flow/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/web-flow/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"parents": []
|
||||
},
|
||||
"_links": {
|
||||
"self": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/branches/master",
|
||||
"html": "https://github.com/hub4j-test-org/temp-testMergeBranch/tree/master"
|
||||
},
|
||||
"protected": false,
|
||||
"protection": {
|
||||
"enabled": false,
|
||||
"required_status_checks": {
|
||||
"enforcement_level": "off",
|
||||
"contexts": []
|
||||
}
|
||||
},
|
||||
"protection_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/branches/master/protection"
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
{
|
||||
"name": "testBranch1",
|
||||
"commit": {
|
||||
"sha": "beac07bbfdeb8a5d261739cd65c4caaaca48ac79",
|
||||
"node_id": "MDY6Q29tbWl0MjgzMzEzNTkzOmJlYWMwN2JiZmRlYjhhNWQyNjE3MzljZDY1YzRjYWFhY2E0OGFjNzk=",
|
||||
"commit": {
|
||||
"author": {
|
||||
"name": "Liam Newman",
|
||||
"email": "bitwiseman@gmail.com",
|
||||
"date": "2020-07-28T19:54:55Z"
|
||||
},
|
||||
"committer": {
|
||||
"name": "Liam Newman",
|
||||
"email": "bitwiseman@gmail.com",
|
||||
"date": "2020-07-28T19:54:55Z"
|
||||
},
|
||||
"message": "testBranch1",
|
||||
"tree": {
|
||||
"sha": "540c4a3c093ad09a869163c60d44218774ff5474",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/trees/540c4a3c093ad09a869163c60d44218774ff5474"
|
||||
},
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/commits/beac07bbfdeb8a5d261739cd65c4caaaca48ac79",
|
||||
"comment_count": 0,
|
||||
"verification": {
|
||||
"verified": false,
|
||||
"reason": "unsigned",
|
||||
"signature": null,
|
||||
"payload": null
|
||||
}
|
||||
},
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/commits/beac07bbfdeb8a5d261739cd65c4caaaca48ac79",
|
||||
"html_url": "https://github.com/hub4j-test-org/temp-testMergeBranch/commit/beac07bbfdeb8a5d261739cd65c4caaaca48ac79",
|
||||
"comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/commits/beac07bbfdeb8a5d261739cd65c4caaaca48ac79/comments",
|
||||
"author": {
|
||||
"login": "bitwiseman",
|
||||
"id": 1958953,
|
||||
"node_id": "MDQ6VXNlcjE5NTg5NTM=",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/bitwiseman",
|
||||
"html_url": "https://github.com/bitwiseman",
|
||||
"followers_url": "https://api.github.com/users/bitwiseman/followers",
|
||||
"following_url": "https://api.github.com/users/bitwiseman/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/bitwiseman/orgs",
|
||||
"repos_url": "https://api.github.com/users/bitwiseman/repos",
|
||||
"events_url": "https://api.github.com/users/bitwiseman/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/bitwiseman/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"committer": {
|
||||
"login": "bitwiseman",
|
||||
"id": 1958953,
|
||||
"node_id": "MDQ6VXNlcjE5NTg5NTM=",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/bitwiseman",
|
||||
"html_url": "https://github.com/bitwiseman",
|
||||
"followers_url": "https://api.github.com/users/bitwiseman/followers",
|
||||
"following_url": "https://api.github.com/users/bitwiseman/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/bitwiseman/orgs",
|
||||
"repos_url": "https://api.github.com/users/bitwiseman/repos",
|
||||
"events_url": "https://api.github.com/users/bitwiseman/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/bitwiseman/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"parents": [
|
||||
{
|
||||
"sha": "688a1c3f8bc67deb767f68560ed8c7350d70d50f",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/commits/688a1c3f8bc67deb767f68560ed8c7350d70d50f",
|
||||
"html_url": "https://github.com/hub4j-test-org/temp-testMergeBranch/commit/688a1c3f8bc67deb767f68560ed8c7350d70d50f"
|
||||
}
|
||||
]
|
||||
},
|
||||
"_links": {
|
||||
"self": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/branches/testBranch1",
|
||||
"html": "https://github.com/hub4j-test-org/temp-testMergeBranch/tree/testBranch1"
|
||||
},
|
||||
"protected": false,
|
||||
"protection": {
|
||||
"enabled": false,
|
||||
"required_status_checks": {
|
||||
"enforcement_level": "off",
|
||||
"contexts": []
|
||||
}
|
||||
},
|
||||
"protection_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/branches/testBranch1/protection"
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
{
|
||||
"name": "testBranch2",
|
||||
"commit": {
|
||||
"sha": "506cfc5bb47ac087b26c6d95d0ad305c5917c4b2",
|
||||
"node_id": "MDY6Q29tbWl0MjgzMzEzNTkzOjUwNmNmYzViYjQ3YWMwODdiMjZjNmQ5NWQwYWQzMDVjNTkxN2M0YjI=",
|
||||
"commit": {
|
||||
"author": {
|
||||
"name": "Liam Newman",
|
||||
"email": "bitwiseman@gmail.com",
|
||||
"date": "2020-07-28T19:54:57Z"
|
||||
},
|
||||
"committer": {
|
||||
"name": "Liam Newman",
|
||||
"email": "bitwiseman@gmail.com",
|
||||
"date": "2020-07-28T19:54:57Z"
|
||||
},
|
||||
"message": "testBranch2",
|
||||
"tree": {
|
||||
"sha": "a183aaff617bc52ba1bdcea74faf24687194faf1",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/trees/a183aaff617bc52ba1bdcea74faf24687194faf1"
|
||||
},
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/commits/506cfc5bb47ac087b26c6d95d0ad305c5917c4b2",
|
||||
"comment_count": 0,
|
||||
"verification": {
|
||||
"verified": false,
|
||||
"reason": "unsigned",
|
||||
"signature": null,
|
||||
"payload": null
|
||||
}
|
||||
},
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/commits/506cfc5bb47ac087b26c6d95d0ad305c5917c4b2",
|
||||
"html_url": "https://github.com/hub4j-test-org/temp-testMergeBranch/commit/506cfc5bb47ac087b26c6d95d0ad305c5917c4b2",
|
||||
"comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/commits/506cfc5bb47ac087b26c6d95d0ad305c5917c4b2/comments",
|
||||
"author": {
|
||||
"login": "bitwiseman",
|
||||
"id": 1958953,
|
||||
"node_id": "MDQ6VXNlcjE5NTg5NTM=",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/bitwiseman",
|
||||
"html_url": "https://github.com/bitwiseman",
|
||||
"followers_url": "https://api.github.com/users/bitwiseman/followers",
|
||||
"following_url": "https://api.github.com/users/bitwiseman/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/bitwiseman/orgs",
|
||||
"repos_url": "https://api.github.com/users/bitwiseman/repos",
|
||||
"events_url": "https://api.github.com/users/bitwiseman/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/bitwiseman/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"committer": {
|
||||
"login": "bitwiseman",
|
||||
"id": 1958953,
|
||||
"node_id": "MDQ6VXNlcjE5NTg5NTM=",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/bitwiseman",
|
||||
"html_url": "https://github.com/bitwiseman",
|
||||
"followers_url": "https://api.github.com/users/bitwiseman/followers",
|
||||
"following_url": "https://api.github.com/users/bitwiseman/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/bitwiseman/orgs",
|
||||
"repos_url": "https://api.github.com/users/bitwiseman/repos",
|
||||
"events_url": "https://api.github.com/users/bitwiseman/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/bitwiseman/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"parents": [
|
||||
{
|
||||
"sha": "688a1c3f8bc67deb767f68560ed8c7350d70d50f",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/commits/688a1c3f8bc67deb767f68560ed8c7350d70d50f",
|
||||
"html_url": "https://github.com/hub4j-test-org/temp-testMergeBranch/commit/688a1c3f8bc67deb767f68560ed8c7350d70d50f"
|
||||
}
|
||||
]
|
||||
},
|
||||
"_links": {
|
||||
"self": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/branches/testBranch2",
|
||||
"html": "https://github.com/hub4j-test-org/temp-testMergeBranch/tree/testBranch2"
|
||||
},
|
||||
"protected": false,
|
||||
"protection": {
|
||||
"enabled": false,
|
||||
"required_status_checks": {
|
||||
"enforcement_level": "off",
|
||||
"contexts": []
|
||||
}
|
||||
},
|
||||
"protection_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/branches/testBranch2/protection"
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"content": {
|
||||
"name": "testBranch1",
|
||||
"path": "testBranch1",
|
||||
"sha": "2207929ecd1b9edb692e9538707dda960e1b0c8c",
|
||||
"size": 11,
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/contents/testBranch1?ref=testBranch1",
|
||||
"html_url": "https://github.com/hub4j-test-org/temp-testMergeBranch/blob/testBranch1/testBranch1",
|
||||
"git_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/blobs/2207929ecd1b9edb692e9538707dda960e1b0c8c",
|
||||
"download_url": "https://raw.githubusercontent.com/hub4j-test-org/temp-testMergeBranch/testBranch1/testBranch1",
|
||||
"type": "file",
|
||||
"_links": {
|
||||
"self": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/contents/testBranch1?ref=testBranch1",
|
||||
"git": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/blobs/2207929ecd1b9edb692e9538707dda960e1b0c8c",
|
||||
"html": "https://github.com/hub4j-test-org/temp-testMergeBranch/blob/testBranch1/testBranch1"
|
||||
}
|
||||
},
|
||||
"commit": {
|
||||
"sha": "beac07bbfdeb8a5d261739cd65c4caaaca48ac79",
|
||||
"node_id": "MDY6Q29tbWl0MjgzMzEzNTkzOmJlYWMwN2JiZmRlYjhhNWQyNjE3MzljZDY1YzRjYWFhY2E0OGFjNzk=",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/commits/beac07bbfdeb8a5d261739cd65c4caaaca48ac79",
|
||||
"html_url": "https://github.com/hub4j-test-org/temp-testMergeBranch/commit/beac07bbfdeb8a5d261739cd65c4caaaca48ac79",
|
||||
"author": {
|
||||
"name": "Liam Newman",
|
||||
"email": "bitwiseman@gmail.com",
|
||||
"date": "2020-07-28T19:54:55Z"
|
||||
},
|
||||
"committer": {
|
||||
"name": "Liam Newman",
|
||||
"email": "bitwiseman@gmail.com",
|
||||
"date": "2020-07-28T19:54:55Z"
|
||||
},
|
||||
"tree": {
|
||||
"sha": "540c4a3c093ad09a869163c60d44218774ff5474",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/trees/540c4a3c093ad09a869163c60d44218774ff5474"
|
||||
},
|
||||
"message": "testBranch1",
|
||||
"parents": [
|
||||
{
|
||||
"sha": "688a1c3f8bc67deb767f68560ed8c7350d70d50f",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/commits/688a1c3f8bc67deb767f68560ed8c7350d70d50f",
|
||||
"html_url": "https://github.com/hub4j-test-org/temp-testMergeBranch/commit/688a1c3f8bc67deb767f68560ed8c7350d70d50f"
|
||||
}
|
||||
],
|
||||
"verification": {
|
||||
"verified": false,
|
||||
"reason": "unsigned",
|
||||
"signature": null,
|
||||
"payload": null
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"content": {
|
||||
"name": "testBranch2",
|
||||
"path": "testBranch2",
|
||||
"sha": "2a521d98876f51a95f38aaba58c9e81672f7dd4d",
|
||||
"size": 11,
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/contents/testBranch2?ref=testBranch2",
|
||||
"html_url": "https://github.com/hub4j-test-org/temp-testMergeBranch/blob/testBranch2/testBranch2",
|
||||
"git_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/blobs/2a521d98876f51a95f38aaba58c9e81672f7dd4d",
|
||||
"download_url": "https://raw.githubusercontent.com/hub4j-test-org/temp-testMergeBranch/testBranch2/testBranch2",
|
||||
"type": "file",
|
||||
"_links": {
|
||||
"self": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/contents/testBranch2?ref=testBranch2",
|
||||
"git": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/blobs/2a521d98876f51a95f38aaba58c9e81672f7dd4d",
|
||||
"html": "https://github.com/hub4j-test-org/temp-testMergeBranch/blob/testBranch2/testBranch2"
|
||||
}
|
||||
},
|
||||
"commit": {
|
||||
"sha": "506cfc5bb47ac087b26c6d95d0ad305c5917c4b2",
|
||||
"node_id": "MDY6Q29tbWl0MjgzMzEzNTkzOjUwNmNmYzViYjQ3YWMwODdiMjZjNmQ5NWQwYWQzMDVjNTkxN2M0YjI=",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/commits/506cfc5bb47ac087b26c6d95d0ad305c5917c4b2",
|
||||
"html_url": "https://github.com/hub4j-test-org/temp-testMergeBranch/commit/506cfc5bb47ac087b26c6d95d0ad305c5917c4b2",
|
||||
"author": {
|
||||
"name": "Liam Newman",
|
||||
"email": "bitwiseman@gmail.com",
|
||||
"date": "2020-07-28T19:54:57Z"
|
||||
},
|
||||
"committer": {
|
||||
"name": "Liam Newman",
|
||||
"email": "bitwiseman@gmail.com",
|
||||
"date": "2020-07-28T19:54:57Z"
|
||||
},
|
||||
"tree": {
|
||||
"sha": "a183aaff617bc52ba1bdcea74faf24687194faf1",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/trees/a183aaff617bc52ba1bdcea74faf24687194faf1"
|
||||
},
|
||||
"message": "testBranch2",
|
||||
"parents": [
|
||||
{
|
||||
"sha": "688a1c3f8bc67deb767f68560ed8c7350d70d50f",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/commits/688a1c3f8bc67deb767f68560ed8c7350d70d50f",
|
||||
"html_url": "https://github.com/hub4j-test-org/temp-testMergeBranch/commit/688a1c3f8bc67deb767f68560ed8c7350d70d50f"
|
||||
}
|
||||
],
|
||||
"verification": {
|
||||
"verified": false,
|
||||
"reason": "unsigned",
|
||||
"signature": null,
|
||||
"payload": null
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"ref": "refs/heads/testBranch1",
|
||||
"node_id": "MDM6UmVmMjgzMzEzNTkzOnJlZnMvaGVhZHMvdGVzdEJyYW5jaDE=",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/refs/heads/testBranch1",
|
||||
"object": {
|
||||
"sha": "688a1c3f8bc67deb767f68560ed8c7350d70d50f",
|
||||
"type": "commit",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/commits/688a1c3f8bc67deb767f68560ed8c7350d70d50f"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"ref": "refs/heads/testBranch2",
|
||||
"node_id": "MDM6UmVmMjgzMzEzNTkzOnJlZnMvaGVhZHMvdGVzdEJyYW5jaDI=",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/refs/heads/testBranch2",
|
||||
"object": {
|
||||
"sha": "688a1c3f8bc67deb767f68560ed8c7350d70d50f",
|
||||
"type": "commit",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/commits/688a1c3f8bc67deb767f68560ed8c7350d70d50f"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"ref": "refs/heads/master",
|
||||
"node_id": "MDM6UmVmMjgzMzEzNTkzOnJlZnMvaGVhZHMvbWFzdGVy",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/refs/heads/master",
|
||||
"object": {
|
||||
"sha": "688a1c3f8bc67deb767f68560ed8c7350d70d50f",
|
||||
"type": "commit",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/commits/688a1c3f8bc67deb767f68560ed8c7350d70d50f"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
{
|
||||
"sha": "4cfa1cac01c59db507f550c8c870dac98859b353",
|
||||
"node_id": "MDY6Q29tbWl0MjgzMzEzNTkzOjRjZmExY2FjMDFjNTlkYjUwN2Y1NTBjOGM4NzBkYWM5ODg1OWIzNTM=",
|
||||
"commit": {
|
||||
"author": {
|
||||
"name": "Liam Newman",
|
||||
"email": "bitwiseman@gmail.com",
|
||||
"date": "2020-07-28T19:54:59Z"
|
||||
},
|
||||
"committer": {
|
||||
"name": "GitHub",
|
||||
"email": "noreply@github.com",
|
||||
"date": "2020-07-28T19:54:59Z"
|
||||
},
|
||||
"message": "merging testBranch2",
|
||||
"tree": {
|
||||
"sha": "a5ae8da88efbf6ff508c9575601f9a437a980626",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/trees/a5ae8da88efbf6ff508c9575601f9a437a980626"
|
||||
},
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/commits/4cfa1cac01c59db507f550c8c870dac98859b353",
|
||||
"comment_count": 0,
|
||||
"verification": {
|
||||
"verified": true,
|
||||
"reason": "valid",
|
||||
"signature": "-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJfIIKTCRBK7hj4Ov3rIwAAdHIIAKw4VKMUQj3CyA3VEOw08LCH\ng92h7Jy7ztaufDOGaRRlss77+Hdc0HyAhjnSI/ovj7uFKA0XOd+UZ8TVZzXQ0Nxo\ndBGAiR21l4YxRjb0wcvxCakjqjgYF0Pe5Jy4cptRIWlGp3HGgobF7Xq/80LaeFZ4\nnWS/DljtpQhuBgzD+boejookUrq5paZXr1q76cg7Orv6MbLALLs61QHkuihZQDA2\nZ5MeIVelxxXCVlw2+pceAKFtO8g7/lES7tBNtVhIwkdiGk3/V+Y8YR+U3nQC6vt9\nVVvCYAmCEnAQXWNJX+Dl4Zrx7n81FUPA0Y+0wMU86aY97flnopEt56Dge66wCDg=\n=S8yx\n-----END PGP SIGNATURE-----\n",
|
||||
"payload": "tree a5ae8da88efbf6ff508c9575601f9a437a980626\nparent beac07bbfdeb8a5d261739cd65c4caaaca48ac79\nparent 506cfc5bb47ac087b26c6d95d0ad305c5917c4b2\nauthor Liam Newman <bitwiseman@gmail.com> 1595966099 -0700\ncommitter GitHub <noreply@github.com> 1595966099 -0700\n\nmerging testBranch2\n"
|
||||
}
|
||||
},
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/commits/4cfa1cac01c59db507f550c8c870dac98859b353",
|
||||
"html_url": "https://github.com/hub4j-test-org/temp-testMergeBranch/commit/4cfa1cac01c59db507f550c8c870dac98859b353",
|
||||
"comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/commits/4cfa1cac01c59db507f550c8c870dac98859b353/comments",
|
||||
"author": {
|
||||
"login": "bitwiseman",
|
||||
"id": 1958953,
|
||||
"node_id": "MDQ6VXNlcjE5NTg5NTM=",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/bitwiseman",
|
||||
"html_url": "https://github.com/bitwiseman",
|
||||
"followers_url": "https://api.github.com/users/bitwiseman/followers",
|
||||
"following_url": "https://api.github.com/users/bitwiseman/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/bitwiseman/orgs",
|
||||
"repos_url": "https://api.github.com/users/bitwiseman/repos",
|
||||
"events_url": "https://api.github.com/users/bitwiseman/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/bitwiseman/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"committer": {
|
||||
"login": "web-flow",
|
||||
"id": 19864447,
|
||||
"node_id": "MDQ6VXNlcjE5ODY0NDQ3",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/19864447?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/web-flow",
|
||||
"html_url": "https://github.com/web-flow",
|
||||
"followers_url": "https://api.github.com/users/web-flow/followers",
|
||||
"following_url": "https://api.github.com/users/web-flow/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/web-flow/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/web-flow/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/web-flow/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/web-flow/orgs",
|
||||
"repos_url": "https://api.github.com/users/web-flow/repos",
|
||||
"events_url": "https://api.github.com/users/web-flow/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/web-flow/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"parents": [
|
||||
{
|
||||
"sha": "beac07bbfdeb8a5d261739cd65c4caaaca48ac79",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/commits/beac07bbfdeb8a5d261739cd65c4caaaca48ac79",
|
||||
"html_url": "https://github.com/hub4j-test-org/temp-testMergeBranch/commit/beac07bbfdeb8a5d261739cd65c4caaaca48ac79"
|
||||
},
|
||||
{
|
||||
"sha": "506cfc5bb47ac087b26c6d95d0ad305c5917c4b2",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/commits/506cfc5bb47ac087b26c6d95d0ad305c5917c4b2",
|
||||
"html_url": "https://github.com/hub4j-test-org/temp-testMergeBranch/commit/506cfc5bb47ac087b26c6d95d0ad305c5917c4b2"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
{
|
||||
"sha": "223608e290ccc2f8902385528a24b1f7aec92acf",
|
||||
"node_id": "MDY6Q29tbWl0MjgzMzEzNTkzOjIyMzYwOGUyOTBjY2MyZjg5MDIzODU1MjhhMjRiMWY3YWVjOTJhY2Y=",
|
||||
"commit": {
|
||||
"author": {
|
||||
"name": "Liam Newman",
|
||||
"email": "bitwiseman@gmail.com",
|
||||
"date": "2020-07-28T19:55:00Z"
|
||||
},
|
||||
"committer": {
|
||||
"name": "GitHub",
|
||||
"email": "noreply@github.com",
|
||||
"date": "2020-07-28T19:55:00Z"
|
||||
},
|
||||
"message": "merging from 4cfa1cac01c59db507f550c8c870dac98859b353",
|
||||
"tree": {
|
||||
"sha": "a5ae8da88efbf6ff508c9575601f9a437a980626",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/trees/a5ae8da88efbf6ff508c9575601f9a437a980626"
|
||||
},
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/commits/223608e290ccc2f8902385528a24b1f7aec92acf",
|
||||
"comment_count": 0,
|
||||
"verification": {
|
||||
"verified": true,
|
||||
"reason": "valid",
|
||||
"signature": "-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJfIIKUCRBK7hj4Ov3rIwAAdHIIAIdVJ69VtTQx9t3iZvp+k5J6\ncmI9Y/oIT/pqbsm/GuAMnmMgV1os9xhEa0QlwUu+MYDARw0ZuCKyeg3be/r5iigv\nXMhvU30hSsath7x/HNoeLROizuRcHCtkWRYmltXaNBeegCDDISFJAbMAa5XSb0/8\nwyH0FwxbA1kOtRqoebFBaAyrHZGzFTYjJil6ChTvVaDCMJLCXvZs1cFf3nQyWTa+\nV7sHSc1aqGO3N8O8CA4DFEwXDXdH1Fd5zKUlfCHve99hyKXX0n3N6F9nXAfx4bE2\ncZ0vbiLPHgIN+jc2PamSmBCNKYM31X5Nyw6Uatt2m21pMwbZ0goq7r7ZROtgzyg=\n=MS4E\n-----END PGP SIGNATURE-----\n",
|
||||
"payload": "tree a5ae8da88efbf6ff508c9575601f9a437a980626\nparent 688a1c3f8bc67deb767f68560ed8c7350d70d50f\nparent 4cfa1cac01c59db507f550c8c870dac98859b353\nauthor Liam Newman <bitwiseman@gmail.com> 1595966100 -0700\ncommitter GitHub <noreply@github.com> 1595966100 -0700\n\nmerging from 4cfa1cac01c59db507f550c8c870dac98859b353\n"
|
||||
}
|
||||
},
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/commits/223608e290ccc2f8902385528a24b1f7aec92acf",
|
||||
"html_url": "https://github.com/hub4j-test-org/temp-testMergeBranch/commit/223608e290ccc2f8902385528a24b1f7aec92acf",
|
||||
"comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/commits/223608e290ccc2f8902385528a24b1f7aec92acf/comments",
|
||||
"author": {
|
||||
"login": "bitwiseman",
|
||||
"id": 1958953,
|
||||
"node_id": "MDQ6VXNlcjE5NTg5NTM=",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/bitwiseman",
|
||||
"html_url": "https://github.com/bitwiseman",
|
||||
"followers_url": "https://api.github.com/users/bitwiseman/followers",
|
||||
"following_url": "https://api.github.com/users/bitwiseman/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/bitwiseman/orgs",
|
||||
"repos_url": "https://api.github.com/users/bitwiseman/repos",
|
||||
"events_url": "https://api.github.com/users/bitwiseman/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/bitwiseman/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"committer": {
|
||||
"login": "web-flow",
|
||||
"id": 19864447,
|
||||
"node_id": "MDQ6VXNlcjE5ODY0NDQ3",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/19864447?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/web-flow",
|
||||
"html_url": "https://github.com/web-flow",
|
||||
"followers_url": "https://api.github.com/users/web-flow/followers",
|
||||
"following_url": "https://api.github.com/users/web-flow/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/web-flow/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/web-flow/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/web-flow/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/web-flow/orgs",
|
||||
"repos_url": "https://api.github.com/users/web-flow/repos",
|
||||
"events_url": "https://api.github.com/users/web-flow/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/web-flow/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"parents": [
|
||||
{
|
||||
"sha": "688a1c3f8bc67deb767f68560ed8c7350d70d50f",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/commits/688a1c3f8bc67deb767f68560ed8c7350d70d50f",
|
||||
"html_url": "https://github.com/hub4j-test-org/temp-testMergeBranch/commit/688a1c3f8bc67deb767f68560ed8c7350d70d50f"
|
||||
},
|
||||
{
|
||||
"sha": "4cfa1cac01c59db507f550c8c870dac98859b353",
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/commits/4cfa1cac01c59db507f550c8c870dac98859b353",
|
||||
"html_url": "https://github.com/hub4j-test-org/temp-testMergeBranch/commit/4cfa1cac01c59db507f550c8c870dac98859b353"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"login": "bitwiseman",
|
||||
"id": 1958953,
|
||||
"node_id": "MDQ6VXNlcjE5NTg5NTM=",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/bitwiseman",
|
||||
"html_url": "https://github.com/bitwiseman",
|
||||
"followers_url": "https://api.github.com/users/bitwiseman/followers",
|
||||
"following_url": "https://api.github.com/users/bitwiseman/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/bitwiseman/orgs",
|
||||
"repos_url": "https://api.github.com/users/bitwiseman/repos",
|
||||
"events_url": "https://api.github.com/users/bitwiseman/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/bitwiseman/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false,
|
||||
"name": "Liam Newman",
|
||||
"company": "Cloudbees, Inc.",
|
||||
"blog": "",
|
||||
"location": "Seattle, WA, USA",
|
||||
"email": "bitwiseman@gmail.com",
|
||||
"hireable": null,
|
||||
"bio": null,
|
||||
"twitter_username": "bitwiseman",
|
||||
"public_repos": 197,
|
||||
"public_gists": 7,
|
||||
"followers": 164,
|
||||
"following": 9,
|
||||
"created_at": "2012-07-11T20:38:33Z",
|
||||
"updated_at": "2020-07-27T20:21:05Z",
|
||||
"private_gists": 19,
|
||||
"total_private_repos": 13,
|
||||
"owned_private_repos": 0,
|
||||
"disk_usage": 33700,
|
||||
"collaborators": 0,
|
||||
"two_factor_authentication": true,
|
||||
"plan": {
|
||||
"name": "free",
|
||||
"space": 976562499,
|
||||
"collaborators": 0,
|
||||
"private_repos": 10000
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"id": "a05c0e96-b289-4199-a555-c2bfd303a19b",
|
||||
"name": "repos_hub4j-test-org_temp-testmergebranch",
|
||||
"request": {
|
||||
"url": "/repos/hub4j-test-org/temp-testMergeBranch",
|
||||
"method": "GET",
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status": 200,
|
||||
"bodyFileName": "repos_hub4j-test-org_temp-testmergebranch-2.json",
|
||||
"headers": {
|
||||
"Date": "Tue, 28 Jul 2020 19:54:54 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Status": "200 OK",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4994",
|
||||
"X-RateLimit-Reset": "1595969687",
|
||||
"Cache-Control": "private, max-age=60, s-maxage=60",
|
||||
"Vary": [
|
||||
"Accept, Authorization, Cookie, X-GitHub-OTP",
|
||||
"Accept-Encoding, Accept, X-Requested-With",
|
||||
"Accept-Encoding"
|
||||
],
|
||||
"ETag": "W/\"50d2a9acff5c7f08e2753ccafeeb04a6\"",
|
||||
"Last-Modified": "Tue, 28 Jul 2020 19:54:53 GMT",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "repo",
|
||||
"X-GitHub-Media-Type": "unknown, github.v3",
|
||||
"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": "EE13:3784:A649D:D1586:5F208288"
|
||||
}
|
||||
},
|
||||
"uuid": "a05c0e96-b289-4199-a555-c2bfd303a19b",
|
||||
"persistent": true,
|
||||
"insertionIndex": 2
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"id": "149b51b4-e911-42b7-b181-488bb6a2bf95",
|
||||
"name": "repos_hub4j-test-org_temp-testmergebranch_branches_master",
|
||||
"request": {
|
||||
"url": "/repos/hub4j-test-org/temp-testMergeBranch/branches/master",
|
||||
"method": "GET",
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status": 200,
|
||||
"bodyFileName": "repos_hub4j-test-org_temp-testmergebranch_branches_master-11.json",
|
||||
"headers": {
|
||||
"Date": "Tue, 28 Jul 2020 19:55:00 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Status": "200 OK",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4985",
|
||||
"X-RateLimit-Reset": "1595969688",
|
||||
"Cache-Control": "private, max-age=60, s-maxage=60",
|
||||
"Vary": [
|
||||
"Accept, Authorization, Cookie, X-GitHub-OTP",
|
||||
"Accept-Encoding, Accept, X-Requested-With",
|
||||
"Accept-Encoding"
|
||||
],
|
||||
"ETag": "W/\"c2772edda686a81b33fab1f45051da14\"",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "",
|
||||
"X-GitHub-Media-Type": "unknown, github.v3",
|
||||
"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": "EE13:3784:A6552:D17AC:5F208293"
|
||||
}
|
||||
},
|
||||
"uuid": "149b51b4-e911-42b7-b181-488bb6a2bf95",
|
||||
"persistent": true,
|
||||
"insertionIndex": 11
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"id": "3ae737b6-9240-422d-8e4e-f3c3e6fef444",
|
||||
"name": "repos_hub4j-test-org_temp-testmergebranch_branches_testbranch1",
|
||||
"request": {
|
||||
"url": "/repos/hub4j-test-org/temp-testMergeBranch/branches/testBranch1",
|
||||
"method": "GET",
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status": 200,
|
||||
"bodyFileName": "repos_hub4j-test-org_temp-testmergebranch_branches_testbranch1-9.json",
|
||||
"headers": {
|
||||
"Date": "Tue, 28 Jul 2020 19:54:58 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Status": "200 OK",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4987",
|
||||
"X-RateLimit-Reset": "1595969687",
|
||||
"Cache-Control": "private, max-age=60, s-maxage=60",
|
||||
"Vary": [
|
||||
"Accept, Authorization, Cookie, X-GitHub-OTP",
|
||||
"Accept-Encoding, Accept, X-Requested-With",
|
||||
"Accept-Encoding"
|
||||
],
|
||||
"ETag": "W/\"34ff9c8b8f8d8123155a0db487411a1c\"",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "",
|
||||
"X-GitHub-Media-Type": "unknown, github.v3",
|
||||
"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": "EE13:3784:A6519:D1765:5F208292"
|
||||
}
|
||||
},
|
||||
"uuid": "3ae737b6-9240-422d-8e4e-f3c3e6fef444",
|
||||
"persistent": true,
|
||||
"insertionIndex": 9
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"id": "0d9d8c6a-b1af-4836-ab6e-90649abe9314",
|
||||
"name": "repos_hub4j-test-org_temp-testmergebranch_branches_testbranch2",
|
||||
"request": {
|
||||
"url": "/repos/hub4j-test-org/temp-testMergeBranch/branches/testBranch2",
|
||||
"method": "GET",
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status": 200,
|
||||
"bodyFileName": "repos_hub4j-test-org_temp-testmergebranch_branches_testbranch2-8.json",
|
||||
"headers": {
|
||||
"Date": "Tue, 28 Jul 2020 19:54:58 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Status": "200 OK",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4988",
|
||||
"X-RateLimit-Reset": "1595969688",
|
||||
"Cache-Control": "private, max-age=60, s-maxage=60",
|
||||
"Vary": [
|
||||
"Accept, Authorization, Cookie, X-GitHub-OTP",
|
||||
"Accept-Encoding, Accept, X-Requested-With",
|
||||
"Accept-Encoding"
|
||||
],
|
||||
"ETag": "W/\"a0325b24ee9c35961b6e3bb036ce8150\"",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "",
|
||||
"X-GitHub-Media-Type": "unknown, github.v3",
|
||||
"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": "EE13:3784:A6512:D1752:5F208292"
|
||||
}
|
||||
},
|
||||
"uuid": "0d9d8c6a-b1af-4836-ab6e-90649abe9314",
|
||||
"persistent": true,
|
||||
"insertionIndex": 8
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"id": "d02ffee7-28b2-4cba-96f5-b6c57d48c903",
|
||||
"name": "repos_hub4j-test-org_temp-testmergebranch_contents_testbranch1",
|
||||
"request": {
|
||||
"url": "/repos/hub4j-test-org/temp-testMergeBranch/contents/testBranch1",
|
||||
"method": "PUT",
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
|
||||
}
|
||||
},
|
||||
"bodyPatterns": [
|
||||
{
|
||||
"equalToJson": "{\"path\":\"testBranch1\",\"message\":\"testBranch1\",\"branch\":\"testBranch1\",\"content\":\"dGVzdEJyYW5jaDE=\"}",
|
||||
"ignoreArrayOrder": true,
|
||||
"ignoreExtraElements": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"response": {
|
||||
"status": 201,
|
||||
"bodyFileName": "repos_hub4j-test-org_temp-testmergebranch_contents_testbranch1-5.json",
|
||||
"headers": {
|
||||
"Date": "Tue, 28 Jul 2020 19:54:56 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Status": "201 Created",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4991",
|
||||
"X-RateLimit-Reset": "1595969688",
|
||||
"Cache-Control": "private, max-age=60, s-maxage=60",
|
||||
"Vary": [
|
||||
"Accept, Authorization, Cookie, X-GitHub-OTP",
|
||||
"Accept-Encoding, Accept, X-Requested-With",
|
||||
"Accept-Encoding"
|
||||
],
|
||||
"ETag": "\"f4dbe8e0bd7a12c64e12252c4cc291f2\"",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "",
|
||||
"X-GitHub-Media-Type": "unknown, github.v3",
|
||||
"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": "EE13:3784:A64BD:D16FF:5F20828F"
|
||||
}
|
||||
},
|
||||
"uuid": "d02ffee7-28b2-4cba-96f5-b6c57d48c903",
|
||||
"persistent": true,
|
||||
"insertionIndex": 5
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"id": "078c1c45-bf0f-49d1-99a2-cea8339d2c2d",
|
||||
"name": "repos_hub4j-test-org_temp-testmergebranch_contents_testbranch2",
|
||||
"request": {
|
||||
"url": "/repos/hub4j-test-org/temp-testMergeBranch/contents/testBranch2",
|
||||
"method": "PUT",
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
|
||||
}
|
||||
},
|
||||
"bodyPatterns": [
|
||||
{
|
||||
"equalToJson": "{\"path\":\"testBranch2\",\"message\":\"testBranch2\",\"branch\":\"testBranch2\",\"content\":\"dGVzdEJyYW5jaDI=\"}",
|
||||
"ignoreArrayOrder": true,
|
||||
"ignoreExtraElements": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"response": {
|
||||
"status": 201,
|
||||
"bodyFileName": "repos_hub4j-test-org_temp-testmergebranch_contents_testbranch2-7.json",
|
||||
"headers": {
|
||||
"Date": "Tue, 28 Jul 2020 19:54:58 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Status": "201 Created",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4989",
|
||||
"X-RateLimit-Reset": "1595969688",
|
||||
"Cache-Control": "private, max-age=60, s-maxage=60",
|
||||
"Vary": [
|
||||
"Accept, Authorization, Cookie, X-GitHub-OTP",
|
||||
"Accept-Encoding, Accept, X-Requested-With",
|
||||
"Accept-Encoding"
|
||||
],
|
||||
"ETag": "\"be8981ef90340e91391c74a9d8665f16\"",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "",
|
||||
"X-GitHub-Media-Type": "unknown, github.v3",
|
||||
"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": "EE13:3784:A64EE:D1730:5F208291"
|
||||
}
|
||||
},
|
||||
"uuid": "078c1c45-bf0f-49d1-99a2-cea8339d2c2d",
|
||||
"persistent": true,
|
||||
"insertionIndex": 7
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"id": "94200d6b-4b21-4d99-9a46-e653c1b0be14",
|
||||
"name": "repos_hub4j-test-org_temp-testmergebranch_git_refs",
|
||||
"request": {
|
||||
"url": "/repos/hub4j-test-org/temp-testMergeBranch/git/refs",
|
||||
"method": "POST",
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
|
||||
}
|
||||
},
|
||||
"bodyPatterns": [
|
||||
{
|
||||
"equalToJson": "{\"ref\":\"refs/heads/testBranch1\",\"sha\":\"688a1c3f8bc67deb767f68560ed8c7350d70d50f\"}",
|
||||
"ignoreArrayOrder": true,
|
||||
"ignoreExtraElements": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"response": {
|
||||
"status": 201,
|
||||
"bodyFileName": "repos_hub4j-test-org_temp-testmergebranch_git_refs-4.json",
|
||||
"headers": {
|
||||
"Date": "Tue, 28 Jul 2020 19:54:55 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Status": "201 Created",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4992",
|
||||
"X-RateLimit-Reset": "1595969688",
|
||||
"Cache-Control": "private, max-age=60, s-maxage=60",
|
||||
"Vary": [
|
||||
"Accept, Authorization, Cookie, X-GitHub-OTP",
|
||||
"Accept-Encoding, Accept, X-Requested-With",
|
||||
"Accept-Encoding"
|
||||
],
|
||||
"ETag": "\"4c1d080908281566b4cbeca9d8febe6c\"",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "repo",
|
||||
"Location": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/refs/heads/testBranch1",
|
||||
"X-GitHub-Media-Type": "unknown, github.v3",
|
||||
"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": "EE13:3784:A64A7:D16E2:5F20828E"
|
||||
}
|
||||
},
|
||||
"uuid": "94200d6b-4b21-4d99-9a46-e653c1b0be14",
|
||||
"persistent": true,
|
||||
"insertionIndex": 4
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"id": "031e30e3-6faa-44c2-b70f-3d9ba5bec9d8",
|
||||
"name": "repos_hub4j-test-org_temp-testmergebranch_git_refs",
|
||||
"request": {
|
||||
"url": "/repos/hub4j-test-org/temp-testMergeBranch/git/refs",
|
||||
"method": "POST",
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
|
||||
}
|
||||
},
|
||||
"bodyPatterns": [
|
||||
{
|
||||
"equalToJson": "{\"ref\":\"refs/heads/testBranch2\",\"sha\":\"688a1c3f8bc67deb767f68560ed8c7350d70d50f\"}",
|
||||
"ignoreArrayOrder": true,
|
||||
"ignoreExtraElements": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"response": {
|
||||
"status": 201,
|
||||
"bodyFileName": "repos_hub4j-test-org_temp-testmergebranch_git_refs-6.json",
|
||||
"headers": {
|
||||
"Date": "Tue, 28 Jul 2020 19:54:57 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Status": "201 Created",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4990",
|
||||
"X-RateLimit-Reset": "1595969688",
|
||||
"Cache-Control": "private, max-age=60, s-maxage=60",
|
||||
"Vary": [
|
||||
"Accept, Authorization, Cookie, X-GitHub-OTP",
|
||||
"Accept-Encoding, Accept, X-Requested-With",
|
||||
"Accept-Encoding"
|
||||
],
|
||||
"ETag": "\"5da13192d2a1368f382c1593a66e9e6e\"",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "repo",
|
||||
"Location": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/git/refs/heads/testBranch2",
|
||||
"X-GitHub-Media-Type": "unknown, github.v3",
|
||||
"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": "EE13:3784:A64DF:D171F:5F208290"
|
||||
}
|
||||
},
|
||||
"uuid": "031e30e3-6faa-44c2-b70f-3d9ba5bec9d8",
|
||||
"persistent": true,
|
||||
"insertionIndex": 6
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"id": "c4e8c18e-a010-46fb-a605-9c4b83b5ee3b",
|
||||
"name": "repos_hub4j-test-org_temp-testmergebranch_git_refs_heads_master",
|
||||
"request": {
|
||||
"url": "/repos/hub4j-test-org/temp-testMergeBranch/git/refs/heads/master",
|
||||
"method": "GET",
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status": 200,
|
||||
"bodyFileName": "repos_hub4j-test-org_temp-testmergebranch_git_refs_heads_master-3.json",
|
||||
"headers": {
|
||||
"Date": "Tue, 28 Jul 2020 19:54:54 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Status": "200 OK",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4993",
|
||||
"X-RateLimit-Reset": "1595969687",
|
||||
"Cache-Control": "private, max-age=60, s-maxage=60",
|
||||
"Vary": [
|
||||
"Accept, Authorization, Cookie, X-GitHub-OTP",
|
||||
"Accept-Encoding, Accept, X-Requested-With",
|
||||
"Accept-Encoding"
|
||||
],
|
||||
"ETag": "W/\"d3b5113fd53fc08d8d171deb0f400daa\"",
|
||||
"Last-Modified": "Tue, 28 Jul 2020 19:54:53 GMT",
|
||||
"X-Poll-Interval": "300",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "repo",
|
||||
"X-GitHub-Media-Type": "unknown, github.v3",
|
||||
"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": "EE13:3784:A64A3:D16DC:5F20828E"
|
||||
}
|
||||
},
|
||||
"uuid": "c4e8c18e-a010-46fb-a605-9c4b83b5ee3b",
|
||||
"persistent": true,
|
||||
"insertionIndex": 3
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"id": "8f5eb5d0-5204-49ea-bc22-5f4e412f9def",
|
||||
"name": "repos_hub4j-test-org_temp-testmergebranch_merges",
|
||||
"request": {
|
||||
"url": "/repos/hub4j-test-org/temp-testMergeBranch/merges",
|
||||
"method": "POST",
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
|
||||
}
|
||||
},
|
||||
"bodyPatterns": [
|
||||
{
|
||||
"equalToJson": "{\"head\":\"testBranch2\",\"commit_message\":\"merging testBranch2\",\"base\":\"testBranch1\"}",
|
||||
"ignoreArrayOrder": true,
|
||||
"ignoreExtraElements": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"response": {
|
||||
"status": 201,
|
||||
"bodyFileName": "repos_hub4j-test-org_temp-testmergebranch_merges-10.json",
|
||||
"headers": {
|
||||
"Date": "Tue, 28 Jul 2020 19:54:59 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Status": "201 Created",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4986",
|
||||
"X-RateLimit-Reset": "1595969687",
|
||||
"Cache-Control": "private, max-age=60, s-maxage=60",
|
||||
"Vary": [
|
||||
"Accept, Authorization, Cookie, X-GitHub-OTP",
|
||||
"Accept-Encoding, Accept, X-Requested-With",
|
||||
"Accept-Encoding"
|
||||
],
|
||||
"ETag": "\"9c320a3cf9eefca809ccbee57e38c84d\"",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "",
|
||||
"Location": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/commits/4cfa1cac01c59db507f550c8c870dac98859b353",
|
||||
"X-GitHub-Media-Type": "unknown, github.v3",
|
||||
"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": "EE13:3784:A651D:D176C:5F208292"
|
||||
}
|
||||
},
|
||||
"uuid": "8f5eb5d0-5204-49ea-bc22-5f4e412f9def",
|
||||
"persistent": true,
|
||||
"insertionIndex": 10
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"id": "4ab064aa-6af9-4a2f-910a-6142b5afd337",
|
||||
"name": "repos_hub4j-test-org_temp-testmergebranch_merges",
|
||||
"request": {
|
||||
"url": "/repos/hub4j-test-org/temp-testMergeBranch/merges",
|
||||
"method": "POST",
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
|
||||
}
|
||||
},
|
||||
"bodyPatterns": [
|
||||
{
|
||||
"equalToJson": "{\"head\":\"4cfa1cac01c59db507f550c8c870dac98859b353\",\"commit_message\":\"merging from 4cfa1cac01c59db507f550c8c870dac98859b353\",\"base\":\"master\"}",
|
||||
"ignoreArrayOrder": true,
|
||||
"ignoreExtraElements": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"response": {
|
||||
"status": 201,
|
||||
"bodyFileName": "repos_hub4j-test-org_temp-testmergebranch_merges-12.json",
|
||||
"headers": {
|
||||
"Date": "Tue, 28 Jul 2020 19:55:01 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Status": "201 Created",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4984",
|
||||
"X-RateLimit-Reset": "1595969688",
|
||||
"Cache-Control": "private, max-age=60, s-maxage=60",
|
||||
"Vary": [
|
||||
"Accept, Authorization, Cookie, X-GitHub-OTP",
|
||||
"Accept-Encoding, Accept, X-Requested-With",
|
||||
"Accept-Encoding"
|
||||
],
|
||||
"ETag": "\"23dae4db9910ea437dfc2d6cde7939de\"",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "",
|
||||
"Location": "https://api.github.com/repos/hub4j-test-org/temp-testMergeBranch/commits/223608e290ccc2f8902385528a24b1f7aec92acf",
|
||||
"X-GitHub-Media-Type": "unknown, github.v3",
|
||||
"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": "EE13:3784:A6562:D17CA:5F208294"
|
||||
}
|
||||
},
|
||||
"uuid": "4ab064aa-6af9-4a2f-910a-6142b5afd337",
|
||||
"persistent": true,
|
||||
"insertionIndex": 12
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"id": "8536e5ba-39e7-4985-b6dd-08abee17696c",
|
||||
"name": "repos_hub4j-test-org_temp-testmergebranch_merges",
|
||||
"request": {
|
||||
"url": "/repos/hub4j-test-org/temp-testMergeBranch/merges",
|
||||
"method": "POST",
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
|
||||
}
|
||||
},
|
||||
"bodyPatterns": [
|
||||
{
|
||||
"equalToJson": "{\"head\":\"223608e290ccc2f8902385528a24b1f7aec92acf\",\"commit_message\":\"merging from 4cfa1cac01c59db507f550c8c870dac98859b353\",\"base\":\"master\"}",
|
||||
"ignoreArrayOrder": true,
|
||||
"ignoreExtraElements": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"response": {
|
||||
"status": 204,
|
||||
"headers": {
|
||||
"Date": "Tue, 28 Jul 2020 19:55:01 GMT",
|
||||
"Server": "GitHub.com",
|
||||
"Status": "204 No Content",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4983",
|
||||
"X-RateLimit-Reset": "1595969687",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "",
|
||||
"X-GitHub-Media-Type": "unknown, github.v3",
|
||||
"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'",
|
||||
"Vary": [
|
||||
"Accept-Encoding, Accept, X-Requested-With",
|
||||
"Accept-Encoding"
|
||||
],
|
||||
"X-GitHub-Request-Id": "EE13:3784:A65C4:D182E:5F208295"
|
||||
}
|
||||
},
|
||||
"uuid": "8536e5ba-39e7-4985-b6dd-08abee17696c",
|
||||
"persistent": true,
|
||||
"insertionIndex": 13
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"id": "0e802578-0945-4434-a5de-bf83270366b5",
|
||||
"name": "user",
|
||||
"request": {
|
||||
"url": "/user",
|
||||
"method": "GET",
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status": 200,
|
||||
"bodyFileName": "user-1.json",
|
||||
"headers": {
|
||||
"Date": "Tue, 28 Jul 2020 19:54:48 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Status": "200 OK",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4999",
|
||||
"X-RateLimit-Reset": "1595969688",
|
||||
"Cache-Control": "private, max-age=60, s-maxage=60",
|
||||
"Vary": [
|
||||
"Accept, Authorization, Cookie, X-GitHub-OTP",
|
||||
"Accept-Encoding, Accept, X-Requested-With",
|
||||
"Accept-Encoding"
|
||||
],
|
||||
"ETag": "W/\"45741c9b5046d0be498127215d6c1db7\"",
|
||||
"Last-Modified": "Mon, 27 Jul 2020 20:21:05 GMT",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "",
|
||||
"X-GitHub-Media-Type": "unknown, github.v3",
|
||||
"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": "EE13:3784:A637F:D157E:5F208287"
|
||||
}
|
||||
},
|
||||
"uuid": "0e802578-0945-4434-a5de-bf83270366b5",
|
||||
"persistent": true,
|
||||
"insertionIndex": 1
|
||||
}
|
||||
@@ -0,0 +1,305 @@
|
||||
{
|
||||
"id": 40763577,
|
||||
"node_id": "MDEwOlJlcG9zaXRvcnk0MDc2MzU3Nw==",
|
||||
"name": "GHContentIntegrationTest",
|
||||
"full_name": "hub4j-test-org/GHContentIntegrationTest",
|
||||
"private": false,
|
||||
"owner": {
|
||||
"login": "hub4j-test-org",
|
||||
"id": 7544739,
|
||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/hub4j-test-org",
|
||||
"html_url": "https://github.com/hub4j-test-org",
|
||||
"followers_url": "https://api.github.com/users/hub4j-test-org/followers",
|
||||
"following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/hub4j-test-org/orgs",
|
||||
"repos_url": "https://api.github.com/users/hub4j-test-org/repos",
|
||||
"events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/hub4j-test-org/received_events",
|
||||
"type": "Organization",
|
||||
"site_admin": false
|
||||
},
|
||||
"html_url": "https://github.com/hub4j-test-org/GHContentIntegrationTest",
|
||||
"description": "Repository used for integration test of github-api",
|
||||
"fork": true,
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest",
|
||||
"forks_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/forks",
|
||||
"keys_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/keys{/key_id}",
|
||||
"collaborators_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/collaborators{/collaborator}",
|
||||
"teams_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/teams",
|
||||
"hooks_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/hooks",
|
||||
"issue_events_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/issues/events{/number}",
|
||||
"events_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/events",
|
||||
"assignees_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/assignees{/user}",
|
||||
"branches_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/branches{/branch}",
|
||||
"tags_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/tags",
|
||||
"blobs_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/blobs{/sha}",
|
||||
"git_tags_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/tags{/sha}",
|
||||
"git_refs_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/refs{/sha}",
|
||||
"trees_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/trees{/sha}",
|
||||
"statuses_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/statuses/{sha}",
|
||||
"languages_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/languages",
|
||||
"stargazers_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/stargazers",
|
||||
"contributors_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/contributors",
|
||||
"subscribers_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/subscribers",
|
||||
"subscription_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/subscription",
|
||||
"commits_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/commits{/sha}",
|
||||
"git_commits_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/commits{/sha}",
|
||||
"comments_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/comments{/number}",
|
||||
"issue_comment_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/issues/comments{/number}",
|
||||
"contents_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/contents/{+path}",
|
||||
"compare_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/compare/{base}...{head}",
|
||||
"merges_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/merges",
|
||||
"archive_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/{archive_format}{/ref}",
|
||||
"downloads_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/downloads",
|
||||
"issues_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/issues{/number}",
|
||||
"pulls_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/pulls{/number}",
|
||||
"milestones_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/milestones{/number}",
|
||||
"notifications_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/notifications{?since,all,participating}",
|
||||
"labels_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/labels{/name}",
|
||||
"releases_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/releases{/id}",
|
||||
"deployments_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/deployments",
|
||||
"created_at": "2015-08-15T14:14:57Z",
|
||||
"updated_at": "2020-07-02T15:49:49Z",
|
||||
"pushed_at": "2020-07-02T15:49:47Z",
|
||||
"git_url": "git://github.com/hub4j-test-org/GHContentIntegrationTest.git",
|
||||
"ssh_url": "git@github.com:hub4j-test-org/GHContentIntegrationTest.git",
|
||||
"clone_url": "https://github.com/hub4j-test-org/GHContentIntegrationTest.git",
|
||||
"svn_url": "https://github.com/hub4j-test-org/GHContentIntegrationTest",
|
||||
"homepage": null,
|
||||
"size": 54,
|
||||
"stargazers_count": 0,
|
||||
"watchers_count": 0,
|
||||
"language": null,
|
||||
"has_issues": false,
|
||||
"has_projects": true,
|
||||
"has_downloads": true,
|
||||
"has_wiki": true,
|
||||
"has_pages": false,
|
||||
"forks_count": 41,
|
||||
"mirror_url": null,
|
||||
"archived": false,
|
||||
"disabled": false,
|
||||
"open_issues_count": 0,
|
||||
"license": null,
|
||||
"forks": 41,
|
||||
"open_issues": 0,
|
||||
"watchers": 0,
|
||||
"default_branch": "master",
|
||||
"temp_clone_token": null,
|
||||
"organization": {
|
||||
"login": "hub4j-test-org",
|
||||
"id": 7544739,
|
||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/hub4j-test-org",
|
||||
"html_url": "https://github.com/hub4j-test-org",
|
||||
"followers_url": "https://api.github.com/users/hub4j-test-org/followers",
|
||||
"following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/hub4j-test-org/orgs",
|
||||
"repos_url": "https://api.github.com/users/hub4j-test-org/repos",
|
||||
"events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/hub4j-test-org/received_events",
|
||||
"type": "Organization",
|
||||
"site_admin": false
|
||||
},
|
||||
"parent": {
|
||||
"id": 19653852,
|
||||
"node_id": "MDEwOlJlcG9zaXRvcnkxOTY1Mzg1Mg==",
|
||||
"name": "GHContentIntegrationTest",
|
||||
"full_name": "kohsuke2/GHContentIntegrationTest",
|
||||
"private": false,
|
||||
"owner": {
|
||||
"login": "kohsuke2",
|
||||
"id": 1329242,
|
||||
"node_id": "MDQ6VXNlcjEzMjkyNDI=",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/1329242?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/kohsuke2",
|
||||
"html_url": "https://github.com/kohsuke2",
|
||||
"followers_url": "https://api.github.com/users/kohsuke2/followers",
|
||||
"following_url": "https://api.github.com/users/kohsuke2/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/kohsuke2/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/kohsuke2/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/kohsuke2/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/kohsuke2/orgs",
|
||||
"repos_url": "https://api.github.com/users/kohsuke2/repos",
|
||||
"events_url": "https://api.github.com/users/kohsuke2/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/kohsuke2/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"html_url": "https://github.com/kohsuke2/GHContentIntegrationTest",
|
||||
"description": "Repository used for integration test of github-api",
|
||||
"fork": true,
|
||||
"url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest",
|
||||
"forks_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/forks",
|
||||
"keys_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/keys{/key_id}",
|
||||
"collaborators_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/collaborators{/collaborator}",
|
||||
"teams_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/teams",
|
||||
"hooks_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/hooks",
|
||||
"issue_events_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/issues/events{/number}",
|
||||
"events_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/events",
|
||||
"assignees_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/assignees{/user}",
|
||||
"branches_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/branches{/branch}",
|
||||
"tags_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/tags",
|
||||
"blobs_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/blobs{/sha}",
|
||||
"git_tags_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/tags{/sha}",
|
||||
"git_refs_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/refs{/sha}",
|
||||
"trees_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/trees{/sha}",
|
||||
"statuses_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/statuses/{sha}",
|
||||
"languages_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/languages",
|
||||
"stargazers_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/stargazers",
|
||||
"contributors_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/contributors",
|
||||
"subscribers_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/subscribers",
|
||||
"subscription_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/subscription",
|
||||
"commits_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/commits{/sha}",
|
||||
"git_commits_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/commits{/sha}",
|
||||
"comments_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/comments{/number}",
|
||||
"issue_comment_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/issues/comments{/number}",
|
||||
"contents_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/contents/{+path}",
|
||||
"compare_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/compare/{base}...{head}",
|
||||
"merges_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/merges",
|
||||
"archive_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/{archive_format}{/ref}",
|
||||
"downloads_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/downloads",
|
||||
"issues_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/issues{/number}",
|
||||
"pulls_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/pulls{/number}",
|
||||
"milestones_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/milestones{/number}",
|
||||
"notifications_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/notifications{?since,all,participating}",
|
||||
"labels_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/labels{/name}",
|
||||
"releases_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/releases{/id}",
|
||||
"deployments_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/deployments",
|
||||
"created_at": "2014-05-10T22:50:30Z",
|
||||
"updated_at": "2018-11-07T15:36:19Z",
|
||||
"pushed_at": "2018-11-07T15:36:18Z",
|
||||
"git_url": "git://github.com/kohsuke2/GHContentIntegrationTest.git",
|
||||
"ssh_url": "git@github.com:kohsuke2/GHContentIntegrationTest.git",
|
||||
"clone_url": "https://github.com/kohsuke2/GHContentIntegrationTest.git",
|
||||
"svn_url": "https://github.com/kohsuke2/GHContentIntegrationTest",
|
||||
"homepage": null,
|
||||
"size": 111,
|
||||
"stargazers_count": 0,
|
||||
"watchers_count": 0,
|
||||
"language": null,
|
||||
"has_issues": false,
|
||||
"has_projects": true,
|
||||
"has_downloads": true,
|
||||
"has_wiki": true,
|
||||
"has_pages": false,
|
||||
"forks_count": 1,
|
||||
"mirror_url": null,
|
||||
"archived": false,
|
||||
"disabled": false,
|
||||
"open_issues_count": 0,
|
||||
"license": null,
|
||||
"forks": 1,
|
||||
"open_issues": 0,
|
||||
"watchers": 0,
|
||||
"default_branch": "master"
|
||||
},
|
||||
"source": {
|
||||
"id": 14779458,
|
||||
"node_id": "MDEwOlJlcG9zaXRvcnkxNDc3OTQ1OA==",
|
||||
"name": "github-api-test-1",
|
||||
"full_name": "farmdawgnation/github-api-test-1",
|
||||
"private": false,
|
||||
"owner": {
|
||||
"login": "farmdawgnation",
|
||||
"id": 620189,
|
||||
"node_id": "MDQ6VXNlcjYyMDE4OQ==",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/620189?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/farmdawgnation",
|
||||
"html_url": "https://github.com/farmdawgnation",
|
||||
"followers_url": "https://api.github.com/users/farmdawgnation/followers",
|
||||
"following_url": "https://api.github.com/users/farmdawgnation/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/farmdawgnation/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/farmdawgnation/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/farmdawgnation/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/farmdawgnation/orgs",
|
||||
"repos_url": "https://api.github.com/users/farmdawgnation/repos",
|
||||
"events_url": "https://api.github.com/users/farmdawgnation/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/farmdawgnation/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"html_url": "https://github.com/farmdawgnation/github-api-test-1",
|
||||
"description": "Repository used for integration test of github-api",
|
||||
"fork": false,
|
||||
"url": "https://api.github.com/repos/farmdawgnation/github-api-test-1",
|
||||
"forks_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/forks",
|
||||
"keys_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/keys{/key_id}",
|
||||
"collaborators_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/collaborators{/collaborator}",
|
||||
"teams_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/teams",
|
||||
"hooks_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/hooks",
|
||||
"issue_events_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/issues/events{/number}",
|
||||
"events_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/events",
|
||||
"assignees_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/assignees{/user}",
|
||||
"branches_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/branches{/branch}",
|
||||
"tags_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/tags",
|
||||
"blobs_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/blobs{/sha}",
|
||||
"git_tags_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/tags{/sha}",
|
||||
"git_refs_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/refs{/sha}",
|
||||
"trees_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/trees{/sha}",
|
||||
"statuses_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/statuses/{sha}",
|
||||
"languages_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/languages",
|
||||
"stargazers_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/stargazers",
|
||||
"contributors_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/contributors",
|
||||
"subscribers_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/subscribers",
|
||||
"subscription_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/subscription",
|
||||
"commits_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/commits{/sha}",
|
||||
"git_commits_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/commits{/sha}",
|
||||
"comments_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/comments{/number}",
|
||||
"issue_comment_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/issues/comments{/number}",
|
||||
"contents_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/contents/{+path}",
|
||||
"compare_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/compare/{base}...{head}",
|
||||
"merges_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/merges",
|
||||
"archive_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/{archive_format}{/ref}",
|
||||
"downloads_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/downloads",
|
||||
"issues_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/issues{/number}",
|
||||
"pulls_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/pulls{/number}",
|
||||
"milestones_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/milestones{/number}",
|
||||
"notifications_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/notifications{?since,all,participating}",
|
||||
"labels_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/labels{/name}",
|
||||
"releases_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/releases{/id}",
|
||||
"deployments_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/deployments",
|
||||
"created_at": "2013-11-28T14:46:38Z",
|
||||
"updated_at": "2016-02-05T13:33:23Z",
|
||||
"pushed_at": "2013-11-28T14:55:36Z",
|
||||
"git_url": "git://github.com/farmdawgnation/github-api-test-1.git",
|
||||
"ssh_url": "git@github.com:farmdawgnation/github-api-test-1.git",
|
||||
"clone_url": "https://github.com/farmdawgnation/github-api-test-1.git",
|
||||
"svn_url": "https://github.com/farmdawgnation/github-api-test-1",
|
||||
"homepage": null,
|
||||
"size": 89,
|
||||
"stargazers_count": 0,
|
||||
"watchers_count": 0,
|
||||
"language": null,
|
||||
"has_issues": false,
|
||||
"has_projects": true,
|
||||
"has_downloads": true,
|
||||
"has_wiki": true,
|
||||
"has_pages": false,
|
||||
"forks_count": 59,
|
||||
"mirror_url": null,
|
||||
"archived": false,
|
||||
"disabled": false,
|
||||
"open_issues_count": 0,
|
||||
"license": null,
|
||||
"forks": 59,
|
||||
"open_issues": 0,
|
||||
"watchers": 0,
|
||||
"default_branch": "master"
|
||||
},
|
||||
"network_count": 59,
|
||||
"subscribers_count": 0
|
||||
}
|
||||
@@ -0,0 +1,305 @@
|
||||
{
|
||||
"id": 40763577,
|
||||
"node_id": "MDEwOlJlcG9zaXRvcnk0MDc2MzU3Nw==",
|
||||
"name": "GHContentIntegrationTest",
|
||||
"full_name": "hub4j-test-org/GHContentIntegrationTest",
|
||||
"private": false,
|
||||
"owner": {
|
||||
"login": "hub4j-test-org",
|
||||
"id": 7544739,
|
||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/hub4j-test-org",
|
||||
"html_url": "https://github.com/hub4j-test-org",
|
||||
"followers_url": "https://api.github.com/users/hub4j-test-org/followers",
|
||||
"following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/hub4j-test-org/orgs",
|
||||
"repos_url": "https://api.github.com/users/hub4j-test-org/repos",
|
||||
"events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/hub4j-test-org/received_events",
|
||||
"type": "Organization",
|
||||
"site_admin": false
|
||||
},
|
||||
"html_url": "https://github.com/hub4j-test-org/GHContentIntegrationTest",
|
||||
"description": "Repository used for integration test of github-api",
|
||||
"fork": true,
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest",
|
||||
"forks_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/forks",
|
||||
"keys_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/keys{/key_id}",
|
||||
"collaborators_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/collaborators{/collaborator}",
|
||||
"teams_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/teams",
|
||||
"hooks_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/hooks",
|
||||
"issue_events_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/issues/events{/number}",
|
||||
"events_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/events",
|
||||
"assignees_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/assignees{/user}",
|
||||
"branches_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/branches{/branch}",
|
||||
"tags_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/tags",
|
||||
"blobs_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/blobs{/sha}",
|
||||
"git_tags_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/tags{/sha}",
|
||||
"git_refs_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/refs{/sha}",
|
||||
"trees_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/trees{/sha}",
|
||||
"statuses_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/statuses/{sha}",
|
||||
"languages_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/languages",
|
||||
"stargazers_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/stargazers",
|
||||
"contributors_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/contributors",
|
||||
"subscribers_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/subscribers",
|
||||
"subscription_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/subscription",
|
||||
"commits_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/commits{/sha}",
|
||||
"git_commits_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/commits{/sha}",
|
||||
"comments_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/comments{/number}",
|
||||
"issue_comment_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/issues/comments{/number}",
|
||||
"contents_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/contents/{+path}",
|
||||
"compare_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/compare/{base}...{head}",
|
||||
"merges_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/merges",
|
||||
"archive_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/{archive_format}{/ref}",
|
||||
"downloads_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/downloads",
|
||||
"issues_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/issues{/number}",
|
||||
"pulls_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/pulls{/number}",
|
||||
"milestones_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/milestones{/number}",
|
||||
"notifications_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/notifications{?since,all,participating}",
|
||||
"labels_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/labels{/name}",
|
||||
"releases_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/releases{/id}",
|
||||
"deployments_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/deployments",
|
||||
"created_at": "2015-08-15T14:14:57Z",
|
||||
"updated_at": "2020-07-02T15:49:49Z",
|
||||
"pushed_at": "2020-07-02T15:49:47Z",
|
||||
"git_url": "git://github.com/hub4j-test-org/GHContentIntegrationTest.git",
|
||||
"ssh_url": "git@github.com:hub4j-test-org/GHContentIntegrationTest.git",
|
||||
"clone_url": "https://github.com/hub4j-test-org/GHContentIntegrationTest.git",
|
||||
"svn_url": "https://github.com/hub4j-test-org/GHContentIntegrationTest",
|
||||
"homepage": null,
|
||||
"size": 54,
|
||||
"stargazers_count": 0,
|
||||
"watchers_count": 0,
|
||||
"language": null,
|
||||
"has_issues": false,
|
||||
"has_projects": true,
|
||||
"has_downloads": true,
|
||||
"has_wiki": true,
|
||||
"has_pages": false,
|
||||
"forks_count": 41,
|
||||
"mirror_url": null,
|
||||
"archived": false,
|
||||
"disabled": false,
|
||||
"open_issues_count": 0,
|
||||
"license": null,
|
||||
"forks": 41,
|
||||
"open_issues": 0,
|
||||
"watchers": 0,
|
||||
"default_branch": "master",
|
||||
"temp_clone_token": null,
|
||||
"organization": {
|
||||
"login": "hub4j-test-org",
|
||||
"id": 7544739,
|
||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/hub4j-test-org",
|
||||
"html_url": "https://github.com/hub4j-test-org",
|
||||
"followers_url": "https://api.github.com/users/hub4j-test-org/followers",
|
||||
"following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/hub4j-test-org/orgs",
|
||||
"repos_url": "https://api.github.com/users/hub4j-test-org/repos",
|
||||
"events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/hub4j-test-org/received_events",
|
||||
"type": "Organization",
|
||||
"site_admin": false
|
||||
},
|
||||
"parent": {
|
||||
"id": 19653852,
|
||||
"node_id": "MDEwOlJlcG9zaXRvcnkxOTY1Mzg1Mg==",
|
||||
"name": "GHContentIntegrationTest",
|
||||
"full_name": "kohsuke2/GHContentIntegrationTest",
|
||||
"private": false,
|
||||
"owner": {
|
||||
"login": "kohsuke2",
|
||||
"id": 1329242,
|
||||
"node_id": "MDQ6VXNlcjEzMjkyNDI=",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/1329242?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/kohsuke2",
|
||||
"html_url": "https://github.com/kohsuke2",
|
||||
"followers_url": "https://api.github.com/users/kohsuke2/followers",
|
||||
"following_url": "https://api.github.com/users/kohsuke2/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/kohsuke2/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/kohsuke2/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/kohsuke2/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/kohsuke2/orgs",
|
||||
"repos_url": "https://api.github.com/users/kohsuke2/repos",
|
||||
"events_url": "https://api.github.com/users/kohsuke2/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/kohsuke2/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"html_url": "https://github.com/kohsuke2/GHContentIntegrationTest",
|
||||
"description": "Repository used for integration test of github-api",
|
||||
"fork": true,
|
||||
"url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest",
|
||||
"forks_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/forks",
|
||||
"keys_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/keys{/key_id}",
|
||||
"collaborators_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/collaborators{/collaborator}",
|
||||
"teams_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/teams",
|
||||
"hooks_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/hooks",
|
||||
"issue_events_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/issues/events{/number}",
|
||||
"events_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/events",
|
||||
"assignees_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/assignees{/user}",
|
||||
"branches_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/branches{/branch}",
|
||||
"tags_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/tags",
|
||||
"blobs_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/blobs{/sha}",
|
||||
"git_tags_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/tags{/sha}",
|
||||
"git_refs_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/refs{/sha}",
|
||||
"trees_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/trees{/sha}",
|
||||
"statuses_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/statuses/{sha}",
|
||||
"languages_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/languages",
|
||||
"stargazers_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/stargazers",
|
||||
"contributors_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/contributors",
|
||||
"subscribers_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/subscribers",
|
||||
"subscription_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/subscription",
|
||||
"commits_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/commits{/sha}",
|
||||
"git_commits_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/git/commits{/sha}",
|
||||
"comments_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/comments{/number}",
|
||||
"issue_comment_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/issues/comments{/number}",
|
||||
"contents_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/contents/{+path}",
|
||||
"compare_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/compare/{base}...{head}",
|
||||
"merges_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/merges",
|
||||
"archive_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/{archive_format}{/ref}",
|
||||
"downloads_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/downloads",
|
||||
"issues_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/issues{/number}",
|
||||
"pulls_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/pulls{/number}",
|
||||
"milestones_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/milestones{/number}",
|
||||
"notifications_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/notifications{?since,all,participating}",
|
||||
"labels_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/labels{/name}",
|
||||
"releases_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/releases{/id}",
|
||||
"deployments_url": "https://api.github.com/repos/kohsuke2/GHContentIntegrationTest/deployments",
|
||||
"created_at": "2014-05-10T22:50:30Z",
|
||||
"updated_at": "2018-11-07T15:36:19Z",
|
||||
"pushed_at": "2018-11-07T15:36:18Z",
|
||||
"git_url": "git://github.com/kohsuke2/GHContentIntegrationTest.git",
|
||||
"ssh_url": "git@github.com:kohsuke2/GHContentIntegrationTest.git",
|
||||
"clone_url": "https://github.com/kohsuke2/GHContentIntegrationTest.git",
|
||||
"svn_url": "https://github.com/kohsuke2/GHContentIntegrationTest",
|
||||
"homepage": null,
|
||||
"size": 111,
|
||||
"stargazers_count": 0,
|
||||
"watchers_count": 0,
|
||||
"language": null,
|
||||
"has_issues": false,
|
||||
"has_projects": true,
|
||||
"has_downloads": true,
|
||||
"has_wiki": true,
|
||||
"has_pages": false,
|
||||
"forks_count": 1,
|
||||
"mirror_url": null,
|
||||
"archived": false,
|
||||
"disabled": false,
|
||||
"open_issues_count": 0,
|
||||
"license": null,
|
||||
"forks": 1,
|
||||
"open_issues": 0,
|
||||
"watchers": 0,
|
||||
"default_branch": "master"
|
||||
},
|
||||
"source": {
|
||||
"id": 14779458,
|
||||
"node_id": "MDEwOlJlcG9zaXRvcnkxNDc3OTQ1OA==",
|
||||
"name": "github-api-test-1",
|
||||
"full_name": "farmdawgnation/github-api-test-1",
|
||||
"private": false,
|
||||
"owner": {
|
||||
"login": "farmdawgnation",
|
||||
"id": 620189,
|
||||
"node_id": "MDQ6VXNlcjYyMDE4OQ==",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/620189?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/farmdawgnation",
|
||||
"html_url": "https://github.com/farmdawgnation",
|
||||
"followers_url": "https://api.github.com/users/farmdawgnation/followers",
|
||||
"following_url": "https://api.github.com/users/farmdawgnation/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/farmdawgnation/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/farmdawgnation/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/farmdawgnation/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/farmdawgnation/orgs",
|
||||
"repos_url": "https://api.github.com/users/farmdawgnation/repos",
|
||||
"events_url": "https://api.github.com/users/farmdawgnation/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/farmdawgnation/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"html_url": "https://github.com/farmdawgnation/github-api-test-1",
|
||||
"description": "Repository used for integration test of github-api",
|
||||
"fork": false,
|
||||
"url": "https://api.github.com/repos/farmdawgnation/github-api-test-1",
|
||||
"forks_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/forks",
|
||||
"keys_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/keys{/key_id}",
|
||||
"collaborators_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/collaborators{/collaborator}",
|
||||
"teams_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/teams",
|
||||
"hooks_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/hooks",
|
||||
"issue_events_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/issues/events{/number}",
|
||||
"events_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/events",
|
||||
"assignees_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/assignees{/user}",
|
||||
"branches_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/branches{/branch}",
|
||||
"tags_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/tags",
|
||||
"blobs_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/blobs{/sha}",
|
||||
"git_tags_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/tags{/sha}",
|
||||
"git_refs_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/refs{/sha}",
|
||||
"trees_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/trees{/sha}",
|
||||
"statuses_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/statuses/{sha}",
|
||||
"languages_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/languages",
|
||||
"stargazers_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/stargazers",
|
||||
"contributors_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/contributors",
|
||||
"subscribers_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/subscribers",
|
||||
"subscription_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/subscription",
|
||||
"commits_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/commits{/sha}",
|
||||
"git_commits_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/git/commits{/sha}",
|
||||
"comments_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/comments{/number}",
|
||||
"issue_comment_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/issues/comments{/number}",
|
||||
"contents_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/contents/{+path}",
|
||||
"compare_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/compare/{base}...{head}",
|
||||
"merges_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/merges",
|
||||
"archive_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/{archive_format}{/ref}",
|
||||
"downloads_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/downloads",
|
||||
"issues_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/issues{/number}",
|
||||
"pulls_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/pulls{/number}",
|
||||
"milestones_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/milestones{/number}",
|
||||
"notifications_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/notifications{?since,all,participating}",
|
||||
"labels_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/labels{/name}",
|
||||
"releases_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/releases{/id}",
|
||||
"deployments_url": "https://api.github.com/repos/farmdawgnation/github-api-test-1/deployments",
|
||||
"created_at": "2013-11-28T14:46:38Z",
|
||||
"updated_at": "2016-02-05T13:33:23Z",
|
||||
"pushed_at": "2013-11-28T14:55:36Z",
|
||||
"git_url": "git://github.com/farmdawgnation/github-api-test-1.git",
|
||||
"ssh_url": "git@github.com:farmdawgnation/github-api-test-1.git",
|
||||
"clone_url": "https://github.com/farmdawgnation/github-api-test-1.git",
|
||||
"svn_url": "https://github.com/farmdawgnation/github-api-test-1",
|
||||
"homepage": null,
|
||||
"size": 89,
|
||||
"stargazers_count": 0,
|
||||
"watchers_count": 0,
|
||||
"language": null,
|
||||
"has_issues": false,
|
||||
"has_projects": true,
|
||||
"has_downloads": true,
|
||||
"has_wiki": true,
|
||||
"has_pages": false,
|
||||
"forks_count": 59,
|
||||
"mirror_url": null,
|
||||
"archived": false,
|
||||
"disabled": false,
|
||||
"open_issues_count": 0,
|
||||
"license": null,
|
||||
"forks": 59,
|
||||
"open_issues": 0,
|
||||
"watchers": 0,
|
||||
"default_branch": "master"
|
||||
},
|
||||
"network_count": 59,
|
||||
"subscribers_count": 0
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "a-symlink-to-a-dir",
|
||||
"path": "ghcontent-ro/a-symlink-to-a-dir",
|
||||
"sha": "fba4aa592c12413933e5583d5ac0bdfd3ed4eb73",
|
||||
"size": 20,
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/contents/ghcontent-ro/a-symlink-to-a-dir?ref=master",
|
||||
"html_url": "https://github.com/hub4j-test-org/GHContentIntegrationTest/blob/master/ghcontent-ro/a-symlink-to-a-dir",
|
||||
"git_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/blobs/fba4aa592c12413933e5583d5ac0bdfd3ed4eb73",
|
||||
"download_url": "https://raw.githubusercontent.com/hub4j-test-org/GHContentIntegrationTest/master/ghcontent-ro/a-symlink-to-a-dir",
|
||||
"type": "symlink",
|
||||
"target": "a-dir-with-3-entries",
|
||||
"_links": {
|
||||
"self": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/contents/ghcontent-ro/a-symlink-to-a-dir?ref=master",
|
||||
"git": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/blobs/fba4aa592c12413933e5583d5ac0bdfd3ed4eb73",
|
||||
"html": "https://github.com/hub4j-test-org/GHContentIntegrationTest/blob/master/ghcontent-ro/a-symlink-to-a-dir"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "a-symlink-to-a-file",
|
||||
"path": "ghcontent-ro/a-symlink-to-a-file",
|
||||
"sha": "dbb84a81d2b1b5eb4077c9b72b7497eb16ed9bf6",
|
||||
"size": 22,
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/contents/ghcontent-ro/a-symlink-to-a-file?ref=master",
|
||||
"html_url": "https://github.com/hub4j-test-org/GHContentIntegrationTest/blob/master/ghcontent-ro/a-symlink-to-a-file",
|
||||
"git_url": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/blobs/dbb84a81d2b1b5eb4077c9b72b7497eb16ed9bf6",
|
||||
"download_url": "https://raw.githubusercontent.com/hub4j-test-org/GHContentIntegrationTest/master/ghcontent-ro/a-symlink-to-a-file",
|
||||
"type": "file",
|
||||
"content": "dGhhbmtzIGZvciByZWFkaW5nIG1lCg==\n",
|
||||
"encoding": "base64",
|
||||
"_links": {
|
||||
"self": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/contents/ghcontent-ro/a-symlink-to-a-file?ref=master",
|
||||
"git": "https://api.github.com/repos/hub4j-test-org/GHContentIntegrationTest/git/blobs/dbb84a81d2b1b5eb4077c9b72b7497eb16ed9bf6",
|
||||
"html": "https://github.com/hub4j-test-org/GHContentIntegrationTest/blob/master/ghcontent-ro/a-symlink-to-a-file"
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user