mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-10 08:21:21 +00:00
Move archive readers to use new functional interfaces
This commit is contained in:
@@ -30,6 +30,7 @@ import edu.umd.cs.findbugs.annotations.CheckForNull;
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.kohsuke.github.function.InputStreamConsumer;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
@@ -49,7 +50,6 @@ import java.util.Iterator;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.TreeMap;
|
||||
import java.util.WeakHashMap;
|
||||
@@ -2968,50 +2968,39 @@ public class GHRepository extends GHObject {
|
||||
* Streams a zip archive of the repository, optionally at a given <code>ref</code>.
|
||||
*
|
||||
* @param sink
|
||||
* The {@link StreamConsumer} that will consume the stream
|
||||
* The {@link InputStreamConsumer} that will consume the stream
|
||||
* @param ref
|
||||
* if <code>null</code> the repository's default branch, usually <code>master</code>,
|
||||
* @throws IOException
|
||||
* The IO exception.
|
||||
*/
|
||||
public void zipball(StreamConsumer sink, String ref) throws IOException {
|
||||
downloadArchive("zip", Optional.ofNullable(ref), sink);
|
||||
public void readZip(InputStreamConsumer sink, String ref) throws IOException {
|
||||
downloadArchive("zip", ref, sink);
|
||||
}
|
||||
|
||||
/**
|
||||
* Streams a tar archive of the repository, optionally at a given <code>ref</code>.
|
||||
*
|
||||
* @param sink
|
||||
* The {@link StreamConsumer} that will consume the stream
|
||||
* The {@link InputStreamConsumer} that will consume the stream
|
||||
* @param ref
|
||||
* if <code>null</code> the repository's default branch, usually <code>master</code>,
|
||||
* @throws IOException
|
||||
* The IO exception.
|
||||
*/
|
||||
public void tarball(StreamConsumer sink, String ref) throws IOException {
|
||||
downloadArchive("tar", Optional.ofNullable(ref), sink);
|
||||
public void readTar(InputStreamConsumer sink, String ref) throws IOException {
|
||||
downloadArchive("tar", ref, sink);
|
||||
}
|
||||
|
||||
/**
|
||||
* A functional interface, equivalent to {@link java.util.function.Consumer} but that allows throwing
|
||||
* {@link IOException}
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface StreamConsumer {
|
||||
void accept(InputStream stream) throws IOException;
|
||||
}
|
||||
|
||||
private void downloadArchive(String type, Optional<String> ref, StreamConsumer sink) throws IOException {
|
||||
private void downloadArchive(@Nonnull String type, @CheckForNull String ref, @Nonnull InputStreamConsumer sink)
|
||||
throws IOException {
|
||||
requireNonNull(sink, "Sink must not be null");
|
||||
final String base = getApiTailUrl(requireNonNull(type, "Type must not be null") + "ball");
|
||||
final String url = ref.map(base::concat).orElse(base);
|
||||
final Requester builder = root.createRequest().method("GET").withUrlPath(url);
|
||||
builder.client.sendRequest(builder.build(), response -> {
|
||||
try (final InputStream body = response.bodyStream()) {
|
||||
sink.accept(body);
|
||||
}
|
||||
return null;
|
||||
});
|
||||
String tailUrl = getApiTailUrl(type + "ball");
|
||||
if (ref != null) {
|
||||
tailUrl += "/" + ref;
|
||||
}
|
||||
final Requester builder = root.createRequest().method("GET").withUrlPath(tailUrl);
|
||||
builder.fetchStream(sink);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,8 +4,10 @@ import com.fasterxml.jackson.databind.JsonMappingException;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -28,6 +30,20 @@ public class GHRepositoryTest extends AbstractGitHubWireMockTest {
|
||||
return gitHub.getOrganization("hub4j-test-org").getRepository("github-api");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testZipball() throws IOException {
|
||||
getTempRepository().readZip((InputStream inputstream) -> {
|
||||
InputStream i = new ByteArrayInputStream(IOUtils.toByteArray(inputstream));
|
||||
}, null);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTarball() throws IOException {
|
||||
getTempRepository().readTar((InputStream inputstream) -> {
|
||||
InputStream i = new ByteArrayInputStream(IOUtils.toByteArray(inputstream));
|
||||
}, null);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetters() throws IOException {
|
||||
GHRepository r = getTempRepository();
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
{
|
||||
"id": 326623381,
|
||||
"node_id": "MDEwOlJlcG9zaXRvcnkzMjY2MjMzODE=",
|
||||
"name": "temp-testTarball",
|
||||
"full_name": "hub4j-test-org/temp-testTarball",
|
||||
"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-testTarball",
|
||||
"description": "A test repository for testing the github-api project: temp-testTarball",
|
||||
"fork": false,
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball",
|
||||
"forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/forks",
|
||||
"keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/keys{/key_id}",
|
||||
"collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/collaborators{/collaborator}",
|
||||
"teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/teams",
|
||||
"hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/hooks",
|
||||
"issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/issues/events{/number}",
|
||||
"events_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/events",
|
||||
"assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/assignees{/user}",
|
||||
"branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/branches{/branch}",
|
||||
"tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/tags",
|
||||
"blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/git/blobs{/sha}",
|
||||
"git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/git/tags{/sha}",
|
||||
"git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/git/refs{/sha}",
|
||||
"trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/git/trees{/sha}",
|
||||
"statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/statuses/{sha}",
|
||||
"languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/languages",
|
||||
"stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/stargazers",
|
||||
"contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/contributors",
|
||||
"subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/subscribers",
|
||||
"subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/subscription",
|
||||
"commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/commits{/sha}",
|
||||
"git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/git/commits{/sha}",
|
||||
"comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/comments{/number}",
|
||||
"issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/issues/comments{/number}",
|
||||
"contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/contents/{+path}",
|
||||
"compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/compare/{base}...{head}",
|
||||
"merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/merges",
|
||||
"archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/{archive_format}{/ref}",
|
||||
"downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/downloads",
|
||||
"issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/issues{/number}",
|
||||
"pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/pulls{/number}",
|
||||
"milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/milestones{/number}",
|
||||
"notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/notifications{?since,all,participating}",
|
||||
"labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/labels{/name}",
|
||||
"releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/releases{/id}",
|
||||
"deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testTarball/deployments",
|
||||
"created_at": "2021-01-04T08:53:50Z",
|
||||
"updated_at": "2021-01-04T08:53:54Z",
|
||||
"pushed_at": "2021-01-04T08:53:52Z",
|
||||
"git_url": "git://github.com/hub4j-test-org/temp-testTarball.git",
|
||||
"ssh_url": "git@github.com:hub4j-test-org/temp-testTarball.git",
|
||||
"clone_url": "https://github.com/hub4j-test-org/temp-testTarball.git",
|
||||
"svn_url": "https://github.com/hub4j-test-org/temp-testTarball",
|
||||
"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": "main",
|
||||
"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": 9
|
||||
}
|
||||
@@ -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": 199,
|
||||
"public_gists": 7,
|
||||
"followers": 175,
|
||||
"following": 11,
|
||||
"created_at": "2012-07-11T20:38:33Z",
|
||||
"updated_at": "2020-12-23T22:23:08Z",
|
||||
"private_gists": 19,
|
||||
"total_private_repos": 17,
|
||||
"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,48 @@
|
||||
{
|
||||
"id": "9223893a-a7e9-427e-adb0-e3759a83884d",
|
||||
"name": "repos_hub4j-test-org_temp-testtarball",
|
||||
"request": {
|
||||
"url": "/repos/hub4j-test-org/temp-testTarball",
|
||||
"method": "GET",
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status": 200,
|
||||
"bodyFileName": "repos_hub4j-test-org_temp-testtarball-2.json",
|
||||
"headers": {
|
||||
"Date": "Mon, 04 Jan 2021 08:53:56 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Status": "200 OK",
|
||||
"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/\"0efc5253a075be861b75de091f949051cbb8d1edd1d9f5a2671361506750599f\"",
|
||||
"Last-Modified": "Mon, 04 Jan 2021 08:53:54 GMT",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "repo",
|
||||
"X-GitHub-Media-Type": "unknown, github.v3",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4956",
|
||||
"X-RateLimit-Reset": "1609753350",
|
||||
"X-RateLimit-Used": "44",
|
||||
"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": "E328:327C:74BB33:94FCDB:5FF2D79D"
|
||||
}
|
||||
},
|
||||
"uuid": "9223893a-a7e9-427e-adb0-e3759a83884d",
|
||||
"persistent": true,
|
||||
"insertionIndex": 2
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"id": "28a8f5bf-a72d-40cc-86a1-df9c1489c3ee",
|
||||
"name": "repos_hub4j-test-org_temp-testtarball_tarball",
|
||||
"request": {
|
||||
"url": "/repos/hub4j-test-org/temp-testTarball/tarball",
|
||||
"method": "GET",
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status": 302,
|
||||
"headers": {
|
||||
"Date": "Mon, 04 Jan 2021 08:53:56 GMT",
|
||||
"Content-Type": "text/html;charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Status": "302 Found",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4956",
|
||||
"X-RateLimit-Reset": "1609753350",
|
||||
"X-RateLimit-Used": "44",
|
||||
"Cache-Control": "public, must-revalidate, max-age=0",
|
||||
"Expires": "Mon, 04 Jan 2021 08:53:56 GMT",
|
||||
"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": "E328:327C:74BB34:94FCF3:5FF2D7A4",
|
||||
"Location": "https://codeload.github.com/hub4j-test-org/temp-testTarball/legacy.tar.gz/main"
|
||||
}
|
||||
},
|
||||
"uuid": "28a8f5bf-a72d-40cc-86a1-df9c1489c3ee",
|
||||
"persistent": true,
|
||||
"insertionIndex": 3
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"id": "7a5bb867-6b83-4051-8bde-da61b825d2f7",
|
||||
"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": "Mon, 04 Jan 2021 08:53:49 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Status": "200 OK",
|
||||
"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/\"73c95077a6a9d4d2e0bf97071dc6bb996011f641c608a28e8e32e7c118fa0186\"",
|
||||
"Last-Modified": "Wed, 23 Dec 2020 22:23:08 GMT",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "",
|
||||
"X-GitHub-Media-Type": "unknown, github.v3",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4961",
|
||||
"X-RateLimit-Reset": "1609753350",
|
||||
"X-RateLimit-Used": "39",
|
||||
"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": "E328:327C:74BB23:94FCDA:5FF2D79D"
|
||||
}
|
||||
},
|
||||
"uuid": "7a5bb867-6b83-4051-8bde-da61b825d2f7",
|
||||
"persistent": true,
|
||||
"insertionIndex": 1
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"id": "05058fd3-c66f-4d07-b588-000cc532a926",
|
||||
"name": "hub4j-test-org_temp-testtarball_legacytargz_main",
|
||||
"request": {
|
||||
"url": "/hub4j-test-org/temp-testTarball/legacy.tar.gz/main",
|
||||
"method": "GET",
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status": 200,
|
||||
"bodyFileName": "hub4j-test-org_temp-testtarball_legacytargz_main-1.txt",
|
||||
"headers": {
|
||||
"Content-Disposition": "attachment; filename=hub4j-test-org-temp-testTarball-a74e312.tar.gz",
|
||||
"Content-Security-Policy": "default-src 'none'; style-src 'unsafe-inline'; sandbox",
|
||||
"Content-Type": "application/x-gzip",
|
||||
"ETag": "W/\"ca816dd3dc5e53614cac301940876a71113f01b4584f05ffe6942a9e1927f965\"",
|
||||
"Strict-Transport-Security": "max-age=31536000",
|
||||
"Vary": "Authorization,Accept-Encoding",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Frame-Options": "deny",
|
||||
"X-XSS-Protection": "1; mode=block",
|
||||
"Date": "Mon, 04 Jan 2021 09:05:18 GMT",
|
||||
"X-Varnish": "290984704",
|
||||
"Age": "0",
|
||||
"Via": "1.1 varnish (Varnish/6.0)",
|
||||
"X-Cache": "MISS",
|
||||
"X-Cache-Hits": "0",
|
||||
"Accept-Ranges": "bytes",
|
||||
"X-GitHub-Request-Id": "E374:78B6:17DCE5:4AD2E5:5FF2DA4E"
|
||||
}
|
||||
},
|
||||
"uuid": "05058fd3-c66f-4d07-b588-000cc532a926",
|
||||
"persistent": true,
|
||||
"insertionIndex": 1
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
{
|
||||
"id": 326628164,
|
||||
"node_id": "MDEwOlJlcG9zaXRvcnkzMjY2MjgxNjQ=",
|
||||
"name": "temp-testZipball",
|
||||
"full_name": "hub4j-test-org/temp-testZipball",
|
||||
"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-testZipball",
|
||||
"description": "A test repository for testing the github-api project: temp-testZipball",
|
||||
"fork": false,
|
||||
"url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball",
|
||||
"forks_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/forks",
|
||||
"keys_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/keys{/key_id}",
|
||||
"collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/collaborators{/collaborator}",
|
||||
"teams_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/teams",
|
||||
"hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/hooks",
|
||||
"issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/issues/events{/number}",
|
||||
"events_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/events",
|
||||
"assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/assignees{/user}",
|
||||
"branches_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/branches{/branch}",
|
||||
"tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/tags",
|
||||
"blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/git/blobs{/sha}",
|
||||
"git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/git/tags{/sha}",
|
||||
"git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/git/refs{/sha}",
|
||||
"trees_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/git/trees{/sha}",
|
||||
"statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/statuses/{sha}",
|
||||
"languages_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/languages",
|
||||
"stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/stargazers",
|
||||
"contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/contributors",
|
||||
"subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/subscribers",
|
||||
"subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/subscription",
|
||||
"commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/commits{/sha}",
|
||||
"git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/git/commits{/sha}",
|
||||
"comments_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/comments{/number}",
|
||||
"issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/issues/comments{/number}",
|
||||
"contents_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/contents/{+path}",
|
||||
"compare_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/compare/{base}...{head}",
|
||||
"merges_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/merges",
|
||||
"archive_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/{archive_format}{/ref}",
|
||||
"downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/downloads",
|
||||
"issues_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/issues{/number}",
|
||||
"pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/pulls{/number}",
|
||||
"milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/milestones{/number}",
|
||||
"notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/notifications{?since,all,participating}",
|
||||
"labels_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/labels{/name}",
|
||||
"releases_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/releases{/id}",
|
||||
"deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-testZipball/deployments",
|
||||
"created_at": "2021-01-04T09:12:57Z",
|
||||
"updated_at": "2021-01-04T09:13:01Z",
|
||||
"pushed_at": "2021-01-04T09:12:59Z",
|
||||
"git_url": "git://github.com/hub4j-test-org/temp-testZipball.git",
|
||||
"ssh_url": "git@github.com:hub4j-test-org/temp-testZipball.git",
|
||||
"clone_url": "https://github.com/hub4j-test-org/temp-testZipball.git",
|
||||
"svn_url": "https://github.com/hub4j-test-org/temp-testZipball",
|
||||
"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": "main",
|
||||
"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": 9
|
||||
}
|
||||
@@ -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": 199,
|
||||
"public_gists": 7,
|
||||
"followers": 175,
|
||||
"following": 11,
|
||||
"created_at": "2012-07-11T20:38:33Z",
|
||||
"updated_at": "2020-12-23T22:23:08Z",
|
||||
"private_gists": 19,
|
||||
"total_private_repos": 17,
|
||||
"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,48 @@
|
||||
{
|
||||
"id": "21c59583-c3bc-4bb5-96ee-3f7c4475b063",
|
||||
"name": "repos_hub4j-test-org_temp-testzipball",
|
||||
"request": {
|
||||
"url": "/repos/hub4j-test-org/temp-testZipball",
|
||||
"method": "GET",
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status": 200,
|
||||
"bodyFileName": "repos_hub4j-test-org_temp-testzipball-2.json",
|
||||
"headers": {
|
||||
"Date": "Mon, 04 Jan 2021 09:13:03 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Status": "200 OK",
|
||||
"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/\"87a7caaccffcefd071b3d9aa2ac7931e4f002a6187bb57c85e817d21717a5614\"",
|
||||
"Last-Modified": "Mon, 04 Jan 2021 09:13:01 GMT",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "repo",
|
||||
"X-GitHub-Media-Type": "unknown, github.v3",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4928",
|
||||
"X-RateLimit-Reset": "1609753350",
|
||||
"X-RateLimit-Used": "72",
|
||||
"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": "E3B3:1D4C:33F887F:3F4324E:5FF2DC18"
|
||||
}
|
||||
},
|
||||
"uuid": "21c59583-c3bc-4bb5-96ee-3f7c4475b063",
|
||||
"persistent": true,
|
||||
"insertionIndex": 2
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"id": "6045fad3-6145-4683-b92a-50944c7f44ba",
|
||||
"name": "repos_hub4j-test-org_temp-testzipball_zipball",
|
||||
"request": {
|
||||
"url": "/repos/hub4j-test-org/temp-testZipball/zipball",
|
||||
"method": "GET",
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status": 302,
|
||||
"headers": {
|
||||
"Date": "Mon, 04 Jan 2021 09:13:03 GMT",
|
||||
"Content-Type": "text/html;charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Status": "302 Found",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4928",
|
||||
"X-RateLimit-Reset": "1609753350",
|
||||
"X-RateLimit-Used": "72",
|
||||
"Cache-Control": "public, must-revalidate, max-age=0",
|
||||
"Expires": "Mon, 04 Jan 2021 09:13:03 GMT",
|
||||
"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": "E3B3:1D4C:33F8888:3F433C2:5FF2DC1F",
|
||||
"Location": "https://codeload.github.com/hub4j-test-org/temp-testZipball/legacy.zip/main"
|
||||
}
|
||||
},
|
||||
"uuid": "6045fad3-6145-4683-b92a-50944c7f44ba",
|
||||
"persistent": true,
|
||||
"insertionIndex": 3
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"id": "e1bf2ec7-7e15-4b19-9374-93affc205d86",
|
||||
"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": "Mon, 04 Jan 2021 09:12:56 GMT",
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Server": "GitHub.com",
|
||||
"Status": "200 OK",
|
||||
"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/\"73c95077a6a9d4d2e0bf97071dc6bb996011f641c608a28e8e32e7c118fa0186\"",
|
||||
"Last-Modified": "Wed, 23 Dec 2020 22:23:08 GMT",
|
||||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion",
|
||||
"X-Accepted-OAuth-Scopes": "",
|
||||
"X-GitHub-Media-Type": "unknown, github.v3",
|
||||
"X-RateLimit-Limit": "5000",
|
||||
"X-RateLimit-Remaining": "4933",
|
||||
"X-RateLimit-Reset": "1609753350",
|
||||
"X-RateLimit-Used": "67",
|
||||
"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": "E3B3:1D4C:33F875C:3F43247:5FF2DC18"
|
||||
}
|
||||
},
|
||||
"uuid": "e1bf2ec7-7e15-4b19-9374-93affc205d86",
|
||||
"persistent": true,
|
||||
"insertionIndex": 1
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"id": "51e04476-36b5-4649-896c-a5246b65dd82",
|
||||
"name": "hub4j-test-org_temp-testzipball_legacyzip_main",
|
||||
"request": {
|
||||
"url": "/hub4j-test-org/temp-testZipball/legacy.zip/main",
|
||||
"method": "GET",
|
||||
"headers": {
|
||||
"Accept": {
|
||||
"equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status": 200,
|
||||
"bodyFileName": "hub4j-test-org_temp-testzipball_legacyzip_main-1.txt",
|
||||
"headers": {
|
||||
"Content-Disposition": "attachment; filename=hub4j-test-org-temp-testZipball-12b27ab.zip",
|
||||
"Content-Security-Policy": "default-src 'none'; style-src 'unsafe-inline'; sandbox",
|
||||
"Content-Type": "application/zip",
|
||||
"ETag": "W/\"f4e07ea59dbed7a35c54e3a8ce438769d12f814ae805bc39482dd897b93e86c0\"",
|
||||
"Strict-Transport-Security": "max-age=31536000",
|
||||
"Vary": "Authorization,Accept-Encoding",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Frame-Options": "deny",
|
||||
"X-XSS-Protection": "1; mode=block",
|
||||
"Date": "Mon, 04 Jan 2021 09:13:03 GMT",
|
||||
"X-Varnish": "289418734",
|
||||
"Age": "0",
|
||||
"Via": "1.1 varnish (Varnish/6.0)",
|
||||
"X-Cache": "HFM",
|
||||
"X-Cache-Hits": "0",
|
||||
"Accept-Ranges": "bytes",
|
||||
"X-GitHub-Request-Id": "E3B7:6D29:177099:4A38D9:5FF2DC1F"
|
||||
}
|
||||
},
|
||||
"uuid": "51e04476-36b5-4649-896c-a5246b65dd82",
|
||||
"persistent": true,
|
||||
"insertionIndex": 1
|
||||
}
|
||||
Reference in New Issue
Block a user