From 2badb615bb687575cda9bbc7775609b76a032706 Mon Sep 17 00:00:00 2001 From: Liam Newman Date: Wed, 20 May 2020 17:03:35 -0700 Subject: [PATCH] Fixed getRef() to use git/ref endpoint instead of git/refs Fixes #794 --- .../java/org/kohsuke/github/GHRepository.java | 5 +- .../org/kohsuke/github/GHRepositoryTest.java | 94 ++++- ...insci_jenkins_git_refs_heads_master-3.json | 2 +- ...rg_github-api_git_refs_heads_master-4.json | 2 +- ...rg_github-api_git_refs_heads_master-4.json | 2 +- .../getRef/__files/orgs_hub4j-test-org-2.json | 41 +++ .../repos_hub4j-test-org_github-api-3.json | 332 ++++++++++++++++++ ...g_github-api_git_ref_heads_gh-pages-4.json | 10 + ...g_github-api_git_ref_heads_gh-pages-5.json | 10 + ...g_github-api_git_ref_heads_gh-pages-6.json | 10 + .../wiremock/getRef/__files/user-1.json | 45 +++ .../mappings/orgs_hub4j-test-org-2.json | 47 +++ .../repos_hub4j-test-org_github-api-3.json | 47 +++ ...est-org_github-api_git_ref_heads_gh-7.json | 41 +++ ...g_github-api_git_ref_heads_gh-pages-4.json | 51 +++ ...g_github-api_git_ref_heads_gh-pages-5.json | 51 +++ ..._github-api_git_ref_heads_gh-pages-6.json} | 29 +- ...j-test-org_github-api_git_ref_headz-8.json | 41 +++ .../mappings/user-1.json | 21 +- ...ub4j-test-org_temp-getrefwithprefix-2.json | 126 ------- ...refwithprefix_git_refs_heads_master-3.json | 10 - ...refwithprefix_git_refs_heads_master-4.json | 10 - .../getRefWithPrefix/__files/user-1.json | 33 -- ...refwithprefix_git_refs_heads_master-4.json | 49 --- .../__files/orgs_hub4j-test-org-2.json | 41 +++ .../repos_hub4j-test-org_github-api-3.json | 332 ++++++++++++++++++ ...-test-org_github-api_git_refs_heads-4.json | 102 ++++++ ...-test-org_github-api_git_refs_heads-5.json | 102 ++++++ ...st-org_github-api_git_refs_heads_gh-7.json | 12 + ..._github-api_git_refs_heads_gh-pages-6.json | 10 + .../repos_hub4j-test-org_temp-listrefs-2.json | 126 ------- ...b4j-test-org_temp-listrefs_git_refs-3.json | 12 - .../wiremock/listRefs/__files/user-1.json | 10 +- .../mappings/orgs_hub4j-test-org-2.json | 47 +++ .../repos_hub4j-test-org_github-api-3.json} | 29 +- ...test-org_github-api_git_refs_heads-4.json} | 33 +- ...-test-org_github-api_git_refs_heads-5.json | 50 +++ ...t-org_github-api_git_refs_heads_gh-7.json} | 28 +- ..._github-api_git_refs_heads_gh-pages-6.json | 48 +++ ...-test-org_github-api_git_refs_headz-8.json | 41 +++ .../wiremock/listRefs/mappings/user-1.json | 19 +- ...eebuildertest_git_refs_heads_master-3.json | 2 +- ...eebuildertest_git_refs_heads_master-3.json | 2 +- ..._refs_heads_test_content_ref_cache-10.json | 2 +- ..._refs_heads_test_content_ref_cache-11.json | 2 +- ..._refs_heads_test_content_ref_cache-13.json | 2 +- ..._refs_heads_test_content_ref_cache-14.json | 2 +- ..._refs_heads_test_content_ref_cache-15.json | 2 +- ...t_refs_heads_test_content_ref_cache-7.json | 2 +- ...t_refs_heads_test_content_ref_cache-8.json | 2 +- ...api_git_refs_heads_test_unmergeable-5.json | 2 +- 51 files changed, 1698 insertions(+), 473 deletions(-) create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/__files/orgs_hub4j-test-org-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/__files/repos_hub4j-test-org_github-api-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/__files/repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/__files/repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/__files/repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-6.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/__files/user-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/orgs_hub4j-test-org-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/repos_hub4j-test-org_github-api-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/repos_hub4j-test-org_github-api_git_ref_heads_gh-7.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-5.json rename src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/{listRefs/mappings/repos_hub4j-test-org_temp-listrefs_git_refs-3.json => getRef/mappings/repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-6.json} (57%) create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/repos_hub4j-test-org_github-api_git_ref_headz-8.json rename src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/{getRefWithPrefix => getRef}/mappings/user-1.json (62%) delete mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/__files/repos_hub4j-test-org_temp-getrefwithprefix-2.json delete mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/__files/repos_hub4j-test-org_temp-getrefwithprefix_git_refs_heads_master-3.json delete mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/__files/repos_hub4j-test-org_temp-getrefwithprefix_git_refs_heads_master-4.json delete mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/__files/user-1.json delete mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/mappings/repos_hub4j-test-org_temp-getrefwithprefix_git_refs_heads_master-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/orgs_hub4j-test-org-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_github-api-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_github-api_git_refs_heads-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_github-api_git_refs_heads-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_github-api_git_refs_heads_gh-7.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_github-api_git_refs_heads_gh-pages-6.json delete mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_temp-listrefs-2.json delete mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_temp-listrefs_git_refs-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/orgs_hub4j-test-org-2.json rename src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/{getRefWithPrefix/mappings/repos_hub4j-test-org_temp-getrefwithprefix-2.json => listRefs/mappings/repos_hub4j-test-org_github-api-3.json} (54%) rename src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/{getRefWithPrefix/mappings/repos_hub4j-test-org_temp-getrefwithprefix_git_refs_heads_master-3.json => listRefs/mappings/repos_hub4j-test-org_github-api_git_refs_heads-4.json} (50%) create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_github-api_git_refs_heads-5.json rename src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/{repos_hub4j-test-org_temp-listrefs-2.json => repos_hub4j-test-org_github-api_git_refs_heads_gh-7.json} (57%) create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_github-api_git_refs_heads_gh-pages-6.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_github-api_git_refs_headz-8.json diff --git a/src/main/java/org/kohsuke/github/GHRepository.java b/src/main/java/org/kohsuke/github/GHRepository.java index 67fca6424b..b1fd515b1e 100644 --- a/src/main/java/org/kohsuke/github/GHRepository.java +++ b/src/main/java/org/kohsuke/github/GHRepository.java @@ -1565,6 +1565,9 @@ public GHRef[] getRefs(String refType) throws IOException { * on failure communicating with GitHub, potentially due to an invalid ref type being requested */ public PagedIterable 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)); } @@ -1585,7 +1588,7 @@ public GHRef getRef(String refName) throws IOException { } return root.createRequest() - .withUrlPath(getApiTailUrl(String.format("git/refs/%s", refName))) + .withUrlPath(getApiTailUrl(String.format("git/ref/%s", refName))) .fetch(GHRef.class) .wrap(root); } diff --git a/src/test/java/org/kohsuke/github/GHRepositoryTest.java b/src/test/java/org/kohsuke/github/GHRepositoryTest.java index c0f62ca93c..7915239611 100644 --- a/src/test/java/org/kohsuke/github/GHRepositoryTest.java +++ b/src/test/java/org/kohsuke/github/GHRepositoryTest.java @@ -1,5 +1,6 @@ package org.kohsuke.github; +import com.fasterxml.jackson.databind.JsonMappingException; import org.apache.commons.io.IOUtils; import org.junit.Test; @@ -434,19 +435,92 @@ public void getRefsEmptyTags() throws Exception { @Test public void listRefs() throws Exception { - GHRepository repo = getTempRepository(); - List refs = repo.listRefs().toList(); - assertThat(refs, notNullValue()); - assertThat(refs.size(), equalTo(1)); - assertThat(refs.get(0).getRef(), equalTo("refs/heads/master")); + GHRepository repo = getRepository(); + + List ghRefs; + + // handle refs/* + ghRefs = repo.listRefs("heads").toList(); + List ghRefsWithPrefix = repo.listRefs("refs/heads").toList(); + + assertThat(ghRefs, notNullValue()); + assertThat(ghRefs.size(), greaterThan(3)); + assertThat(ghRefs.get(0).getRef(), equalTo("refs/heads/changes")); + assertThat(ghRefsWithPrefix.size(), equalTo(ghRefs.size())); + assertThat(ghRefsWithPrefix.get(0).getRef(), equalTo(ghRefs.get(0).getRef())); + + // git/refs/heads/gh-pages + // passing a specific ref to listRefs will fail to parse due to returning a single item not an array + try { + ghRefs = repo.listRefs("heads/gh-pages").toList(); + fail(); + } catch (Exception e) { + assertThat(e, instanceOf(HttpException.class)); + assertThat(e.getCause(), instanceOf(IOException.class)); + assertThat(e.getCause().getCause(), instanceOf(JsonMappingException.class)); + } + + // git/refs/heads/gh + ghRefs = repo.listRefs("heads/gh").toList(); + assertThat(ghRefs, notNullValue()); + assertThat(ghRefs.size(), equalTo(1)); + assertThat(ghRefs.get(0).getRef(), equalTo("refs/heads/gh-pages")); + + // git/refs/headz + try { + ghRefs = repo.listRefs("headz").toList(); + fail(); + } catch (Exception e) { + assertThat(e, instanceOf(GHFileNotFoundException.class)); + assertThat(e.getMessage(), + containsString( + "{\"message\":\"Not Found\",\"documentation_url\":\"https://developer.github.com/v3/git/refs/#get-a-reference\"}")); + assertThat(e.getCause(), instanceOf(FileNotFoundException.class)); + } } @Test - public void getRefWithPrefix() throws Exception { - GHRepository repo = getTempRepository(); - GHRef refWithoutPrefix = repo.getRef("heads/master"); - GHRef refWithPrefix = repo.getRef("refs/heads/master"); - assertThat(refWithoutPrefix.getRef(), equalTo(refWithPrefix.getRef())); + public void getRef() throws Exception { + GHRepository repo = getRepository(); + + GHRef ghRef; + + // handle refs/* + ghRef = repo.getRef("heads/gh-pages"); + GHRef ghRefWithPrefix = repo.getRef("refs/heads/gh-pages"); + + assertThat(ghRef, notNullValue()); + assertThat(ghRef.getRef(), equalTo("refs/heads/gh-pages")); + assertThat(ghRefWithPrefix.getRef(), equalTo(ghRef.getRef())); + + // git/refs/heads/gh-pages + ghRef = repo.getRef("heads/gh-pages"); + assertThat(ghRef, notNullValue()); + assertThat(ghRef.getRef(), equalTo("refs/heads/gh-pages")); + + // git/refs/heads/gh + try { + ghRef = repo.getRef("heads/gh"); + fail(); + } catch (Exception e) { + assertThat(e, instanceOf(GHFileNotFoundException.class)); + assertThat(e.getMessage(), + containsString( + "{\"message\":\"Not Found\",\"documentation_url\":\"https://developer.github.com/v3/git/refs/#get-a-single-reference\"}")); + assertThat(e.getCause(), instanceOf(FileNotFoundException.class)); + } + + // git/refs/headz + try { + ghRef = repo.getRef("headz"); + fail(); + } catch (Exception e) { + assertThat(e, instanceOf(GHFileNotFoundException.class)); + assertThat(e.getMessage(), + containsString( + "{\"message\":\"Not Found\",\"documentation_url\":\"https://developer.github.com/v3/git/refs/#get-a-single-reference\"}")); + assertThat(e.getCause(), instanceOf(FileNotFoundException.class)); + } } @Test diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRef/mappings/repos_jenkinsci_jenkins_git_refs_heads_master-3.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRef/mappings/repos_jenkinsci_jenkins_git_refs_heads_master-3.json index 29b0ac76ba..239511435e 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRef/mappings/repos_jenkinsci_jenkins_git_refs_heads_master-3.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRef/mappings/repos_jenkinsci_jenkins_git_refs_heads_master-3.json @@ -2,7 +2,7 @@ "id": "257aa346-b2fa-4808-a587-ce26a6859bf7", "name": "repos_jenkinsci_jenkins_git_refs_heads_master", "request": { - "url": "/repos/jenkinsci/jenkins/git/refs/heads/master", + "url": "/repos/jenkinsci/jenkins/git/ref/heads/master", "method": "GET", "headers": { "Accept": { diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/squashMerge/mappings/repos_hub4j-test-org_github-api_git_refs_heads_master-4.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/squashMerge/mappings/repos_hub4j-test-org_github-api_git_refs_heads_master-4.json index 006d3d89df..36f7316165 100644 --- a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/squashMerge/mappings/repos_hub4j-test-org_github-api_git_refs_heads_master-4.json +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/squashMerge/mappings/repos_hub4j-test-org_github-api_git_refs_heads_master-4.json @@ -2,7 +2,7 @@ "id": "7bfa9315-c036-44af-bc3c-1e639325a8fe", "name": "repos_hub4j-test-org_github-api_git_refs_heads_master", "request": { - "url": "/repos/hub4j-test-org/github-api/git/refs/heads/master", + "url": "/repos/hub4j-test-org/github-api/git/ref/heads/master", "method": "GET", "headers": { "Accept": { diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateContentSquashMerge/mappings/repos_hub4j-test-org_github-api_git_refs_heads_master-4.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateContentSquashMerge/mappings/repos_hub4j-test-org_github-api_git_refs_heads_master-4.json index 48acce4758..2691b9f10e 100644 --- a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateContentSquashMerge/mappings/repos_hub4j-test-org_github-api_git_refs_heads_master-4.json +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateContentSquashMerge/mappings/repos_hub4j-test-org_github-api_git_refs_heads_master-4.json @@ -2,7 +2,7 @@ "id": "fa77be60-4286-4610-bff6-3ab0bac74b1f", "name": "repos_hub4j-test-org_github-api_git_refs_heads_master", "request": { - "url": "/repos/hub4j-test-org/github-api/git/refs/heads/master", + "url": "/repos/hub4j-test-org/github-api/git/ref/heads/master", "method": "GET", "headers": { "Accept": { diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/__files/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/__files/orgs_hub4j-test-org-2.json new file mode 100644 index 0000000000..e079133f20 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/__files/orgs_hub4j-test-org-2.json @@ -0,0 +1,41 @@ +{ + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/hub4j-test-org", + "repos_url": "https://api.github.com/orgs/hub4j-test-org/repos", + "events_url": "https://api.github.com/orgs/hub4j-test-org/events", + "hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks", + "issues_url": "https://api.github.com/orgs/hub4j-test-org/issues", + "members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/hub4j-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 15, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/hub4j-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2020-05-15T15:14:14Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 148, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 10000, + "filled_seats": 17, + "seats": 3 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/__files/repos_hub4j-test-org_github-api-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/__files/repos_hub4j-test-org_github-api-3.json new file mode 100644 index 0000000000..6de56ef741 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/__files/repos_hub4j-test-org_github-api-3.json @@ -0,0 +1,332 @@ +{ + "id": 206888201, + "node_id": "MDEwOlJlcG9zaXRvcnkyMDY4ODgyMDE=", + "name": "github-api", + "full_name": "hub4j-test-org/github-api", + "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/github-api", + "description": "Tricky", + "fork": true, + "url": "https://api.github.com/repos/hub4j-test-org/github-api", + "forks_url": "https://api.github.com/repos/hub4j-test-org/github-api/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/github-api/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/github-api/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/github-api/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/github-api/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/github-api/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/github-api/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/github-api/deployments", + "created_at": "2019-09-06T23:26:04Z", + "updated_at": "2020-01-16T21:22:56Z", + "pushed_at": "2020-05-20T16:22:43Z", + "git_url": "git://github.com/hub4j-test-org/github-api.git", + "ssh_url": "git@github.com:hub4j-test-org/github-api.git", + "clone_url": "https://github.com/hub4j-test-org/github-api.git", + "svn_url": "https://github.com/hub4j-test-org/github-api", + "homepage": "http://github-api.kohsuke.org/", + "size": 19035, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Java", + "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": 5, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 0, + "open_issues": 5, + "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 + }, + "parent": { + "id": 617210, + "node_id": "MDEwOlJlcG9zaXRvcnk2MTcyMTA=", + "name": "github-api", + "full_name": "hub4j/github-api", + "private": false, + "owner": { + "login": "hub4j", + "id": 54909825, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", + "avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j", + "html_url": "https://github.com/hub4j", + "followers_url": "https://api.github.com/users/hub4j/followers", + "following_url": "https://api.github.com/users/hub4j/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j/orgs", + "repos_url": "https://api.github.com/users/hub4j/repos", + "events_url": "https://api.github.com/users/hub4j/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j/github-api", + "description": "Java API for GitHub", + "fork": false, + "url": "https://api.github.com/repos/hub4j/github-api", + "forks_url": "https://api.github.com/repos/hub4j/github-api/forks", + "keys_url": "https://api.github.com/repos/hub4j/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j/github-api/teams", + "hooks_url": "https://api.github.com/repos/hub4j/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j/github-api/events", + "assignees_url": "https://api.github.com/repos/hub4j/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j/github-api/tags", + "blobs_url": "https://api.github.com/repos/hub4j/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j/github-api/languages", + "stargazers_url": "https://api.github.com/repos/hub4j/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j/github-api/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j/github-api/subscription", + "commits_url": "https://api.github.com/repos/hub4j/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j/github-api/merges", + "archive_url": "https://api.github.com/repos/hub4j/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j/github-api/downloads", + "issues_url": "https://api.github.com/repos/hub4j/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j/github-api/deployments", + "created_at": "2010-04-19T04:13:03Z", + "updated_at": "2020-05-20T22:54:46Z", + "pushed_at": "2020-05-20T20:24:04Z", + "git_url": "git://github.com/hub4j/github-api.git", + "ssh_url": "git@github.com:hub4j/github-api.git", + "clone_url": "https://github.com/hub4j/github-api.git", + "svn_url": "https://github.com/hub4j/github-api", + "homepage": "https://github-api.kohsuke.org/", + "size": 23100, + "stargazers_count": 656, + "watchers_count": 656, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 478, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 67, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 478, + "open_issues": 67, + "watchers": 656, + "default_branch": "master" + }, + "source": { + "id": 617210, + "node_id": "MDEwOlJlcG9zaXRvcnk2MTcyMTA=", + "name": "github-api", + "full_name": "hub4j/github-api", + "private": false, + "owner": { + "login": "hub4j", + "id": 54909825, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", + "avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j", + "html_url": "https://github.com/hub4j", + "followers_url": "https://api.github.com/users/hub4j/followers", + "following_url": "https://api.github.com/users/hub4j/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j/orgs", + "repos_url": "https://api.github.com/users/hub4j/repos", + "events_url": "https://api.github.com/users/hub4j/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j/github-api", + "description": "Java API for GitHub", + "fork": false, + "url": "https://api.github.com/repos/hub4j/github-api", + "forks_url": "https://api.github.com/repos/hub4j/github-api/forks", + "keys_url": "https://api.github.com/repos/hub4j/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j/github-api/teams", + "hooks_url": "https://api.github.com/repos/hub4j/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j/github-api/events", + "assignees_url": "https://api.github.com/repos/hub4j/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j/github-api/tags", + "blobs_url": "https://api.github.com/repos/hub4j/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j/github-api/languages", + "stargazers_url": "https://api.github.com/repos/hub4j/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j/github-api/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j/github-api/subscription", + "commits_url": "https://api.github.com/repos/hub4j/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j/github-api/merges", + "archive_url": "https://api.github.com/repos/hub4j/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j/github-api/downloads", + "issues_url": "https://api.github.com/repos/hub4j/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j/github-api/deployments", + "created_at": "2010-04-19T04:13:03Z", + "updated_at": "2020-05-20T22:54:46Z", + "pushed_at": "2020-05-20T20:24:04Z", + "git_url": "git://github.com/hub4j/github-api.git", + "ssh_url": "git@github.com:hub4j/github-api.git", + "clone_url": "https://github.com/hub4j/github-api.git", + "svn_url": "https://github.com/hub4j/github-api", + "homepage": "https://github-api.kohsuke.org/", + "size": 23100, + "stargazers_count": 656, + "watchers_count": 656, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 478, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 67, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 478, + "open_issues": 67, + "watchers": 656, + "default_branch": "master" + }, + "network_count": 478, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/__files/repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-4.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/__files/repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-4.json new file mode 100644 index 0000000000..4ee5d7497d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/__files/repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-4.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/gh-pages", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvZ2gtcGFnZXM=", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/gh-pages", + "object": { + "sha": "4e64a0f9c3d561ab8587d2f7b03074b8745b5943", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/4e64a0f9c3d561ab8587d2f7b03074b8745b5943" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/__files/repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-5.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/__files/repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-5.json new file mode 100644 index 0000000000..4ee5d7497d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/__files/repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-5.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/gh-pages", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvZ2gtcGFnZXM=", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/gh-pages", + "object": { + "sha": "4e64a0f9c3d561ab8587d2f7b03074b8745b5943", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/4e64a0f9c3d561ab8587d2f7b03074b8745b5943" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/__files/repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-6.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/__files/repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-6.json new file mode 100644 index 0000000000..4ee5d7497d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/__files/repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-6.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/gh-pages", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvZ2gtcGFnZXM=", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/gh-pages", + "object": { + "sha": "4e64a0f9c3d561ab8587d2f7b03074b8745b5943", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/4e64a0f9c3d561ab8587d2f7b03074b8745b5943" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/__files/user-1.json new file mode 100644 index 0000000000..e4fc4d8657 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/__files/user-1.json @@ -0,0 +1,45 @@ +{ + "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": "https://twitter.com/bitwiseman", + "public_repos": 183, + "public_gists": 7, + "followers": 159, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-05-20T16:02:42Z", + "private_gists": 19, + "total_private_repos": 12, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/orgs_hub4j-test-org-2.json new file mode 100644 index 0000000000..6e0f796aa0 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/orgs_hub4j-test-org-2.json @@ -0,0 +1,47 @@ +{ + "id": "865b9946-8a74-4402-971b-ecd97db742e3", + "name": "orgs_hub4j-test-org", + "request": { + "url": "/orgs/hub4j-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_hub4j-test-org-2.json", + "headers": { + "Date": "Wed, 20 May 2020 23:48:56 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4952", + "X-RateLimit-Reset": "1590020148", + "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/\"de5da0827fbd925dd0dde9d2d6a85f45\"", + "Last-Modified": "Fri, 15 May 2020 15:14:14 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": "admin:org, read:org, repo, user, write:org", + "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": "EFC6:5429:F7742:126AA2:5EC5C1E7" + } + }, + "uuid": "865b9946-8a74-4402-971b-ecd97db742e3", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/repos_hub4j-test-org_github-api-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/repos_hub4j-test-org_github-api-3.json new file mode 100644 index 0000000000..1ddb2d64b8 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/repos_hub4j-test-org_github-api-3.json @@ -0,0 +1,47 @@ +{ + "id": "80b0a475-ed72-40f2-b701-80f014fd077a", + "name": "repos_hub4j-test-org_github-api", + "request": { + "url": "/repos/hub4j-test-org/github-api", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api-3.json", + "headers": { + "Date": "Wed, 20 May 2020 23:48:56 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4951", + "X-RateLimit-Reset": "1590020148", + "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/\"312e4c361c7730b8cbae6f074a82248e\"", + "Last-Modified": "Thu, 16 Jan 2020 21:22:56 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": "EFC6:5429:F774E:126AC9:5EC5C1E8" + } + }, + "uuid": "80b0a475-ed72-40f2-b701-80f014fd077a", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/repos_hub4j-test-org_github-api_git_ref_heads_gh-7.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/repos_hub4j-test-org_github-api_git_ref_heads_gh-7.json new file mode 100644 index 0000000000..a7ffd52662 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/repos_hub4j-test-org_github-api_git_ref_heads_gh-7.json @@ -0,0 +1,41 @@ +{ + "id": "019cbb3c-4211-4212-b6ff-fc2a505e4dd0", + "name": "repos_hub4j-test-org_github-api_git_ref_heads_gh", + "request": { + "url": "/repos/hub4j-test-org/github-api/git/ref/heads/gh", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 404, + "body": "{\"message\":\"Not Found\",\"documentation_url\":\"https://developer.github.com/v3/git/refs/#get-a-single-reference\"}", + "headers": { + "Date": "Wed, 20 May 2020 23:48:57 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "404 Not Found", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4947", + "X-RateLimit-Reset": "1590020149", + "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'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "X-GitHub-Request-Id": "EFC6:5429:F7779:126AFA:5EC5C1E9" + } + }, + "uuid": "019cbb3c-4211-4212-b6ff-fc2a505e4dd0", + "persistent": true, + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-4.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-4.json new file mode 100644 index 0000000000..d0aa194ccf --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-4.json @@ -0,0 +1,51 @@ +{ + "id": "e38154ef-90ed-42ea-92ca-5ad59a314955", + "name": "repos_hub4j-test-org_github-api_git_ref_heads_gh-pages", + "request": { + "url": "/repos/hub4j-test-org/github-api/git/ref/heads/gh-pages", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-4.json", + "headers": { + "Date": "Wed, 20 May 2020 23:48:56 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4950", + "X-RateLimit-Reset": "1590020148", + "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/\"1ab7db857cfacd7c05c569c1a71ecc8c\"", + "Last-Modified": "Thu, 16 Jan 2020 21:22:56 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": "EFC6:5429:F775F:126ADA:5EC5C1E8" + } + }, + "uuid": "e38154ef-90ed-42ea-92ca-5ad59a314955", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-github-api-git-ref-heads-gh-pages", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-repos-hub4j-test-org-github-api-git-ref-heads-gh-pages-2", + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-5.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-5.json new file mode 100644 index 0000000000..c2c9457224 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-5.json @@ -0,0 +1,51 @@ +{ + "id": "38be8b43-c558-4cc3-8376-a66dffd3a5a5", + "name": "repos_hub4j-test-org_github-api_git_ref_heads_gh-pages", + "request": { + "url": "/repos/hub4j-test-org/github-api/git/ref/heads/gh-pages", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-5.json", + "headers": { + "Date": "Wed, 20 May 2020 23:48:57 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4949", + "X-RateLimit-Reset": "1590020149", + "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/\"1ab7db857cfacd7c05c569c1a71ecc8c\"", + "Last-Modified": "Thu, 16 Jan 2020 21:22:56 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": "EFC6:5429:F7768:126AEA:5EC5C1E8" + } + }, + "uuid": "38be8b43-c558-4cc3-8376-a66dffd3a5a5", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-github-api-git-ref-heads-gh-pages", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-github-api-git-ref-heads-gh-pages-2", + "newScenarioState": "scenario-1-repos-hub4j-test-org-github-api-git-ref-heads-gh-pages-3", + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_temp-listrefs_git_refs-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-6.json similarity index 57% rename from src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_temp-listrefs_git_refs-3.json rename to src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-6.json index 85ec1e612b..702784e4e4 100644 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_temp-listrefs_git_refs-3.json +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-6.json @@ -1,8 +1,8 @@ { - "id": "efdb254c-0993-4b3e-8094-b67bb6261b43", - "name": "repos_hub4j-test-org_temp-listrefs_git_refs", + "id": "25200487-a320-4002-a107-fc566f1d1e0f", + "name": "repos_hub4j-test-org_github-api_git_ref_heads_gh-pages", "request": { - "url": "/repos/hub4j-test-org/temp-listRefs/git/refs", + "url": "/repos/hub4j-test-org/github-api/git/ref/heads/gh-pages", "method": "GET", "headers": { "Accept": { @@ -12,38 +12,39 @@ }, "response": { "status": 200, - "bodyFileName": "repos_hub4j-test-org_temp-listrefs_git_refs-3.json", + "bodyFileName": "repos_hub4j-test-org_github-api_git_ref_heads_gh-pages-6.json", "headers": { - "Date": "Fri, 10 Jan 2020 21:18:45 GMT", + "Date": "Wed, 20 May 2020 23:48:57 GMT", "Content-Type": "application/json; charset=utf-8", "Server": "GitHub.com", "Status": "200 OK", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4907", - "X-RateLimit-Reset": "1578694499", + "X-RateLimit-Remaining": "4948", + "X-RateLimit-Reset": "1590020149", "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/\"8b1d346181ca603baeb51ac7847b5553\"", - "Last-Modified": "Fri, 10 Jan 2020 21:18:44 GMT", + "ETag": "W/\"1ab7db857cfacd7c05c569c1a71ecc8c\"", + "Last-Modified": "Thu, 16 Jan 2020 21:22:56 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", - "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": "F689:89C6:A2C55F:C7906D:5E18EA35" + "X-GitHub-Request-Id": "EFC6:5429:F7772:126AF3:5EC5C1E9" } }, - "uuid": "efdb254c-0993-4b3e-8094-b67bb6261b43", + "uuid": "25200487-a320-4002-a107-fc566f1d1e0f", "persistent": true, - "insertionIndex": 3 + "scenarioName": "scenario-1-repos-hub4j-test-org-github-api-git-ref-heads-gh-pages", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-github-api-git-ref-heads-gh-pages-3", + "insertionIndex": 6 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/repos_hub4j-test-org_github-api_git_ref_headz-8.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/repos_hub4j-test-org_github-api_git_ref_headz-8.json new file mode 100644 index 0000000000..a0f0a874e3 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/repos_hub4j-test-org_github-api_git_ref_headz-8.json @@ -0,0 +1,41 @@ +{ + "id": "17df7473-29a2-4ad8-ba4d-ed5d5ff2305e", + "name": "repos_hub4j-test-org_github-api_git_ref_headz", + "request": { + "url": "/repos/hub4j-test-org/github-api/git/ref/headz", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 404, + "body": "{\"message\":\"Not Found\",\"documentation_url\":\"https://developer.github.com/v3/git/refs/#get-a-single-reference\"}", + "headers": { + "Date": "Wed, 20 May 2020 23:48:57 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "404 Not Found", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4946", + "X-RateLimit-Reset": "1590020148", + "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'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "X-GitHub-Request-Id": "EFC6:5429:F7782:126B08:5EC5C1E9" + } + }, + "uuid": "17df7473-29a2-4ad8-ba4d-ed5d5ff2305e", + "persistent": true, + "insertionIndex": 8 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/user-1.json similarity index 62% rename from src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/mappings/user-1.json rename to src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/user-1.json index 6dcc448118..7082756e48 100644 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/mappings/user-1.json +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRef/mappings/user-1.json @@ -1,5 +1,5 @@ { - "id": "06d4bd1a-8415-401c-b3a5-efd5fe6e19e8", + "id": "f0825cda-4a2e-408c-8fbb-9358156de5b1", "name": "user", "request": { "url": "/user", @@ -14,21 +14,22 @@ "status": 200, "bodyFileName": "user-1.json", "headers": { - "Date": "Sun, 05 Apr 2020 16:39:16 GMT", + "Date": "Wed, 20 May 2020 23:48:55 GMT", "Content-Type": "application/json; charset=utf-8", "Server": "GitHub.com", "Status": "200 OK", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4812", - "X-RateLimit-Reset": "1586107929", + "X-RateLimit-Remaining": "4954", + "X-RateLimit-Reset": "1590020148", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": [ "Accept, Authorization, Cookie, X-GitHub-OTP", - "Accept-Encoding, Accept, X-Requested-With" + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" ], - "ETag": "W/\"1897f380310d09efda5bcab7775c207d\"", - "Last-Modified": "Sun, 05 Apr 2020 03:19:50 GMT", - "X-OAuth-Scopes": "admin:org, admin:repo_hook, delete_repo, gist, repo", + "ETag": "W/\"12430b620554d3ea3486a0972ee86bc8\"", + "Last-Modified": "Wed, 20 May 2020 16:02:42 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", @@ -37,10 +38,10 @@ "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": "B856:3D6D:5131E3:5C56F7:5E8A09B4" + "X-GitHub-Request-Id": "EFC6:5429:F7724:126A9A:5EC5C1E7" } }, - "uuid": "06d4bd1a-8415-401c-b3a5-efd5fe6e19e8", + "uuid": "f0825cda-4a2e-408c-8fbb-9358156de5b1", "persistent": true, "insertionIndex": 1 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/__files/repos_hub4j-test-org_temp-getrefwithprefix-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/__files/repos_hub4j-test-org_temp-getrefwithprefix-2.json deleted file mode 100644 index 11053c7baa..0000000000 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/__files/repos_hub4j-test-org_temp-getrefwithprefix-2.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "id": 253282149, - "node_id": "MDEwOlJlcG9zaXRvcnkyNTMyODIxNDk=", - "name": "temp-getRefWithPrefix", - "full_name": "hub4j-test-org/temp-getRefWithPrefix", - "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-getRefWithPrefix", - "description": "A test repository for testing the github-api project: temp-getRefWithPrefix", - "fork": false, - "url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix", - "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/forks", - "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/teams", - "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/hooks", - "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/issues/events{/number}", - "events_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/events", - "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/assignees{/user}", - "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/branches{/branch}", - "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/tags", - "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/statuses/{sha}", - "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/languages", - "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/stargazers", - "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/contributors", - "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/subscribers", - "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/subscription", - "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/contents/{+path}", - "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/merges", - "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/downloads", - "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/issues{/number}", - "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/pulls{/number}", - "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/milestones{/number}", - "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/labels{/name}", - "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/releases{/id}", - "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/deployments", - "created_at": "2020-04-05T16:39:17Z", - "updated_at": "2020-04-05T16:39:21Z", - "pushed_at": "2020-04-05T16:39:19Z", - "git_url": "git://github.com/hub4j-test-org/temp-getRefWithPrefix.git", - "ssh_url": "git@github.com:hub4j-test-org/temp-getRefWithPrefix.git", - "clone_url": "https://github.com/hub4j-test-org/temp-getRefWithPrefix.git", - "svn_url": "https://github.com/hub4j-test-org/temp-getRefWithPrefix", - "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": 7 -} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/__files/repos_hub4j-test-org_temp-getrefwithprefix_git_refs_heads_master-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/__files/repos_hub4j-test-org_temp-getrefwithprefix_git_refs_heads_master-3.json deleted file mode 100644 index 1d0c966037..0000000000 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/__files/repos_hub4j-test-org_temp-getrefwithprefix_git_refs_heads_master-3.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "ref": "refs/heads/master", - "node_id": "MDM6UmVmMjUzMjgyMTQ5Om1hc3Rlcg==", - "url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/git/refs/heads/master", - "object": { - "sha": "6d0ef2a84df4eb5222d9d1ff14203713f1833771", - "type": "commit", - "url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/git/commits/6d0ef2a84df4eb5222d9d1ff14203713f1833771" - } -} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/__files/repos_hub4j-test-org_temp-getrefwithprefix_git_refs_heads_master-4.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/__files/repos_hub4j-test-org_temp-getrefwithprefix_git_refs_heads_master-4.json deleted file mode 100644 index 1d0c966037..0000000000 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/__files/repos_hub4j-test-org_temp-getrefwithprefix_git_refs_heads_master-4.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "ref": "refs/heads/master", - "node_id": "MDM6UmVmMjUzMjgyMTQ5Om1hc3Rlcg==", - "url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/git/refs/heads/master", - "object": { - "sha": "6d0ef2a84df4eb5222d9d1ff14203713f1833771", - "type": "commit", - "url": "https://api.github.com/repos/hub4j-test-org/temp-getRefWithPrefix/git/commits/6d0ef2a84df4eb5222d9d1ff14203713f1833771" - } -} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/__files/user-1.json deleted file mode 100644 index dddc4d0c73..0000000000 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/__files/user-1.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "login": "martinvanzijl", - "id": 24422213, - "node_id": "MDQ6VXNlcjI0NDIyMjEz", - "avatar_url": "https://avatars0.githubusercontent.com/u/24422213?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/martinvanzijl", - "html_url": "https://github.com/martinvanzijl", - "followers_url": "https://api.github.com/users/martinvanzijl/followers", - "following_url": "https://api.github.com/users/martinvanzijl/following{/other_user}", - "gists_url": "https://api.github.com/users/martinvanzijl/gists{/gist_id}", - "starred_url": "https://api.github.com/users/martinvanzijl/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/martinvanzijl/subscriptions", - "organizations_url": "https://api.github.com/users/martinvanzijl/orgs", - "repos_url": "https://api.github.com/users/martinvanzijl/repos", - "events_url": "https://api.github.com/users/martinvanzijl/events{/privacy}", - "received_events_url": "https://api.github.com/users/martinvanzijl/received_events", - "type": "User", - "site_admin": false, - "name": "Martin van Zijl", - "company": null, - "blog": "", - "location": null, - "email": null, - "hireable": true, - "bio": "My strongest language is C++, but I also know C, Java, Python and SQL.", - "public_repos": 15, - "public_gists": 0, - "followers": 3, - "following": 0, - "created_at": "2016-12-07T00:18:58Z", - "updated_at": "2020-04-05T03:19:50Z" -} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/mappings/repos_hub4j-test-org_temp-getrefwithprefix_git_refs_heads_master-4.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/mappings/repos_hub4j-test-org_temp-getrefwithprefix_git_refs_heads_master-4.json deleted file mode 100644 index 8372bd883e..0000000000 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/mappings/repos_hub4j-test-org_temp-getrefwithprefix_git_refs_heads_master-4.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "id": "10ebc76b-e6fe-4b0c-b544-55730bee8809", - "name": "repos_hub4j-test-org_temp-getrefwithprefix_git_refs_heads_master", - "request": { - "url": "/repos/hub4j-test-org/temp-getRefWithPrefix/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-getrefwithprefix_git_refs_heads_master-4.json", - "headers": { - "Date": "Sun, 05 Apr 2020 16:39:24 GMT", - "Content-Type": "application/json; charset=utf-8", - "Server": "GitHub.com", - "Status": "200 OK", - "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4805", - "X-RateLimit-Reset": "1586107930", - "Cache-Control": "private, max-age=60, s-maxage=60", - "Vary": [ - "Accept, Authorization, Cookie, X-GitHub-OTP", - "Accept-Encoding, Accept, X-Requested-With" - ], - "ETag": "W/\"94a0e0fde791301d3625ecb33739e457\"", - "Last-Modified": "Sun, 05 Apr 2020 16:39:21 GMT", - "X-Poll-Interval": "300", - "X-OAuth-Scopes": "admin:org, admin:repo_hook, delete_repo, gist, repo", - "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": "B856:3D6D:513353:5C5876:5E8A09BB" - } - }, - "uuid": "10ebc76b-e6fe-4b0c-b544-55730bee8809", - "persistent": true, - "scenarioName": "scenario-1-repos-hub4j-test-org-temp-getRefWithPrefix-git-refs-heads-master", - "requiredScenarioState": "scenario-1-repos-hub4j-test-org-temp-getRefWithPrefix-git-refs-heads-master-2", - "insertionIndex": 4 -} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/orgs_hub4j-test-org-2.json new file mode 100644 index 0000000000..e079133f20 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/orgs_hub4j-test-org-2.json @@ -0,0 +1,41 @@ +{ + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/hub4j-test-org", + "repos_url": "https://api.github.com/orgs/hub4j-test-org/repos", + "events_url": "https://api.github.com/orgs/hub4j-test-org/events", + "hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks", + "issues_url": "https://api.github.com/orgs/hub4j-test-org/issues", + "members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/hub4j-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 15, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/hub4j-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2020-05-15T15:14:14Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 148, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 10000, + "filled_seats": 17, + "seats": 3 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_github-api-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_github-api-3.json new file mode 100644 index 0000000000..6de56ef741 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_github-api-3.json @@ -0,0 +1,332 @@ +{ + "id": 206888201, + "node_id": "MDEwOlJlcG9zaXRvcnkyMDY4ODgyMDE=", + "name": "github-api", + "full_name": "hub4j-test-org/github-api", + "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/github-api", + "description": "Tricky", + "fork": true, + "url": "https://api.github.com/repos/hub4j-test-org/github-api", + "forks_url": "https://api.github.com/repos/hub4j-test-org/github-api/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/github-api/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/github-api/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/github-api/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/github-api/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/github-api/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/github-api/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/github-api/deployments", + "created_at": "2019-09-06T23:26:04Z", + "updated_at": "2020-01-16T21:22:56Z", + "pushed_at": "2020-05-20T16:22:43Z", + "git_url": "git://github.com/hub4j-test-org/github-api.git", + "ssh_url": "git@github.com:hub4j-test-org/github-api.git", + "clone_url": "https://github.com/hub4j-test-org/github-api.git", + "svn_url": "https://github.com/hub4j-test-org/github-api", + "homepage": "http://github-api.kohsuke.org/", + "size": 19035, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Java", + "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": 5, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 0, + "open_issues": 5, + "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 + }, + "parent": { + "id": 617210, + "node_id": "MDEwOlJlcG9zaXRvcnk2MTcyMTA=", + "name": "github-api", + "full_name": "hub4j/github-api", + "private": false, + "owner": { + "login": "hub4j", + "id": 54909825, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", + "avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j", + "html_url": "https://github.com/hub4j", + "followers_url": "https://api.github.com/users/hub4j/followers", + "following_url": "https://api.github.com/users/hub4j/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j/orgs", + "repos_url": "https://api.github.com/users/hub4j/repos", + "events_url": "https://api.github.com/users/hub4j/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j/github-api", + "description": "Java API for GitHub", + "fork": false, + "url": "https://api.github.com/repos/hub4j/github-api", + "forks_url": "https://api.github.com/repos/hub4j/github-api/forks", + "keys_url": "https://api.github.com/repos/hub4j/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j/github-api/teams", + "hooks_url": "https://api.github.com/repos/hub4j/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j/github-api/events", + "assignees_url": "https://api.github.com/repos/hub4j/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j/github-api/tags", + "blobs_url": "https://api.github.com/repos/hub4j/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j/github-api/languages", + "stargazers_url": "https://api.github.com/repos/hub4j/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j/github-api/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j/github-api/subscription", + "commits_url": "https://api.github.com/repos/hub4j/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j/github-api/merges", + "archive_url": "https://api.github.com/repos/hub4j/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j/github-api/downloads", + "issues_url": "https://api.github.com/repos/hub4j/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j/github-api/deployments", + "created_at": "2010-04-19T04:13:03Z", + "updated_at": "2020-05-20T22:54:46Z", + "pushed_at": "2020-05-20T20:24:04Z", + "git_url": "git://github.com/hub4j/github-api.git", + "ssh_url": "git@github.com:hub4j/github-api.git", + "clone_url": "https://github.com/hub4j/github-api.git", + "svn_url": "https://github.com/hub4j/github-api", + "homepage": "https://github-api.kohsuke.org/", + "size": 23100, + "stargazers_count": 656, + "watchers_count": 656, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 478, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 67, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 478, + "open_issues": 67, + "watchers": 656, + "default_branch": "master" + }, + "source": { + "id": 617210, + "node_id": "MDEwOlJlcG9zaXRvcnk2MTcyMTA=", + "name": "github-api", + "full_name": "hub4j/github-api", + "private": false, + "owner": { + "login": "hub4j", + "id": 54909825, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", + "avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j", + "html_url": "https://github.com/hub4j", + "followers_url": "https://api.github.com/users/hub4j/followers", + "following_url": "https://api.github.com/users/hub4j/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j/orgs", + "repos_url": "https://api.github.com/users/hub4j/repos", + "events_url": "https://api.github.com/users/hub4j/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j/github-api", + "description": "Java API for GitHub", + "fork": false, + "url": "https://api.github.com/repos/hub4j/github-api", + "forks_url": "https://api.github.com/repos/hub4j/github-api/forks", + "keys_url": "https://api.github.com/repos/hub4j/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j/github-api/teams", + "hooks_url": "https://api.github.com/repos/hub4j/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j/github-api/events", + "assignees_url": "https://api.github.com/repos/hub4j/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j/github-api/tags", + "blobs_url": "https://api.github.com/repos/hub4j/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j/github-api/languages", + "stargazers_url": "https://api.github.com/repos/hub4j/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j/github-api/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j/github-api/subscription", + "commits_url": "https://api.github.com/repos/hub4j/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j/github-api/merges", + "archive_url": "https://api.github.com/repos/hub4j/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j/github-api/downloads", + "issues_url": "https://api.github.com/repos/hub4j/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j/github-api/deployments", + "created_at": "2010-04-19T04:13:03Z", + "updated_at": "2020-05-20T22:54:46Z", + "pushed_at": "2020-05-20T20:24:04Z", + "git_url": "git://github.com/hub4j/github-api.git", + "ssh_url": "git@github.com:hub4j/github-api.git", + "clone_url": "https://github.com/hub4j/github-api.git", + "svn_url": "https://github.com/hub4j/github-api", + "homepage": "https://github-api.kohsuke.org/", + "size": 23100, + "stargazers_count": 656, + "watchers_count": 656, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 478, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 67, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 478, + "open_issues": 67, + "watchers": 656, + "default_branch": "master" + }, + "network_count": 478, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_github-api_git_refs_heads-4.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_github-api_git_refs_heads-4.json new file mode 100644 index 0000000000..519bb0592e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_github-api_git_refs_heads-4.json @@ -0,0 +1,102 @@ +[ + { + "ref": "refs/heads/changes", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvY2hhbmdlcw==", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/changes", + "object": { + "sha": "1393706f1364742defbc28ba459082630ca979af", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/1393706f1364742defbc28ba459082630ca979af" + } + }, + { + "ref": "refs/heads/gh-pages", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvZ2gtcGFnZXM=", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/gh-pages", + "object": { + "sha": "4e64a0f9c3d561ab8587d2f7b03074b8745b5943", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/4e64a0f9c3d561ab8587d2f7b03074b8745b5943" + } + }, + { + "ref": "refs/heads/master", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvbWFzdGVy", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/master", + "object": { + "sha": "8051615eff597f4e49f4f47625e6fc2b49f26bfc", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/8051615eff597f4e49f4f47625e6fc2b49f26bfc" + } + }, + { + "ref": "refs/heads/test/#UrlEncode", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvdGVzdC8jVXJsRW5jb2Rl", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/test/%23UrlEncode", + "object": { + "sha": "14fa3698221f91613b9e1d809434326e5ed546af", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/14fa3698221f91613b9e1d809434326e5ed546af" + } + }, + { + "ref": "refs/heads/test/mergeable_branch", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvdGVzdC9tZXJnZWFibGVfYnJhbmNo", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/test/mergeable_branch", + "object": { + "sha": "b036909fcf45565c82c888ee326ebd0e382f6173", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/b036909fcf45565c82c888ee326ebd0e382f6173" + } + }, + { + "ref": "refs/heads/test/rc", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvdGVzdC9yYw==", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/test/rc", + "object": { + "sha": "14fa3698221f91613b9e1d809434326e5ed546af", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/14fa3698221f91613b9e1d809434326e5ed546af" + } + }, + { + "ref": "refs/heads/test/squashMerge", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvdGVzdC9zcXVhc2hNZXJnZQ==", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/test/squashMerge", + "object": { + "sha": "80902706c65747f9d8a7dbf82c451658efe2516d", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/80902706c65747f9d8a7dbf82c451658efe2516d" + } + }, + { + "ref": "refs/heads/test/stable", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvdGVzdC9zdGFibGU=", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/test/stable", + "object": { + "sha": "1f40fdf4acf1adb246c109c21a22f617e4bd1ca8", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/1f40fdf4acf1adb246c109c21a22f617e4bd1ca8" + } + }, + { + "ref": "refs/heads/test/unmergeable", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvdGVzdC91bm1lcmdlYWJsZQ==", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/test/unmergeable", + "object": { + "sha": "d4080cf9e2fa0959966d201f3dd60105fdf5bd97", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/d4080cf9e2fa0959966d201f3dd60105fdf5bd97" + } + }, + { + "ref": "refs/heads/test/updateContentSquashMerge", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvdGVzdC91cGRhdGVDb250ZW50U3F1YXNoTWVyZ2U=", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/test/updateContentSquashMerge", + "object": { + "sha": "36526be0a94e2d315c30379c7a561b1f7125a35f", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/36526be0a94e2d315c30379c7a561b1f7125a35f" + } + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_github-api_git_refs_heads-5.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_github-api_git_refs_heads-5.json new file mode 100644 index 0000000000..519bb0592e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_github-api_git_refs_heads-5.json @@ -0,0 +1,102 @@ +[ + { + "ref": "refs/heads/changes", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvY2hhbmdlcw==", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/changes", + "object": { + "sha": "1393706f1364742defbc28ba459082630ca979af", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/1393706f1364742defbc28ba459082630ca979af" + } + }, + { + "ref": "refs/heads/gh-pages", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvZ2gtcGFnZXM=", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/gh-pages", + "object": { + "sha": "4e64a0f9c3d561ab8587d2f7b03074b8745b5943", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/4e64a0f9c3d561ab8587d2f7b03074b8745b5943" + } + }, + { + "ref": "refs/heads/master", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvbWFzdGVy", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/master", + "object": { + "sha": "8051615eff597f4e49f4f47625e6fc2b49f26bfc", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/8051615eff597f4e49f4f47625e6fc2b49f26bfc" + } + }, + { + "ref": "refs/heads/test/#UrlEncode", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvdGVzdC8jVXJsRW5jb2Rl", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/test/%23UrlEncode", + "object": { + "sha": "14fa3698221f91613b9e1d809434326e5ed546af", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/14fa3698221f91613b9e1d809434326e5ed546af" + } + }, + { + "ref": "refs/heads/test/mergeable_branch", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvdGVzdC9tZXJnZWFibGVfYnJhbmNo", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/test/mergeable_branch", + "object": { + "sha": "b036909fcf45565c82c888ee326ebd0e382f6173", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/b036909fcf45565c82c888ee326ebd0e382f6173" + } + }, + { + "ref": "refs/heads/test/rc", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvdGVzdC9yYw==", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/test/rc", + "object": { + "sha": "14fa3698221f91613b9e1d809434326e5ed546af", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/14fa3698221f91613b9e1d809434326e5ed546af" + } + }, + { + "ref": "refs/heads/test/squashMerge", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvdGVzdC9zcXVhc2hNZXJnZQ==", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/test/squashMerge", + "object": { + "sha": "80902706c65747f9d8a7dbf82c451658efe2516d", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/80902706c65747f9d8a7dbf82c451658efe2516d" + } + }, + { + "ref": "refs/heads/test/stable", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvdGVzdC9zdGFibGU=", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/test/stable", + "object": { + "sha": "1f40fdf4acf1adb246c109c21a22f617e4bd1ca8", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/1f40fdf4acf1adb246c109c21a22f617e4bd1ca8" + } + }, + { + "ref": "refs/heads/test/unmergeable", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvdGVzdC91bm1lcmdlYWJsZQ==", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/test/unmergeable", + "object": { + "sha": "d4080cf9e2fa0959966d201f3dd60105fdf5bd97", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/d4080cf9e2fa0959966d201f3dd60105fdf5bd97" + } + }, + { + "ref": "refs/heads/test/updateContentSquashMerge", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvdGVzdC91cGRhdGVDb250ZW50U3F1YXNoTWVyZ2U=", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/test/updateContentSquashMerge", + "object": { + "sha": "36526be0a94e2d315c30379c7a561b1f7125a35f", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/36526be0a94e2d315c30379c7a561b1f7125a35f" + } + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_github-api_git_refs_heads_gh-7.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_github-api_git_refs_heads_gh-7.json new file mode 100644 index 0000000000..a63324fb61 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_github-api_git_refs_heads_gh-7.json @@ -0,0 +1,12 @@ +[ + { + "ref": "refs/heads/gh-pages", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvZ2gtcGFnZXM=", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/gh-pages", + "object": { + "sha": "4e64a0f9c3d561ab8587d2f7b03074b8745b5943", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/4e64a0f9c3d561ab8587d2f7b03074b8745b5943" + } + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_github-api_git_refs_heads_gh-pages-6.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_github-api_git_refs_heads_gh-pages-6.json new file mode 100644 index 0000000000..4ee5d7497d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_github-api_git_refs_heads_gh-pages-6.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/gh-pages", + "node_id": "MDM6UmVmMjA2ODg4MjAxOnJlZnMvaGVhZHMvZ2gtcGFnZXM=", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs/heads/gh-pages", + "object": { + "sha": "4e64a0f9c3d561ab8587d2f7b03074b8745b5943", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits/4e64a0f9c3d561ab8587d2f7b03074b8745b5943" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_temp-listrefs-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_temp-listrefs-2.json deleted file mode 100644 index 803817c200..0000000000 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_temp-listrefs-2.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "id": 233132022, - "node_id": "MDEwOlJlcG9zaXRvcnkyMzMxMzIwMjI=", - "name": "temp-listRefs", - "full_name": "hub4j-test-org/temp-listRefs", - "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-listRefs", - "description": "A test repository for testing the github-api project: temp-listRefs", - "fork": false, - "url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs", - "forks_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/forks", - "keys_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/teams", - "hooks_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/hooks", - "issue_events_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/issues/events{/number}", - "events_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/events", - "assignees_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/assignees{/user}", - "branches_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/branches{/branch}", - "tags_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/tags", - "blobs_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/statuses/{sha}", - "languages_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/languages", - "stargazers_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/stargazers", - "contributors_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/contributors", - "subscribers_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/subscribers", - "subscription_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/subscription", - "commits_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/contents/{+path}", - "compare_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/merges", - "archive_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/downloads", - "issues_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/issues{/number}", - "pulls_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/pulls{/number}", - "milestones_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/milestones{/number}", - "notifications_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/labels{/name}", - "releases_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/releases{/id}", - "deployments_url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/deployments", - "created_at": "2020-01-10T21:18:40Z", - "updated_at": "2020-01-10T21:18:44Z", - "pushed_at": "2020-01-10T21:18:42Z", - "git_url": "git://github.com/hub4j-test-org/temp-listRefs.git", - "ssh_url": "git@github.com:hub4j-test-org/temp-listRefs.git", - "clone_url": "https://github.com/hub4j-test-org/temp-listRefs.git", - "svn_url": "https://github.com/hub4j-test-org/temp-listRefs", - "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": 6 -} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_temp-listrefs_git_refs-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_temp-listrefs_git_refs-3.json deleted file mode 100644 index 1f5442581d..0000000000 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/repos_hub4j-test-org_temp-listrefs_git_refs-3.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "ref": "refs/heads/master", - "node_id": "MDM6UmVmMjMzMTMyMDIyOm1hc3Rlcg==", - "url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/git/refs/heads/master", - "object": { - "sha": "18f0346af2da2c3256c5b1efb7933bd497ea3aa6", - "type": "commit", - "url": "https://api.github.com/repos/hub4j-test-org/temp-listRefs/git/commits/18f0346af2da2c3256c5b1efb7933bd497ea3aa6" - } - } -] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/user-1.json index 0ee306c97e..e4fc4d8657 100644 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/user-1.json +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/__files/user-1.json @@ -24,14 +24,14 @@ "email": "bitwiseman@gmail.com", "hireable": null, "bio": "https://twitter.com/bitwiseman", - "public_repos": 178, + "public_repos": 183, "public_gists": 7, - "followers": 144, + "followers": 159, "following": 9, "created_at": "2012-07-11T20:38:33Z", - "updated_at": "2020-01-09T03:28:39Z", - "private_gists": 7, - "total_private_repos": 10, + "updated_at": "2020-05-20T16:02:42Z", + "private_gists": 19, + "total_private_repos": 12, "owned_private_repos": 0, "disk_usage": 33697, "collaborators": 0, diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/orgs_hub4j-test-org-2.json new file mode 100644 index 0000000000..acfdc6bbba --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/orgs_hub4j-test-org-2.json @@ -0,0 +1,47 @@ +{ + "id": "e7d412e7-52ee-4820-9a7b-f03438e032fb", + "name": "orgs_hub4j-test-org", + "request": { + "url": "/orgs/hub4j-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_hub4j-test-org-2.json", + "headers": { + "Date": "Thu, 21 May 2020 00:01:19 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4927", + "X-RateLimit-Reset": "1590020149", + "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/\"de5da0827fbd925dd0dde9d2d6a85f45\"", + "Last-Modified": "Fri, 15 May 2020 15:14:14 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": "admin:org, read:org, repo, user, write:org", + "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": "F020:533D:1B062:214B3:5EC5C4CE" + } + }, + "uuid": "e7d412e7-52ee-4820-9a7b-f03438e032fb", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/mappings/repos_hub4j-test-org_temp-getrefwithprefix-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_github-api-3.json similarity index 54% rename from src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/mappings/repos_hub4j-test-org_temp-getrefwithprefix-2.json rename to src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_github-api-3.json index bd28194949..2dd1e76f90 100644 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/mappings/repos_hub4j-test-org_temp-getrefwithprefix-2.json +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_github-api-3.json @@ -1,8 +1,8 @@ { - "id": "21815889-8806-4388-8794-8d1c45a4331c", - "name": "repos_hub4j-test-org_temp-getrefwithprefix", + "id": "2566ff9b-e3b9-4819-9103-74a9c8d67bc0", + "name": "repos_hub4j-test-org_github-api", "request": { - "url": "/repos/hub4j-test-org/temp-getRefWithPrefix", + "url": "/repos/hub4j-test-org/github-api", "method": "GET", "headers": { "Accept": { @@ -12,23 +12,24 @@ }, "response": { "status": 200, - "bodyFileName": "repos_hub4j-test-org_temp-getrefwithprefix-2.json", + "bodyFileName": "repos_hub4j-test-org_github-api-3.json", "headers": { - "Date": "Sun, 05 Apr 2020 16:39:23 GMT", + "Date": "Thu, 21 May 2020 00:01:19 GMT", "Content-Type": "application/json; charset=utf-8", "Server": "GitHub.com", "Status": "200 OK", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4807", - "X-RateLimit-Reset": "1586107929", + "X-RateLimit-Remaining": "4926", + "X-RateLimit-Reset": "1590020148", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": [ "Accept, Authorization, Cookie, X-GitHub-OTP", - "Accept-Encoding, Accept, X-Requested-With" + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" ], - "ETag": "W/\"627ee081300bc1b81768415662402fb4\"", - "Last-Modified": "Sun, 05 Apr 2020 16:39:21 GMT", - "X-OAuth-Scopes": "admin:org, admin:repo_hook, delete_repo, gist, repo", + "ETag": "W/\"312e4c361c7730b8cbae6f074a82248e\"", + "Last-Modified": "Thu, 16 Jan 2020 21:22:56 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", @@ -37,10 +38,10 @@ "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": "B856:3D6D:513335:5C5706:5E8A09B4" + "X-GitHub-Request-Id": "F020:533D:1B065:214B6:5EC5C4CF" } }, - "uuid": "21815889-8806-4388-8794-8d1c45a4331c", + "uuid": "2566ff9b-e3b9-4819-9103-74a9c8d67bc0", "persistent": true, - "insertionIndex": 2 + "insertionIndex": 3 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/mappings/repos_hub4j-test-org_temp-getrefwithprefix_git_refs_heads_master-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_github-api_git_refs_heads-4.json similarity index 50% rename from src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/mappings/repos_hub4j-test-org_temp-getrefwithprefix_git_refs_heads_master-3.json rename to src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_github-api_git_refs_heads-4.json index 11e80f3885..44beb7b5a2 100644 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getRefWithPrefix/mappings/repos_hub4j-test-org_temp-getrefwithprefix_git_refs_heads_master-3.json +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_github-api_git_refs_heads-4.json @@ -1,8 +1,8 @@ { - "id": "376d4598-61d9-4379-bd13-16a70c8b49ac", - "name": "repos_hub4j-test-org_temp-getrefwithprefix_git_refs_heads_master", + "id": "40a78e64-129b-473f-bdd1-f7f5471cc2a8", + "name": "repos_hub4j-test-org_github-api_git_refs_heads", "request": { - "url": "/repos/hub4j-test-org/temp-getRefWithPrefix/git/refs/heads/master", + "url": "/repos/hub4j-test-org/github-api/git/refs/heads", "method": "GET", "headers": { "Accept": { @@ -12,24 +12,25 @@ }, "response": { "status": 200, - "bodyFileName": "repos_hub4j-test-org_temp-getrefwithprefix_git_refs_heads_master-3.json", + "bodyFileName": "repos_hub4j-test-org_github-api_git_refs_heads-4.json", "headers": { - "Date": "Sun, 05 Apr 2020 16:39:23 GMT", + "Date": "Thu, 21 May 2020 00:01:19 GMT", "Content-Type": "application/json; charset=utf-8", "Server": "GitHub.com", "Status": "200 OK", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4806", - "X-RateLimit-Reset": "1586107929", + "X-RateLimit-Remaining": "4925", + "X-RateLimit-Reset": "1590020148", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": [ "Accept, Authorization, Cookie, X-GitHub-OTP", - "Accept-Encoding, Accept, X-Requested-With" + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" ], - "ETag": "W/\"94a0e0fde791301d3625ecb33739e457\"", - "Last-Modified": "Sun, 05 Apr 2020 16:39:21 GMT", + "ETag": "W/\"a9f5e1ba57020a2637f5d1564b4b8e60\"", + "Last-Modified": "Wed, 20 May 2020 00:06:59 GMT", "X-Poll-Interval": "300", - "X-OAuth-Scopes": "admin:org, admin:repo_hook, delete_repo, gist, repo", + "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", @@ -38,13 +39,13 @@ "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": "B856:3D6D:513345:5C5868:5E8A09BB" + "X-GitHub-Request-Id": "F020:533D:1B068:214BA:5EC5C4CF" } }, - "uuid": "376d4598-61d9-4379-bd13-16a70c8b49ac", + "uuid": "40a78e64-129b-473f-bdd1-f7f5471cc2a8", "persistent": true, - "scenarioName": "scenario-1-repos-hub4j-test-org-temp-getRefWithPrefix-git-refs-heads-master", + "scenarioName": "scenario-1-repos-hub4j-test-org-github-api-git-refs-heads", "requiredScenarioState": "Started", - "newScenarioState": "scenario-1-repos-hub4j-test-org-temp-getRefWithPrefix-git-refs-heads-master-2", - "insertionIndex": 3 + "newScenarioState": "scenario-1-repos-hub4j-test-org-github-api-git-refs-heads-2", + "insertionIndex": 4 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_github-api_git_refs_heads-5.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_github-api_git_refs_heads-5.json new file mode 100644 index 0000000000..8ae6cd7e33 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_github-api_git_refs_heads-5.json @@ -0,0 +1,50 @@ +{ + "id": "73a1fb9a-fc80-4b13-98e7-2059d6cc3a49", + "name": "repos_hub4j-test-org_github-api_git_refs_heads", + "request": { + "url": "/repos/hub4j-test-org/github-api/git/refs/heads", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api_git_refs_heads-5.json", + "headers": { + "Date": "Thu, 21 May 2020 00:01:19 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4924", + "X-RateLimit-Reset": "1590020148", + "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/\"a9f5e1ba57020a2637f5d1564b4b8e60\"", + "Last-Modified": "Wed, 20 May 2020 00:06:59 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": "F020:533D:1B06B:214BD:5EC5C4CF" + } + }, + "uuid": "73a1fb9a-fc80-4b13-98e7-2059d6cc3a49", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-github-api-git-refs-heads", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-github-api-git-refs-heads-2", + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_temp-listrefs-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_github-api_git_refs_heads_gh-7.json similarity index 57% rename from src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_temp-listrefs-2.json rename to src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_github-api_git_refs_heads_gh-7.json index eb7256dd3d..663476d15c 100644 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_temp-listrefs-2.json +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_github-api_git_refs_heads_gh-7.json @@ -1,8 +1,8 @@ { - "id": "368c90b4-cb7c-45c8-aca0-2c5c02456d2a", - "name": "repos_hub4j-test-org_temp-listrefs", + "id": "d7c5941a-83ca-4a46-9ece-2e19d0cf979b", + "name": "repos_hub4j-test-org_github-api_git_refs_heads_gh", "request": { - "url": "/repos/hub4j-test-org/temp-listRefs", + "url": "/repos/hub4j-test-org/github-api/git/refs/heads/gh", "method": "GET", "headers": { "Accept": { @@ -12,37 +12,37 @@ }, "response": { "status": 200, - "bodyFileName": "repos_hub4j-test-org_temp-listrefs-2.json", + "bodyFileName": "repos_hub4j-test-org_github-api_git_refs_heads_gh-7.json", "headers": { - "Date": "Fri, 10 Jan 2020 21:18:45 GMT", + "Date": "Thu, 21 May 2020 00:01:20 GMT", "Content-Type": "application/json; charset=utf-8", "Server": "GitHub.com", "Status": "200 OK", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4908", - "X-RateLimit-Reset": "1578694499", + "X-RateLimit-Remaining": "4922", + "X-RateLimit-Reset": "1590020149", "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/\"96960adedc08c2d2187e0fab6aa8cd24\"", - "Last-Modified": "Fri, 10 Jan 2020 21:18:44 GMT", + "ETag": "W/\"aa03a3ba0ec8d4fa83439f8d4390fa91\"", + "Last-Modified": "Thu, 16 Jan 2020 21:22:56 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", - "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": "F689:89C6:A2C550:C78F1A:5E18EA2F" + "X-GitHub-Request-Id": "F020:533D:1B070:214C3:5EC5C4D0" } }, - "uuid": "368c90b4-cb7c-45c8-aca0-2c5c02456d2a", + "uuid": "d7c5941a-83ca-4a46-9ece-2e19d0cf979b", "persistent": true, - "insertionIndex": 2 + "insertionIndex": 7 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_github-api_git_refs_heads_gh-pages-6.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_github-api_git_refs_heads_gh-pages-6.json new file mode 100644 index 0000000000..463dde529d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_github-api_git_refs_heads_gh-pages-6.json @@ -0,0 +1,48 @@ +{ + "id": "2a9ad6b7-2a1c-490e-b9ee-b0dfa943f6b1", + "name": "repos_hub4j-test-org_github-api_git_refs_heads_gh-pages", + "request": { + "url": "/repos/hub4j-test-org/github-api/git/refs/heads/gh-pages", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api_git_refs_heads_gh-pages-6.json", + "headers": { + "Date": "Thu, 21 May 2020 00:01:20 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4923", + "X-RateLimit-Reset": "1590020149", + "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/\"1ab7db857cfacd7c05c569c1a71ecc8c\"", + "Last-Modified": "Thu, 16 Jan 2020 21:22:56 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": "F020:533D:1B06D:214C0:5EC5C4CF" + } + }, + "uuid": "2a9ad6b7-2a1c-490e-b9ee-b0dfa943f6b1", + "persistent": true, + "insertionIndex": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_github-api_git_refs_headz-8.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_github-api_git_refs_headz-8.json new file mode 100644 index 0000000000..c6fef5128e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/repos_hub4j-test-org_github-api_git_refs_headz-8.json @@ -0,0 +1,41 @@ +{ + "id": "e2304750-88cc-4ead-b32b-1eaa03db25fa", + "name": "repos_hub4j-test-org_github-api_git_refs_headz", + "request": { + "url": "/repos/hub4j-test-org/github-api/git/refs/headz", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 404, + "body": "{\"message\":\"Not Found\",\"documentation_url\":\"https://developer.github.com/v3/git/refs/#get-a-reference\"}", + "headers": { + "Date": "Thu, 21 May 2020 00:01:20 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "404 Not Found", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4921", + "X-RateLimit-Reset": "1590020149", + "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'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "X-GitHub-Request-Id": "F020:533D:1B072:214C5:5EC5C4D0" + } + }, + "uuid": "e2304750-88cc-4ead-b32b-1eaa03db25fa", + "persistent": true, + "insertionIndex": 8 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/user-1.json index 4bd8100144..7aa93d9a73 100644 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/user-1.json +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listRefs/mappings/user-1.json @@ -1,5 +1,5 @@ { - "id": "b4ac1b5e-eecc-4844-b014-67e67c77fb7a", + "id": "ece1df9e-c115-4d14-9438-e4a62fcabb7a", "name": "user", "request": { "url": "/user", @@ -14,35 +14,34 @@ "status": 200, "bodyFileName": "user-1.json", "headers": { - "Date": "Fri, 10 Jan 2020 21:18:39 GMT", + "Date": "Thu, 21 May 2020 00:01:18 GMT", "Content-Type": "application/json; charset=utf-8", "Server": "GitHub.com", "Status": "200 OK", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4913", - "X-RateLimit-Reset": "1578694499", + "X-RateLimit-Remaining": "4929", + "X-RateLimit-Reset": "1590020149", "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/\"3125f2b9cabf1f8acc420ee197db0f97\"", - "Last-Modified": "Thu, 09 Jan 2020 03:28:39 GMT", + "ETag": "W/\"12430b620554d3ea3486a0972ee86bc8\"", + "Last-Modified": "Wed, 20 May 2020 16:02:42 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": "F689:89C6:A2C440:C78F12:5E18EA2F" + "X-GitHub-Request-Id": "F020:533D:1B060:214B2:5EC5C4CE" } }, - "uuid": "b4ac1b5e-eecc-4844-b014-67e67c77fb7a", + "uuid": "ece1df9e-c115-4d14-9438-e4a62fcabb7a", "persistent": true, "insertionIndex": 1 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHTreeBuilderTest/wiremock/testAdd/mappings/repos_hub4j-test-org_ghtreebuildertest_git_refs_heads_master-3.json b/src/test/resources/org/kohsuke/github/GHTreeBuilderTest/wiremock/testAdd/mappings/repos_hub4j-test-org_ghtreebuildertest_git_refs_heads_master-3.json index d7447a661f..681ee0c94e 100644 --- a/src/test/resources/org/kohsuke/github/GHTreeBuilderTest/wiremock/testAdd/mappings/repos_hub4j-test-org_ghtreebuildertest_git_refs_heads_master-3.json +++ b/src/test/resources/org/kohsuke/github/GHTreeBuilderTest/wiremock/testAdd/mappings/repos_hub4j-test-org_ghtreebuildertest_git_refs_heads_master-3.json @@ -2,7 +2,7 @@ "id": "add23dfd-74f9-452c-8986-0a80d2f6cbec", "name": "repos_hub4j-test-org_ghtreebuildertest_git_refs_heads_master", "request": { - "url": "/repos/hub4j-test-org/GHTreeBuilderTest/git/refs/heads/master", + "url": "/repos/hub4j-test-org/GHTreeBuilderTest/git/ref/heads/master", "method": "GET", "headers": { "Accept": { diff --git a/src/test/resources/org/kohsuke/github/GHTreeBuilderTest/wiremock/testShaEntry/mappings/repos_hub4j-test-org_ghtreebuildertest_git_refs_heads_master-3.json b/src/test/resources/org/kohsuke/github/GHTreeBuilderTest/wiremock/testShaEntry/mappings/repos_hub4j-test-org_ghtreebuildertest_git_refs_heads_master-3.json index 12e509daa8..c361654ccc 100644 --- a/src/test/resources/org/kohsuke/github/GHTreeBuilderTest/wiremock/testShaEntry/mappings/repos_hub4j-test-org_ghtreebuildertest_git_refs_heads_master-3.json +++ b/src/test/resources/org/kohsuke/github/GHTreeBuilderTest/wiremock/testShaEntry/mappings/repos_hub4j-test-org_ghtreebuildertest_git_refs_heads_master-3.json @@ -2,7 +2,7 @@ "id": "683572f1-512c-4a6f-b766-7447ed7908fe", "name": "repos_hub4j-test-org_ghtreebuildertest_git_refs_heads_master", "request": { - "url": "/repos/hub4j-test-org/GHTreeBuilderTest/git/refs/heads/master", + "url": "/repos/hub4j-test-org/GHTreeBuilderTest/git/ref/heads/master", "method": "GET", "headers": { "Accept": { diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-10.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-10.json index 9792976882..1d73b6fead 100644 --- a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-10.json +++ b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-10.json @@ -2,7 +2,7 @@ "id": "05226cf4-38e0-4cd4-82b6-b18cc720267b", "name": "repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache", "request": { - "url": "/repos/hub4j-test-org/github-api/git/refs/heads/test/content_ref_cache", + "url": "/repos/hub4j-test-org/github-api/git/ref/heads/test/content_ref_cache", "method": "GET", "headers": { "Cache-Control": { diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-11.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-11.json index 8a3ed8e089..7800964d8a 100644 --- a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-11.json +++ b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-11.json @@ -2,7 +2,7 @@ "id": "6e1f9524-6de8-4bb4-bad7-babdf5bb6015", "name": "repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache", "request": { - "url": "/repos/hub4j-test-org/github-api/git/refs/heads/test/content_ref_cache", + "url": "/repos/hub4j-test-org/github-api/git/ref/heads/test/content_ref_cache", "method": "GET", "headers": { "If-Modified-Since": { diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-13.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-13.json index ace5c60deb..ab09bc1ec3 100644 --- a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-13.json +++ b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-13.json @@ -2,7 +2,7 @@ "id": "60a34226-e65e-40f5-982e-8ee51627b8eb", "name": "repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache", "request": { - "url": "/repos/hub4j-test-org/github-api/git/refs/heads/test/content_ref_cache", + "url": "/repos/hub4j-test-org/github-api/git/ref/heads/test/content_ref_cache", "method": "GET", "headers": { "If-Modified-Since": { diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-14.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-14.json index bd486a0dd4..b4a09cdd3d 100644 --- a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-14.json +++ b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-14.json @@ -2,7 +2,7 @@ "id": "709410bf-7c2e-48fa-92a7-f493ffbe7262", "name": "repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache", "request": { - "url": "/repos/hub4j-test-org/github-api/git/refs/heads/test/content_ref_cache", + "url": "/repos/hub4j-test-org/github-api/git/ref/heads/test/content_ref_cache", "method": "GET", "headers": { "Cache-Control": { diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-15.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-15.json index 6bb9de6da8..b572bc2f13 100644 --- a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-15.json +++ b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-15.json @@ -2,7 +2,7 @@ "id": "eea55a5c-27a5-448a-a51f-097a78fcc884", "name": "repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache", "request": { - "url": "/repos/hub4j-test-org/github-api/git/refs/heads/test/content_ref_cache", + "url": "/repos/hub4j-test-org/github-api/git/ref/heads/test/content_ref_cache", "method": "GET", "headers": { "If-None-Match": { diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-7.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-7.json index e88f261f88..5eedca35fa 100644 --- a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-7.json +++ b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-7.json @@ -2,7 +2,7 @@ "id": "3964781d-6074-412b-bb7a-f3de1bd9ca9c", "name": "repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache", "request": { - "url": "/repos/hub4j-test-org/github-api/git/refs/heads/test/content_ref_cache", + "url": "/repos/hub4j-test-org/github-api/git/ref/heads/test/content_ref_cache", "method": "GET", "headers": { "Cache-Control": { diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-8.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-8.json index a56170fbe7..cd8617af97 100644 --- a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-8.json +++ b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache-8.json @@ -2,7 +2,7 @@ "id": "4506da20-fd38-4c44-a4de-99242417e735", "name": "repos_hub4j-test-org_github-api_git_refs_heads_test_content_ref_cache", "request": { - "url": "/repos/hub4j-test-org/github-api/git/refs/heads/test/content_ref_cache", + "url": "/repos/hub4j-test-org/github-api/git/ref/heads/test/content_ref_cache", "method": "GET", "headers": { "If-None-Match": { diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_unmergeable-5.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_unmergeable-5.json index 488a6fb96e..05a91ae3d8 100644 --- a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_unmergeable-5.json +++ b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_hub4j-test-org_github-api_git_refs_heads_test_unmergeable-5.json @@ -2,7 +2,7 @@ "id": "d47b333a-351b-499c-866b-11122bd52803", "name": "repos_hub4j-test-org_github-api_git_refs_heads_test_unmergeable", "request": { - "url": "/repos/hub4j-test-org/github-api/git/refs/heads/test/unmergeable", + "url": "/repos/hub4j-test-org/github-api/git/ref/heads/test/unmergeable", "method": "GET", "headers": { "Cache-Control": {