diff --git a/src/main/java/org/kohsuke/github/GHPullRequest.java b/src/main/java/org/kohsuke/github/GHPullRequest.java index 824050c07d..c63e7b7eb0 100644 --- a/src/main/java/org/kohsuke/github/GHPullRequest.java +++ b/src/main/java/org/kohsuke/github/GHPullRequest.java @@ -37,6 +37,7 @@ import javax.annotation.CheckForNull; +import static org.kohsuke.github.Previews.LYDIAN; import static org.kohsuke.github.Previews.SHADOW_CAT; /** @@ -565,6 +566,41 @@ public void requestTeamReviewers(List teams) throws IOException { .send(); } + /** + * Set the base branch on the pull request + * + * @param newBaseBranch + * the name of the new base branch + * @throws IOException + * the io exception + * @return the updated pull request + */ + public GHPullRequest setBaseBranch(String newBaseBranch) throws IOException { + return root.createRequest() + .method("PATCH") + .with("base", newBaseBranch) + .withUrlPath(getApiRoute()) + .fetch(GHPullRequest.class) + .wrapUp(root); + } + + /** + * Updates the branch. The same as pressing the button in the web GUI. + * + * @throws IOException + * the io exception + */ + @Preview + @Deprecated + public void updateBranch() throws IOException { + root.createRequest() + .withPreview(LYDIAN) + .method("PUT") + .with("expected_head_sha", head.getSha()) + .withUrlPath(getApiRoute() + "/update-branch") + .send(); + } + /** * Merge this pull request. *

diff --git a/src/main/java/org/kohsuke/github/Previews.java b/src/main/java/org/kohsuke/github/Previews.java index a50425f470..5af2cfa4b4 100644 --- a/src/main/java/org/kohsuke/github/Previews.java +++ b/src/main/java/org/kohsuke/github/Previews.java @@ -44,6 +44,13 @@ class Previews { */ static final String INERTIA = "application/vnd.github.inertia-preview+json"; + /** + * Update a pull request branch + * + * @see GitHub API Previews + */ + static final String LYDIAN = "application/vnd.github.lydian-preview+json"; + /** * Require multiple approving reviews * diff --git a/src/test/java/org/kohsuke/github/GHPullRequestTest.java b/src/test/java/org/kohsuke/github/GHPullRequestTest.java index 1ed8f0742b..1c985ce085 100644 --- a/src/test/java/org/kohsuke/github/GHPullRequestTest.java +++ b/src/test/java/org/kohsuke/github/GHPullRequestTest.java @@ -211,6 +211,106 @@ public void mergeCommitSHA() throws Exception { fail(); } + @Test + public void setBaseBranch() throws Exception { + String prName = "testSetBaseBranch"; + String originalBaseBranch = "master"; + String newBaseBranch = "gh-pages"; + + GHPullRequest pullRequest = getRepository().createPullRequest(prName, "test/stable", "master", "## test"); + + assertEquals("Pull request base branch is supposed to be " + originalBaseBranch, + originalBaseBranch, + pullRequest.getBase().getRef()); + + GHPullRequest responsePullRequest = pullRequest.setBaseBranch(newBaseBranch); + + assertEquals("Pull request base branch is supposed to be " + newBaseBranch, + newBaseBranch, + responsePullRequest.getBase().getRef()); + } + + @Test + public void setBaseBranchNonExisting() throws Exception { + String prName = "testSetBaseBranchNonExisting"; + String originalBaseBranch = "master"; + String newBaseBranch = "non-existing"; + + GHPullRequest pullRequest = getRepository().createPullRequest(prName, "test/stable", "master", "## test"); + + assertEquals("Pull request base branch is supposed to be " + originalBaseBranch, + originalBaseBranch, + pullRequest.getBase().getRef()); + + try { + pullRequest.setBaseBranch(newBaseBranch); + } catch (HttpException e) { + assertThat(e, instanceOf(HttpException.class)); + assertThat(e.toString(), containsString("Proposed base branch 'non-existing' was not found")); + } + + pullRequest.close(); + } + + @Test + public void updateOutdatedBranchesUnexpectedHead() throws Exception { + String prName = "testUpdateOutdatedBranches"; + String outdatedRefName = "refs/heads/outdated"; + GHRepository repository = gitHub.getOrganization("hub4j-test-org").getRepository("updateOutdatedBranches"); + + GHRef outdatedRef = repository.getRef(outdatedRefName); + outdatedRef.updateTo("6440189369f9f33b2366556a94dbc26f2cfdd969", true); + + GHPullRequest outdatedPullRequest = repository.createPullRequest(prName, "outdated", "master", "## test"); + + do { + Thread.sleep(5000); + outdatedPullRequest.refresh(); + } while (outdatedPullRequest.getMergeableState().equalsIgnoreCase("unknown")); + + assertEquals("Pull request is supposed to be not up to date", + "behind", + outdatedPullRequest.getMergeableState()); + + outdatedRef.updateTo("f567328eb81270487864963b7d7446953353f2b5", true); + + try { + outdatedPullRequest.updateBranch(); + } catch (HttpException e) { + assertThat(e, instanceOf(HttpException.class)); + assertThat(e.toString(), containsString("expected head sha didn’t match current head ref.")); + } + + outdatedPullRequest.close(); + } + + @Test + public void updateOutdatedBranches() throws Exception { + String prName = "testUpdateOutdatedBranches"; + String outdatedRefName = "refs/heads/outdated"; + GHRepository repository = gitHub.getOrganization("hub4j-test-org").getRepository("updateOutdatedBranches"); + + repository.getRef(outdatedRefName).updateTo("6440189369f9f33b2366556a94dbc26f2cfdd969", true); + + GHPullRequest outdatedPullRequest = repository.createPullRequest(prName, "outdated", "master", "## test"); + + do { + Thread.sleep(5000); + outdatedPullRequest.refresh(); + } while (outdatedPullRequest.getMergeableState().equalsIgnoreCase("unknown")); + + assertEquals("Pull request is supposed to be not up to date", + "behind", + outdatedPullRequest.getMergeableState()); + + outdatedPullRequest.updateBranch(); + outdatedPullRequest.refresh(); + + assertNotEquals("Pull request is supposed to be up to date", "behind", outdatedPullRequest.getMergeableState()); + + outdatedPullRequest.close(); + } + @Test public void squashMerge() throws Exception { String name = "squashMerge"; diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranch/__files/orgs_hub4j-test-org-1.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranch/__files/orgs_hub4j-test-org-1.json new file mode 100644 index 0000000000..7d3839a85a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranch/__files/orgs_hub4j-test-org-1.json @@ -0,0 +1,47 @@ +{ + "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": "Hub4j Test Org Description (this could be null or blank too)", + "name": "Hub4j Test Org Name (this could be null or blank too)", + "company": null, + "blog": "https://hub4j.url.io/could/be/null", + "location": "Hub4j Test Org Location (this could be null or blank too)", + "email": "hub4jtestorgemail@could.be.null.com", + "twitter_username": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 13, + "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-06-04T05:56:10Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 149, + "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": 18, + "seats": 3 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranch/__files/repos_hub4j-test-org_github-api-2.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranch/__files/repos_hub4j-test-org_github-api-2.json new file mode 100644 index 0000000000..6488d9c479 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranch/__files/repos_hub4j-test-org_github-api-2.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": "Resetting", + "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-06-10T23:27:59Z", + "pushed_at": "2020-09-03T19:05:11Z", + "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": 19052, + "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-09-02T08:21:30Z", + "pushed_at": "2020-08-27T16:32:20Z", + "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": 25224, + "stargazers_count": 697, + "watchers_count": 697, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 497, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 74, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 497, + "open_issues": 74, + "watchers": 697, + "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-09-02T08:21:30Z", + "pushed_at": "2020-08-27T16:32:20Z", + "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": 25224, + "stargazers_count": 697, + "watchers_count": 697, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 497, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 74, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 497, + "open_issues": 74, + "watchers": 697, + "default_branch": "master" + }, + "network_count": 497, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranch/__files/repos_hub4j-test-org_github-api_pulls-3.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranch/__files/repos_hub4j-test-org_github-api_pulls-3.json new file mode 100644 index 0000000000..c640e08721 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranch/__files/repos_hub4j-test-org_github-api_pulls-3.json @@ -0,0 +1,341 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/382", + "id": 478836622, + "node_id": "MDExOlB1bGxSZXF1ZXN0NDc4ODM2NjIy", + "html_url": "https://github.com/hub4j-test-org/github-api/pull/382", + "diff_url": "https://github.com/hub4j-test-org/github-api/pull/382.diff", + "patch_url": "https://github.com/hub4j-test-org/github-api/pull/382.patch", + "issue_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/382", + "number": 382, + "state": "open", + "locked": false, + "title": "testSetBaseBranch", + "user": { + "login": "tginiotis-at-work", + "id": 61763026, + "node_id": "MDQ6VXNlcjYxNzYzMDI2", + "avatar_url": "https://avatars3.githubusercontent.com/u/61763026?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/tginiotis-at-work", + "html_url": "https://github.com/tginiotis-at-work", + "followers_url": "https://api.github.com/users/tginiotis-at-work/followers", + "following_url": "https://api.github.com/users/tginiotis-at-work/following{/other_user}", + "gists_url": "https://api.github.com/users/tginiotis-at-work/gists{/gist_id}", + "starred_url": "https://api.github.com/users/tginiotis-at-work/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/tginiotis-at-work/subscriptions", + "organizations_url": "https://api.github.com/users/tginiotis-at-work/orgs", + "repos_url": "https://api.github.com/users/tginiotis-at-work/repos", + "events_url": "https://api.github.com/users/tginiotis-at-work/events{/privacy}", + "received_events_url": "https://api.github.com/users/tginiotis-at-work/received_events", + "type": "User", + "site_admin": false + }, + "body": "## test", + "created_at": "2020-09-03T19:05:16Z", + "updated_at": "2020-09-03T19:05:16Z", + "closed_at": null, + "merged_at": null, + "merge_commit_sha": null, + "assignee": null, + "assignees": [], + "requested_reviewers": [], + "requested_teams": [], + "labels": [], + "milestone": null, + "draft": false, + "commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/382/commits", + "review_comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/382/comments", + "review_comment_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/382/comments", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/1f40fdf4acf1adb246c109c21a22f617e4bd1ca8", + "head": { + "label": "hub4j-test-org:test/stable", + "ref": "test/stable", + "sha": "1f40fdf4acf1adb246c109c21a22f617e4bd1ca8", + "user": { + "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 + }, + "repo": { + "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": "Resetting", + "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-06-10T23:27:59Z", + "pushed_at": "2020-09-03T19:05:11Z", + "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": 19052, + "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": 6, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 0, + "open_issues": 6, + "watchers": 0, + "default_branch": "master" + } + }, + "base": { + "label": "hub4j-test-org:master", + "ref": "master", + "sha": "8051615eff597f4e49f4f47625e6fc2b49f26bfc", + "user": { + "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 + }, + "repo": { + "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": "Resetting", + "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-06-10T23:27:59Z", + "pushed_at": "2020-09-03T19:05:11Z", + "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": 19052, + "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": 6, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 0, + "open_issues": 6, + "watchers": 0, + "default_branch": "master" + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/382" + }, + "html": { + "href": "https://github.com/hub4j-test-org/github-api/pull/382" + }, + "issue": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/issues/382" + }, + "comments": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/issues/382/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/382/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/382/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/1f40fdf4acf1adb246c109c21a22f617e4bd1ca8" + } + }, + "author_association": "MEMBER", + "active_lock_reason": null, + "merged": false, + "mergeable": null, + "rebaseable": null, + "mergeable_state": "unknown", + "merged_by": null, + "comments": 0, + "review_comments": 0, + "maintainer_can_modify": false, + "commits": 2, + "additions": 2, + "deletions": 1, + "changed_files": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranch/__files/repos_hub4j-test-org_github-api_pulls_382-4.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranch/__files/repos_hub4j-test-org_github-api_pulls_382-4.json new file mode 100644 index 0000000000..99967a1bed --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranch/__files/repos_hub4j-test-org_github-api_pulls_382-4.json @@ -0,0 +1,341 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/382", + "id": 478836622, + "node_id": "MDExOlB1bGxSZXF1ZXN0NDc4ODM2NjIy", + "html_url": "https://github.com/hub4j-test-org/github-api/pull/382", + "diff_url": "https://github.com/hub4j-test-org/github-api/pull/382.diff", + "patch_url": "https://github.com/hub4j-test-org/github-api/pull/382.patch", + "issue_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/382", + "number": 382, + "state": "closed", + "locked": false, + "title": "testSetBaseBranch", + "user": { + "login": "tginiotis-at-work", + "id": 61763026, + "node_id": "MDQ6VXNlcjYxNzYzMDI2", + "avatar_url": "https://avatars3.githubusercontent.com/u/61763026?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/tginiotis-at-work", + "html_url": "https://github.com/tginiotis-at-work", + "followers_url": "https://api.github.com/users/tginiotis-at-work/followers", + "following_url": "https://api.github.com/users/tginiotis-at-work/following{/other_user}", + "gists_url": "https://api.github.com/users/tginiotis-at-work/gists{/gist_id}", + "starred_url": "https://api.github.com/users/tginiotis-at-work/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/tginiotis-at-work/subscriptions", + "organizations_url": "https://api.github.com/users/tginiotis-at-work/orgs", + "repos_url": "https://api.github.com/users/tginiotis-at-work/repos", + "events_url": "https://api.github.com/users/tginiotis-at-work/events{/privacy}", + "received_events_url": "https://api.github.com/users/tginiotis-at-work/received_events", + "type": "User", + "site_admin": false + }, + "body": "## test", + "created_at": "2020-09-03T19:05:16Z", + "updated_at": "2020-09-03T19:05:17Z", + "closed_at": "2020-09-03T19:05:17Z", + "merged_at": null, + "merge_commit_sha": null, + "assignee": null, + "assignees": [], + "requested_reviewers": [], + "requested_teams": [], + "labels": [], + "milestone": null, + "draft": false, + "commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/382/commits", + "review_comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/382/comments", + "review_comment_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/382/comments", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/1f40fdf4acf1adb246c109c21a22f617e4bd1ca8", + "head": { + "label": "hub4j-test-org:test/stable", + "ref": "test/stable", + "sha": "1f40fdf4acf1adb246c109c21a22f617e4bd1ca8", + "user": { + "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 + }, + "repo": { + "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": "Resetting", + "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-06-10T23:27:59Z", + "pushed_at": "2020-09-03T19:05:17Z", + "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": 19052, + "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" + } + }, + "base": { + "label": "hub4j-test-org:gh-pages", + "ref": "gh-pages", + "sha": "4e64a0f9c3d561ab8587d2f7b03074b8745b5943", + "user": { + "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 + }, + "repo": { + "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": "Resetting", + "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-06-10T23:27:59Z", + "pushed_at": "2020-09-03T19:05:17Z", + "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": 19052, + "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" + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/382" + }, + "html": { + "href": "https://github.com/hub4j-test-org/github-api/pull/382" + }, + "issue": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/issues/382" + }, + "comments": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/issues/382/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/382/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/382/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/1f40fdf4acf1adb246c109c21a22f617e4bd1ca8" + } + }, + "author_association": "MEMBER", + "active_lock_reason": null, + "merged": false, + "mergeable": null, + "rebaseable": null, + "mergeable_state": "unknown", + "merged_by": null, + "comments": 0, + "review_comments": 0, + "maintainer_can_modify": false, + "commits": 1264, + "additions": 1, + "deletions": 0, + "changed_files": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranch/mappings/orgs_hub4j-test-org-1.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranch/mappings/orgs_hub4j-test-org-1.json new file mode 100644 index 0000000000..51ee7a9f19 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranch/mappings/orgs_hub4j-test-org-1.json @@ -0,0 +1,46 @@ +{ + "id": "40fe5545-9264-4abb-9cab-71c7a5b37c52", + "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-1.json", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:15 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"ea860001e36aab2981aba60cd49099af\"", + "Last-Modified": "Thu, 04 Jun 2020 05:56:10 GMT", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4687", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "313", + "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": "C854:5E45:B304F97:D8254A3:5F513E6B" + } + }, + "uuid": "40fe5545-9264-4abb-9cab-71c7a5b37c52", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranch/mappings/repos_hub4j-test-org_github-api-2.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranch/mappings/repos_hub4j-test-org_github-api-2.json new file mode 100644 index 0000000000..aff8f6aa31 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranch/mappings/repos_hub4j-test-org_github-api-2.json @@ -0,0 +1,46 @@ +{ + "id": "e8734346-0815-4895-8d0c-99b4808df22c", + "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-2.json", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:16 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"f27d2455c716470093a73afb89734afd\"", + "Last-Modified": "Wed, 10 Jun 2020 23:27:59 GMT", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4686", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "314", + "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": "C854:5E45:B304FE3:D8254E1:5F513E6B" + } + }, + "uuid": "e8734346-0815-4895-8d0c-99b4808df22c", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranch/mappings/repos_hub4j-test-org_github-api_pulls-3.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranch/mappings/repos_hub4j-test-org_github-api_pulls-3.json new file mode 100644 index 0000000000..548504deab --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranch/mappings/repos_hub4j-test-org_github-api_pulls-3.json @@ -0,0 +1,53 @@ +{ + "id": "c873b298-53af-4eaa-8081-fd4bdb624a9c", + "name": "repos_hub4j-test-org_github-api_pulls", + "request": { + "url": "/repos/hub4j-test-org/github-api/pulls", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.shadow-cat-preview+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"head\":\"test/stable\",\"draft\":false,\"maintainer_can_modify\":true,\"title\":\"testSetBaseBranch\",\"body\":\"## test\",\"base\":\"master\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_hub4j-test-org_github-api_pulls-3.json", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:17 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "201 Created", + "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": "\"8641f2585239d74c44c1bb85ec9e74b2\"", + "Location": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/382", + "X-GitHub-Media-Type": "github.v3; param=shadow-cat-preview; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4685", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "315", + "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": "C854:5E45:B305038:D82554B:5F513E6C" + } + }, + "uuid": "c873b298-53af-4eaa-8081-fd4bdb624a9c", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranch/mappings/repos_hub4j-test-org_github-api_pulls_382-4.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranch/mappings/repos_hub4j-test-org_github-api_pulls_382-4.json new file mode 100644 index 0000000000..a9bc819b8f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranch/mappings/repos_hub4j-test-org_github-api_pulls_382-4.json @@ -0,0 +1,52 @@ +{ + "id": "586e28d1-fa1e-4182-bd02-3b87cb4b8ca6", + "name": "repos_hub4j-test-org_github-api_pulls_382", + "request": { + "url": "/repos/hub4j-test-org/github-api/pulls/382", + "method": "PATCH", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"base\":\"gh-pages\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api_pulls_382-4.json", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:18 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"93324937ab36aaa1004ca898abca48e0\"", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4684", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "316", + "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": "C854:5E45:B305146:D825675:5F513E6D" + } + }, + "uuid": "586e28d1-fa1e-4182-bd02-3b87cb4b8ca6", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/__files/orgs_hub4j-test-org-1.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/__files/orgs_hub4j-test-org-1.json new file mode 100644 index 0000000000..7d3839a85a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/__files/orgs_hub4j-test-org-1.json @@ -0,0 +1,47 @@ +{ + "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": "Hub4j Test Org Description (this could be null or blank too)", + "name": "Hub4j Test Org Name (this could be null or blank too)", + "company": null, + "blog": "https://hub4j.url.io/could/be/null", + "location": "Hub4j Test Org Location (this could be null or blank too)", + "email": "hub4jtestorgemail@could.be.null.com", + "twitter_username": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 13, + "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-06-04T05:56:10Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 149, + "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": 18, + "seats": 3 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/__files/repos_hub4j-test-org_github-api-2.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/__files/repos_hub4j-test-org_github-api-2.json new file mode 100644 index 0000000000..dd92bb7d66 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/__files/repos_hub4j-test-org_github-api-2.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": "Resetting", + "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-06-10T23:27:59Z", + "pushed_at": "2020-09-03T18:57:10Z", + "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": 19052, + "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-09-02T08:21:30Z", + "pushed_at": "2020-08-27T16:32:20Z", + "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": 25224, + "stargazers_count": 697, + "watchers_count": 697, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 497, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 74, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 497, + "open_issues": 74, + "watchers": 697, + "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-09-02T08:21:30Z", + "pushed_at": "2020-08-27T16:32:20Z", + "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": 25224, + "stargazers_count": 697, + "watchers_count": 697, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 497, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 74, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 497, + "open_issues": 74, + "watchers": 697, + "default_branch": "master" + }, + "network_count": 497, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/__files/repos_hub4j-test-org_github-api_pulls-3.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/__files/repos_hub4j-test-org_github-api_pulls-3.json new file mode 100644 index 0000000000..ac7becda89 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/__files/repos_hub4j-test-org_github-api_pulls-3.json @@ -0,0 +1,341 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/381", + "id": 478836539, + "node_id": "MDExOlB1bGxSZXF1ZXN0NDc4ODM2NTM5", + "html_url": "https://github.com/hub4j-test-org/github-api/pull/381", + "diff_url": "https://github.com/hub4j-test-org/github-api/pull/381.diff", + "patch_url": "https://github.com/hub4j-test-org/github-api/pull/381.patch", + "issue_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/381", + "number": 381, + "state": "open", + "locked": false, + "title": "testSetBaseBranchNonExisting", + "user": { + "login": "tginiotis-at-work", + "id": 61763026, + "node_id": "MDQ6VXNlcjYxNzYzMDI2", + "avatar_url": "https://avatars3.githubusercontent.com/u/61763026?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/tginiotis-at-work", + "html_url": "https://github.com/tginiotis-at-work", + "followers_url": "https://api.github.com/users/tginiotis-at-work/followers", + "following_url": "https://api.github.com/users/tginiotis-at-work/following{/other_user}", + "gists_url": "https://api.github.com/users/tginiotis-at-work/gists{/gist_id}", + "starred_url": "https://api.github.com/users/tginiotis-at-work/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/tginiotis-at-work/subscriptions", + "organizations_url": "https://api.github.com/users/tginiotis-at-work/orgs", + "repos_url": "https://api.github.com/users/tginiotis-at-work/repos", + "events_url": "https://api.github.com/users/tginiotis-at-work/events{/privacy}", + "received_events_url": "https://api.github.com/users/tginiotis-at-work/received_events", + "type": "User", + "site_admin": false + }, + "body": "## test", + "created_at": "2020-09-03T19:05:11Z", + "updated_at": "2020-09-03T19:05:11Z", + "closed_at": null, + "merged_at": null, + "merge_commit_sha": null, + "assignee": null, + "assignees": [], + "requested_reviewers": [], + "requested_teams": [], + "labels": [], + "milestone": null, + "draft": false, + "commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/381/commits", + "review_comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/381/comments", + "review_comment_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/381/comments", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/1f40fdf4acf1adb246c109c21a22f617e4bd1ca8", + "head": { + "label": "hub4j-test-org:test/stable", + "ref": "test/stable", + "sha": "1f40fdf4acf1adb246c109c21a22f617e4bd1ca8", + "user": { + "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 + }, + "repo": { + "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": "Resetting", + "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-06-10T23:27:59Z", + "pushed_at": "2020-09-03T18:57:10Z", + "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": 19052, + "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": 6, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 0, + "open_issues": 6, + "watchers": 0, + "default_branch": "master" + } + }, + "base": { + "label": "hub4j-test-org:master", + "ref": "master", + "sha": "8051615eff597f4e49f4f47625e6fc2b49f26bfc", + "user": { + "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 + }, + "repo": { + "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": "Resetting", + "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-06-10T23:27:59Z", + "pushed_at": "2020-09-03T18:57:10Z", + "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": 19052, + "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": 6, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 0, + "open_issues": 6, + "watchers": 0, + "default_branch": "master" + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/381" + }, + "html": { + "href": "https://github.com/hub4j-test-org/github-api/pull/381" + }, + "issue": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/issues/381" + }, + "comments": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/issues/381/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/381/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/381/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/1f40fdf4acf1adb246c109c21a22f617e4bd1ca8" + } + }, + "author_association": "MEMBER", + "active_lock_reason": null, + "merged": false, + "mergeable": null, + "rebaseable": null, + "mergeable_state": "unknown", + "merged_by": null, + "comments": 0, + "review_comments": 0, + "maintainer_can_modify": false, + "commits": 2, + "additions": 2, + "deletions": 1, + "changed_files": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/__files/repos_hub4j-test-org_github-api_pulls_381-5.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/__files/repos_hub4j-test-org_github-api_pulls_381-5.json new file mode 100644 index 0000000000..a15c5375ee --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/__files/repos_hub4j-test-org_github-api_pulls_381-5.json @@ -0,0 +1,341 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/381", + "id": 478836539, + "node_id": "MDExOlB1bGxSZXF1ZXN0NDc4ODM2NTM5", + "html_url": "https://github.com/hub4j-test-org/github-api/pull/381", + "diff_url": "https://github.com/hub4j-test-org/github-api/pull/381.diff", + "patch_url": "https://github.com/hub4j-test-org/github-api/pull/381.patch", + "issue_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/381", + "number": 381, + "state": "closed", + "locked": false, + "title": "testSetBaseBranchNonExisting", + "user": { + "login": "tginiotis-at-work", + "id": 61763026, + "node_id": "MDQ6VXNlcjYxNzYzMDI2", + "avatar_url": "https://avatars3.githubusercontent.com/u/61763026?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/tginiotis-at-work", + "html_url": "https://github.com/tginiotis-at-work", + "followers_url": "https://api.github.com/users/tginiotis-at-work/followers", + "following_url": "https://api.github.com/users/tginiotis-at-work/following{/other_user}", + "gists_url": "https://api.github.com/users/tginiotis-at-work/gists{/gist_id}", + "starred_url": "https://api.github.com/users/tginiotis-at-work/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/tginiotis-at-work/subscriptions", + "organizations_url": "https://api.github.com/users/tginiotis-at-work/orgs", + "repos_url": "https://api.github.com/users/tginiotis-at-work/repos", + "events_url": "https://api.github.com/users/tginiotis-at-work/events{/privacy}", + "received_events_url": "https://api.github.com/users/tginiotis-at-work/received_events", + "type": "User", + "site_admin": false + }, + "body": "## test", + "created_at": "2020-09-03T19:05:11Z", + "updated_at": "2020-09-03T19:05:12Z", + "closed_at": "2020-09-03T19:05:12Z", + "merged_at": null, + "merge_commit_sha": "d78e243fd32bc18690e21f0f92d7a28a65b6cfc5", + "assignee": null, + "assignees": [], + "requested_reviewers": [], + "requested_teams": [], + "labels": [], + "milestone": null, + "draft": false, + "commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/381/commits", + "review_comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/381/comments", + "review_comment_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/381/comments", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/1f40fdf4acf1adb246c109c21a22f617e4bd1ca8", + "head": { + "label": "hub4j-test-org:test/stable", + "ref": "test/stable", + "sha": "1f40fdf4acf1adb246c109c21a22f617e4bd1ca8", + "user": { + "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 + }, + "repo": { + "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": "Resetting", + "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-06-10T23:27:59Z", + "pushed_at": "2020-09-03T19:05:11Z", + "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": 19052, + "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" + } + }, + "base": { + "label": "hub4j-test-org:master", + "ref": "master", + "sha": "8051615eff597f4e49f4f47625e6fc2b49f26bfc", + "user": { + "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 + }, + "repo": { + "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": "Resetting", + "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-06-10T23:27:59Z", + "pushed_at": "2020-09-03T19:05:11Z", + "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": 19052, + "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" + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/381" + }, + "html": { + "href": "https://github.com/hub4j-test-org/github-api/pull/381" + }, + "issue": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/issues/381" + }, + "comments": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/issues/381/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/381/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/381/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/1f40fdf4acf1adb246c109c21a22f617e4bd1ca8" + } + }, + "author_association": "MEMBER", + "active_lock_reason": null, + "merged": false, + "mergeable": true, + "rebaseable": true, + "mergeable_state": "unstable", + "merged_by": null, + "comments": 0, + "review_comments": 0, + "maintainer_can_modify": false, + "commits": 2, + "additions": 2, + "deletions": 1, + "changed_files": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/mappings/orgs_hub4j-test-org-1.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/mappings/orgs_hub4j-test-org-1.json new file mode 100644 index 0000000000..557acd04df --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/mappings/orgs_hub4j-test-org-1.json @@ -0,0 +1,46 @@ +{ + "id": "fea7c6c6-2f75-46b0-bbf2-2207feaaf8ee", + "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-1.json", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:10 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"ea860001e36aab2981aba60cd49099af\"", + "Last-Modified": "Thu, 04 Jun 2020 05:56:10 GMT", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4697", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "303", + "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": "C84A:2C9E:13F9DBF9:18306244:5F513E65" + } + }, + "uuid": "fea7c6c6-2f75-46b0-bbf2-2207feaaf8ee", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/mappings/repos_hub4j-test-org_github-api-2.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/mappings/repos_hub4j-test-org_github-api-2.json new file mode 100644 index 0000000000..999af31b9f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/mappings/repos_hub4j-test-org_github-api-2.json @@ -0,0 +1,46 @@ +{ + "id": "a210a048-c699-47a6-96ee-d035a23829f3", + "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-2.json", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:10 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"8a305768b888ec9b150f28e113a133ca\"", + "Last-Modified": "Wed, 10 Jun 2020 23:27:59 GMT", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4696", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "304", + "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": "C84A:2C9E:13F9DCB6:183062AC:5F513E66" + } + }, + "uuid": "a210a048-c699-47a6-96ee-d035a23829f3", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/mappings/repos_hub4j-test-org_github-api_pulls-3.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/mappings/repos_hub4j-test-org_github-api_pulls-3.json new file mode 100644 index 0000000000..0f87464569 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/mappings/repos_hub4j-test-org_github-api_pulls-3.json @@ -0,0 +1,53 @@ +{ + "id": "a6a18e14-ce7c-45f7-9164-86da4bf75ef4", + "name": "repos_hub4j-test-org_github-api_pulls", + "request": { + "url": "/repos/hub4j-test-org/github-api/pulls", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.shadow-cat-preview+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"head\":\"test/stable\",\"draft\":false,\"maintainer_can_modify\":true,\"title\":\"testSetBaseBranchNonExisting\",\"body\":\"## test\",\"base\":\"master\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_hub4j-test-org_github-api_pulls-3.json", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:11 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "201 Created", + "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": "\"e5dae09961ee55c19f9643ad7b5ae02b\"", + "Location": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/381", + "X-GitHub-Media-Type": "github.v3; param=shadow-cat-preview; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4695", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "305", + "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": "C84A:2C9E:13F9DD37:18306399:5F513E66" + } + }, + "uuid": "a6a18e14-ce7c-45f7-9164-86da4bf75ef4", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/mappings/repos_hub4j-test-org_github-api_pulls_381-4.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/mappings/repos_hub4j-test-org_github-api_pulls_381-4.json new file mode 100644 index 0000000000..4e9373bdea --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/mappings/repos_hub4j-test-org_github-api_pulls_381-4.json @@ -0,0 +1,46 @@ +{ + "id": "d2d858b0-e83c-4424-970e-c395524b3334", + "name": "repos_hub4j-test-org_github-api_pulls_381", + "request": { + "url": "/repos/hub4j-test-org/github-api/pulls/381", + "method": "PATCH", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"base\":\"non-existing\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 422, + "body": "{\"message\":\"Validation Failed\",\"errors\":[{\"message\":\"Proposed base branch 'non-existing' was not found\",\"resource\":\"PullRequest\",\"field\":\"base\",\"code\":\"invalid\"}],\"documentation_url\":\"https://docs.github.com/rest/reference/pulls#update-a-pull-request\"}", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:12 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "422 Unprocessable Entity", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4694", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "306", + "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": "C84A:2C9E:13F9DECA:18306565:5F513E67" + } + }, + "uuid": "d2d858b0-e83c-4424-970e-c395524b3334", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/mappings/repos_hub4j-test-org_github-api_pulls_381-5.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/mappings/repos_hub4j-test-org_github-api_pulls_381-5.json new file mode 100644 index 0000000000..625958a38a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/setBaseBranchNonExisting/mappings/repos_hub4j-test-org_github-api_pulls_381-5.json @@ -0,0 +1,52 @@ +{ + "id": "a873c979-6c54-485b-902c-e7f885e1c1ea", + "name": "repos_hub4j-test-org_github-api_pulls_381", + "request": { + "url": "/repos/hub4j-test-org/github-api/pulls/381", + "method": "PATCH", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"state\":\"closed\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api_pulls_381-5.json", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:13 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"eb425460cfd2a23d63a61cf58915487c\"", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4693", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "307", + "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": "C84A:2C9E:13F9DFB3:1830665E:5F513E68" + } + }, + "uuid": "a873c979-6c54-485b-902c-e7f885e1c1ea", + "persistent": true, + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/__files/orgs_hub4j-test-org-1.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/__files/orgs_hub4j-test-org-1.json new file mode 100644 index 0000000000..7d3839a85a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/__files/orgs_hub4j-test-org-1.json @@ -0,0 +1,47 @@ +{ + "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": "Hub4j Test Org Description (this could be null or blank too)", + "name": "Hub4j Test Org Name (this could be null or blank too)", + "company": null, + "blog": "https://hub4j.url.io/could/be/null", + "location": "Hub4j Test Org Location (this could be null or blank too)", + "email": "hub4jtestorgemail@could.be.null.com", + "twitter_username": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 13, + "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-06-04T05:56:10Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 149, + "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": 18, + "seats": 3 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/__files/repos_hub4j-test-org_updateoutdatedbranches-2.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/__files/repos_hub4j-test-org_updateoutdatedbranches-2.json new file mode 100644 index 0000000000..77d2f7547c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/__files/repos_hub4j-test-org_updateoutdatedbranches-2.json @@ -0,0 +1,126 @@ +{ + "id": 292640382, + "node_id": "MDEwOlJlcG9zaXRvcnkyOTI2NDAzODI=", + "name": "updateOutdatedBranches", + "full_name": "hub4j-test-org/updateOutdatedBranches", + "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/updateOutdatedBranches", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches", + "forks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/deployments", + "created_at": "2020-09-03T17:47:33Z", + "updated_at": "2020-09-03T17:51:34Z", + "pushed_at": "2020-09-03T18:57:38Z", + "git_url": "git://github.com/hub4j-test-org/updateOutdatedBranches.git", + "ssh_url": "git@github.com:hub4j-test-org/updateOutdatedBranches.git", + "clone_url": "https://github.com/hub4j-test-org/updateOutdatedBranches.git", + "svn_url": "https://github.com/hub4j-test-org/updateOutdatedBranches", + "homepage": null, + "size": 1, + "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/GHPullRequestTest/wiremock/updateOutdatedBranches/__files/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-3.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/__files/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-3.json new file mode 100644 index 0000000000..5f6229ac8c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/__files/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-3.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/outdated", + "node_id": "MDM6UmVmMjkyNjQwMzgyOnJlZnMvaGVhZHMvb3V0ZGF0ZWQ=", + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/refs/heads/outdated", + "object": { + "sha": "f567328eb81270487864963b7d7446953353f2b5", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/commits/f567328eb81270487864963b7d7446953353f2b5" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/__files/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-4.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/__files/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-4.json new file mode 100644 index 0000000000..d84043c289 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/__files/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-4.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/outdated", + "node_id": "MDM6UmVmMjkyNjQwMzgyOnJlZnMvaGVhZHMvb3V0ZGF0ZWQ=", + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/refs/heads/outdated", + "object": { + "sha": "6440189369f9f33b2366556a94dbc26f2cfdd969", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/commits/6440189369f9f33b2366556a94dbc26f2cfdd969" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/__files/repos_hub4j-test-org_updateoutdatedbranches_pulls-5.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/__files/repos_hub4j-test-org_updateoutdatedbranches_pulls-5.json new file mode 100644 index 0000000000..cd4b2ab635 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/__files/repos_hub4j-test-org_updateoutdatedbranches_pulls-5.json @@ -0,0 +1,329 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8", + "id": 478836724, + "node_id": "MDExOlB1bGxSZXF1ZXN0NDc4ODM2NzI0", + "html_url": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/8", + "diff_url": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/8.diff", + "patch_url": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/8.patch", + "issue_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/8", + "number": 8, + "state": "open", + "locked": false, + "title": "testUpdateOutdatedBranches", + "user": { + "login": "tginiotis-at-work", + "id": 61763026, + "node_id": "MDQ6VXNlcjYxNzYzMDI2", + "avatar_url": "https://avatars3.githubusercontent.com/u/61763026?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/tginiotis-at-work", + "html_url": "https://github.com/tginiotis-at-work", + "followers_url": "https://api.github.com/users/tginiotis-at-work/followers", + "following_url": "https://api.github.com/users/tginiotis-at-work/following{/other_user}", + "gists_url": "https://api.github.com/users/tginiotis-at-work/gists{/gist_id}", + "starred_url": "https://api.github.com/users/tginiotis-at-work/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/tginiotis-at-work/subscriptions", + "organizations_url": "https://api.github.com/users/tginiotis-at-work/orgs", + "repos_url": "https://api.github.com/users/tginiotis-at-work/repos", + "events_url": "https://api.github.com/users/tginiotis-at-work/events{/privacy}", + "received_events_url": "https://api.github.com/users/tginiotis-at-work/received_events", + "type": "User", + "site_admin": false + }, + "body": "## test", + "created_at": "2020-09-03T19:05:22Z", + "updated_at": "2020-09-03T19:05:22Z", + "closed_at": null, + "merged_at": null, + "merge_commit_sha": null, + "assignee": null, + "assignees": [], + "requested_reviewers": [], + "requested_teams": [], + "labels": [], + "milestone": null, + "draft": false, + "commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8/commits", + "review_comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8/comments", + "review_comment_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/8/comments", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/6440189369f9f33b2366556a94dbc26f2cfdd969", + "head": { + "label": "hub4j-test-org:outdated", + "ref": "outdated", + "sha": "6440189369f9f33b2366556a94dbc26f2cfdd969", + "user": { + "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 + }, + "repo": { + "id": 292640382, + "node_id": "MDEwOlJlcG9zaXRvcnkyOTI2NDAzODI=", + "name": "updateOutdatedBranches", + "full_name": "hub4j-test-org/updateOutdatedBranches", + "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/updateOutdatedBranches", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches", + "forks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/deployments", + "created_at": "2020-09-03T17:47:33Z", + "updated_at": "2020-09-03T17:51:34Z", + "pushed_at": "2020-09-03T19:05:22Z", + "git_url": "git://github.com/hub4j-test-org/updateOutdatedBranches.git", + "ssh_url": "git@github.com:hub4j-test-org/updateOutdatedBranches.git", + "clone_url": "https://github.com/hub4j-test-org/updateOutdatedBranches.git", + "svn_url": "https://github.com/hub4j-test-org/updateOutdatedBranches", + "homepage": null, + "size": 1, + "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": 1, + "license": null, + "forks": 0, + "open_issues": 1, + "watchers": 0, + "default_branch": "master" + } + }, + "base": { + "label": "hub4j-test-org:master", + "ref": "master", + "sha": "1300f2d207d52857bc92d37747d032aaab7a802e", + "user": { + "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 + }, + "repo": { + "id": 292640382, + "node_id": "MDEwOlJlcG9zaXRvcnkyOTI2NDAzODI=", + "name": "updateOutdatedBranches", + "full_name": "hub4j-test-org/updateOutdatedBranches", + "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/updateOutdatedBranches", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches", + "forks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/deployments", + "created_at": "2020-09-03T17:47:33Z", + "updated_at": "2020-09-03T17:51:34Z", + "pushed_at": "2020-09-03T19:05:22Z", + "git_url": "git://github.com/hub4j-test-org/updateOutdatedBranches.git", + "ssh_url": "git@github.com:hub4j-test-org/updateOutdatedBranches.git", + "clone_url": "https://github.com/hub4j-test-org/updateOutdatedBranches.git", + "svn_url": "https://github.com/hub4j-test-org/updateOutdatedBranches", + "homepage": null, + "size": 1, + "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": 1, + "license": null, + "forks": 0, + "open_issues": 1, + "watchers": 0, + "default_branch": "master" + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8" + }, + "html": { + "href": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/8" + }, + "issue": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/8" + }, + "comments": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/8/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/6440189369f9f33b2366556a94dbc26f2cfdd969" + } + }, + "author_association": "MEMBER", + "active_lock_reason": null, + "merged": false, + "mergeable": null, + "rebaseable": null, + "mergeable_state": "unknown", + "merged_by": null, + "comments": 0, + "review_comments": 0, + "maintainer_can_modify": false, + "commits": 1, + "additions": 1, + "deletions": 0, + "changed_files": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/__files/repos_hub4j-test-org_updateoutdatedbranches_pulls_8-6.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/__files/repos_hub4j-test-org_updateoutdatedbranches_pulls_8-6.json new file mode 100644 index 0000000000..3674c127a7 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/__files/repos_hub4j-test-org_updateoutdatedbranches_pulls_8-6.json @@ -0,0 +1,329 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8", + "id": 478836724, + "node_id": "MDExOlB1bGxSZXF1ZXN0NDc4ODM2NzI0", + "html_url": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/8", + "diff_url": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/8.diff", + "patch_url": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/8.patch", + "issue_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/8", + "number": 8, + "state": "open", + "locked": false, + "title": "testUpdateOutdatedBranches", + "user": { + "login": "tginiotis-at-work", + "id": 61763026, + "node_id": "MDQ6VXNlcjYxNzYzMDI2", + "avatar_url": "https://avatars3.githubusercontent.com/u/61763026?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/tginiotis-at-work", + "html_url": "https://github.com/tginiotis-at-work", + "followers_url": "https://api.github.com/users/tginiotis-at-work/followers", + "following_url": "https://api.github.com/users/tginiotis-at-work/following{/other_user}", + "gists_url": "https://api.github.com/users/tginiotis-at-work/gists{/gist_id}", + "starred_url": "https://api.github.com/users/tginiotis-at-work/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/tginiotis-at-work/subscriptions", + "organizations_url": "https://api.github.com/users/tginiotis-at-work/orgs", + "repos_url": "https://api.github.com/users/tginiotis-at-work/repos", + "events_url": "https://api.github.com/users/tginiotis-at-work/events{/privacy}", + "received_events_url": "https://api.github.com/users/tginiotis-at-work/received_events", + "type": "User", + "site_admin": false + }, + "body": "## test", + "created_at": "2020-09-03T19:05:22Z", + "updated_at": "2020-09-03T19:05:22Z", + "closed_at": null, + "merged_at": null, + "merge_commit_sha": "f4d34e43c1db0dacece41d063a1c57baf60ad7f7", + "assignee": null, + "assignees": [], + "requested_reviewers": [], + "requested_teams": [], + "labels": [], + "milestone": null, + "draft": false, + "commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8/commits", + "review_comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8/comments", + "review_comment_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/8/comments", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/6440189369f9f33b2366556a94dbc26f2cfdd969", + "head": { + "label": "hub4j-test-org:outdated", + "ref": "outdated", + "sha": "6440189369f9f33b2366556a94dbc26f2cfdd969", + "user": { + "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 + }, + "repo": { + "id": 292640382, + "node_id": "MDEwOlJlcG9zaXRvcnkyOTI2NDAzODI=", + "name": "updateOutdatedBranches", + "full_name": "hub4j-test-org/updateOutdatedBranches", + "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/updateOutdatedBranches", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches", + "forks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/deployments", + "created_at": "2020-09-03T17:47:33Z", + "updated_at": "2020-09-03T17:51:34Z", + "pushed_at": "2020-09-03T19:05:23Z", + "git_url": "git://github.com/hub4j-test-org/updateOutdatedBranches.git", + "ssh_url": "git@github.com:hub4j-test-org/updateOutdatedBranches.git", + "clone_url": "https://github.com/hub4j-test-org/updateOutdatedBranches.git", + "svn_url": "https://github.com/hub4j-test-org/updateOutdatedBranches", + "homepage": null, + "size": 1, + "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": 1, + "license": null, + "forks": 0, + "open_issues": 1, + "watchers": 0, + "default_branch": "master" + } + }, + "base": { + "label": "hub4j-test-org:master", + "ref": "master", + "sha": "1300f2d207d52857bc92d37747d032aaab7a802e", + "user": { + "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 + }, + "repo": { + "id": 292640382, + "node_id": "MDEwOlJlcG9zaXRvcnkyOTI2NDAzODI=", + "name": "updateOutdatedBranches", + "full_name": "hub4j-test-org/updateOutdatedBranches", + "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/updateOutdatedBranches", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches", + "forks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/deployments", + "created_at": "2020-09-03T17:47:33Z", + "updated_at": "2020-09-03T17:51:34Z", + "pushed_at": "2020-09-03T19:05:23Z", + "git_url": "git://github.com/hub4j-test-org/updateOutdatedBranches.git", + "ssh_url": "git@github.com:hub4j-test-org/updateOutdatedBranches.git", + "clone_url": "https://github.com/hub4j-test-org/updateOutdatedBranches.git", + "svn_url": "https://github.com/hub4j-test-org/updateOutdatedBranches", + "homepage": null, + "size": 1, + "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": 1, + "license": null, + "forks": 0, + "open_issues": 1, + "watchers": 0, + "default_branch": "master" + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8" + }, + "html": { + "href": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/8" + }, + "issue": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/8" + }, + "comments": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/8/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/6440189369f9f33b2366556a94dbc26f2cfdd969" + } + }, + "author_association": "MEMBER", + "active_lock_reason": null, + "merged": false, + "mergeable": true, + "rebaseable": true, + "mergeable_state": "behind", + "merged_by": null, + "comments": 0, + "review_comments": 0, + "maintainer_can_modify": false, + "commits": 1, + "additions": 1, + "deletions": 0, + "changed_files": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/__files/repos_hub4j-test-org_updateoutdatedbranches_pulls_8-8.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/__files/repos_hub4j-test-org_updateoutdatedbranches_pulls_8-8.json new file mode 100644 index 0000000000..84ea39a2c5 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/__files/repos_hub4j-test-org_updateoutdatedbranches_pulls_8-8.json @@ -0,0 +1,329 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8", + "id": 478836724, + "node_id": "MDExOlB1bGxSZXF1ZXN0NDc4ODM2NzI0", + "html_url": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/8", + "diff_url": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/8.diff", + "patch_url": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/8.patch", + "issue_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/8", + "number": 8, + "state": "open", + "locked": false, + "title": "testUpdateOutdatedBranches", + "user": { + "login": "tginiotis-at-work", + "id": 61763026, + "node_id": "MDQ6VXNlcjYxNzYzMDI2", + "avatar_url": "https://avatars3.githubusercontent.com/u/61763026?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/tginiotis-at-work", + "html_url": "https://github.com/tginiotis-at-work", + "followers_url": "https://api.github.com/users/tginiotis-at-work/followers", + "following_url": "https://api.github.com/users/tginiotis-at-work/following{/other_user}", + "gists_url": "https://api.github.com/users/tginiotis-at-work/gists{/gist_id}", + "starred_url": "https://api.github.com/users/tginiotis-at-work/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/tginiotis-at-work/subscriptions", + "organizations_url": "https://api.github.com/users/tginiotis-at-work/orgs", + "repos_url": "https://api.github.com/users/tginiotis-at-work/repos", + "events_url": "https://api.github.com/users/tginiotis-at-work/events{/privacy}", + "received_events_url": "https://api.github.com/users/tginiotis-at-work/received_events", + "type": "User", + "site_admin": false + }, + "body": "## test", + "created_at": "2020-09-03T19:05:22Z", + "updated_at": "2020-09-03T19:05:22Z", + "closed_at": null, + "merged_at": null, + "merge_commit_sha": "7fc335ccf6aeae0bbb94dbf18891bad98a189975", + "assignee": null, + "assignees": [], + "requested_reviewers": [], + "requested_teams": [], + "labels": [], + "milestone": null, + "draft": false, + "commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8/commits", + "review_comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8/comments", + "review_comment_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/8/comments", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/6440189369f9f33b2366556a94dbc26f2cfdd969", + "head": { + "label": "hub4j-test-org:outdated", + "ref": "outdated", + "sha": "6440189369f9f33b2366556a94dbc26f2cfdd969", + "user": { + "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 + }, + "repo": { + "id": 292640382, + "node_id": "MDEwOlJlcG9zaXRvcnkyOTI2NDAzODI=", + "name": "updateOutdatedBranches", + "full_name": "hub4j-test-org/updateOutdatedBranches", + "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/updateOutdatedBranches", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches", + "forks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/deployments", + "created_at": "2020-09-03T17:47:33Z", + "updated_at": "2020-09-03T17:51:34Z", + "pushed_at": "2020-09-03T19:05:30Z", + "git_url": "git://github.com/hub4j-test-org/updateOutdatedBranches.git", + "ssh_url": "git@github.com:hub4j-test-org/updateOutdatedBranches.git", + "clone_url": "https://github.com/hub4j-test-org/updateOutdatedBranches.git", + "svn_url": "https://github.com/hub4j-test-org/updateOutdatedBranches", + "homepage": null, + "size": 1, + "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": 1, + "license": null, + "forks": 0, + "open_issues": 1, + "watchers": 0, + "default_branch": "master" + } + }, + "base": { + "label": "hub4j-test-org:master", + "ref": "master", + "sha": "1300f2d207d52857bc92d37747d032aaab7a802e", + "user": { + "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 + }, + "repo": { + "id": 292640382, + "node_id": "MDEwOlJlcG9zaXRvcnkyOTI2NDAzODI=", + "name": "updateOutdatedBranches", + "full_name": "hub4j-test-org/updateOutdatedBranches", + "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/updateOutdatedBranches", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches", + "forks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/deployments", + "created_at": "2020-09-03T17:47:33Z", + "updated_at": "2020-09-03T17:51:34Z", + "pushed_at": "2020-09-03T19:05:30Z", + "git_url": "git://github.com/hub4j-test-org/updateOutdatedBranches.git", + "ssh_url": "git@github.com:hub4j-test-org/updateOutdatedBranches.git", + "clone_url": "https://github.com/hub4j-test-org/updateOutdatedBranches.git", + "svn_url": "https://github.com/hub4j-test-org/updateOutdatedBranches", + "homepage": null, + "size": 1, + "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": 1, + "license": null, + "forks": 0, + "open_issues": 1, + "watchers": 0, + "default_branch": "master" + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8" + }, + "html": { + "href": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/8" + }, + "issue": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/8" + }, + "comments": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/8/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/6440189369f9f33b2366556a94dbc26f2cfdd969" + } + }, + "author_association": "MEMBER", + "active_lock_reason": null, + "merged": false, + "mergeable": null, + "rebaseable": null, + "mergeable_state": "unknown", + "merged_by": null, + "comments": 0, + "review_comments": 0, + "maintainer_can_modify": false, + "commits": 1, + "additions": 1, + "deletions": 0, + "changed_files": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/__files/repos_hub4j-test-org_updateoutdatedbranches_pulls_8-9.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/__files/repos_hub4j-test-org_updateoutdatedbranches_pulls_8-9.json new file mode 100644 index 0000000000..50bb0a231e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/__files/repos_hub4j-test-org_updateoutdatedbranches_pulls_8-9.json @@ -0,0 +1,329 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8", + "id": 478836724, + "node_id": "MDExOlB1bGxSZXF1ZXN0NDc4ODM2NzI0", + "html_url": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/8", + "diff_url": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/8.diff", + "patch_url": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/8.patch", + "issue_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/8", + "number": 8, + "state": "closed", + "locked": false, + "title": "testUpdateOutdatedBranches", + "user": { + "login": "tginiotis-at-work", + "id": 61763026, + "node_id": "MDQ6VXNlcjYxNzYzMDI2", + "avatar_url": "https://avatars3.githubusercontent.com/u/61763026?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/tginiotis-at-work", + "html_url": "https://github.com/tginiotis-at-work", + "followers_url": "https://api.github.com/users/tginiotis-at-work/followers", + "following_url": "https://api.github.com/users/tginiotis-at-work/following{/other_user}", + "gists_url": "https://api.github.com/users/tginiotis-at-work/gists{/gist_id}", + "starred_url": "https://api.github.com/users/tginiotis-at-work/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/tginiotis-at-work/subscriptions", + "organizations_url": "https://api.github.com/users/tginiotis-at-work/orgs", + "repos_url": "https://api.github.com/users/tginiotis-at-work/repos", + "events_url": "https://api.github.com/users/tginiotis-at-work/events{/privacy}", + "received_events_url": "https://api.github.com/users/tginiotis-at-work/received_events", + "type": "User", + "site_admin": false + }, + "body": "## test", + "created_at": "2020-09-03T19:05:22Z", + "updated_at": "2020-09-03T19:05:31Z", + "closed_at": "2020-09-03T19:05:31Z", + "merged_at": null, + "merge_commit_sha": "7fc335ccf6aeae0bbb94dbf18891bad98a189975", + "assignee": null, + "assignees": [], + "requested_reviewers": [], + "requested_teams": [], + "labels": [], + "milestone": null, + "draft": false, + "commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8/commits", + "review_comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8/comments", + "review_comment_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/8/comments", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/11033c5338d282a5dc36d6d79b05364e3ba4f1a1", + "head": { + "label": "hub4j-test-org:outdated", + "ref": "outdated", + "sha": "11033c5338d282a5dc36d6d79b05364e3ba4f1a1", + "user": { + "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 + }, + "repo": { + "id": 292640382, + "node_id": "MDEwOlJlcG9zaXRvcnkyOTI2NDAzODI=", + "name": "updateOutdatedBranches", + "full_name": "hub4j-test-org/updateOutdatedBranches", + "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/updateOutdatedBranches", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches", + "forks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/deployments", + "created_at": "2020-09-03T17:47:33Z", + "updated_at": "2020-09-03T17:51:34Z", + "pushed_at": "2020-09-03T19:05:30Z", + "git_url": "git://github.com/hub4j-test-org/updateOutdatedBranches.git", + "ssh_url": "git@github.com:hub4j-test-org/updateOutdatedBranches.git", + "clone_url": "https://github.com/hub4j-test-org/updateOutdatedBranches.git", + "svn_url": "https://github.com/hub4j-test-org/updateOutdatedBranches", + "homepage": null, + "size": 1, + "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" + } + }, + "base": { + "label": "hub4j-test-org:master", + "ref": "master", + "sha": "1300f2d207d52857bc92d37747d032aaab7a802e", + "user": { + "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 + }, + "repo": { + "id": 292640382, + "node_id": "MDEwOlJlcG9zaXRvcnkyOTI2NDAzODI=", + "name": "updateOutdatedBranches", + "full_name": "hub4j-test-org/updateOutdatedBranches", + "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/updateOutdatedBranches", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches", + "forks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/deployments", + "created_at": "2020-09-03T17:47:33Z", + "updated_at": "2020-09-03T17:51:34Z", + "pushed_at": "2020-09-03T19:05:30Z", + "git_url": "git://github.com/hub4j-test-org/updateOutdatedBranches.git", + "ssh_url": "git@github.com:hub4j-test-org/updateOutdatedBranches.git", + "clone_url": "https://github.com/hub4j-test-org/updateOutdatedBranches.git", + "svn_url": "https://github.com/hub4j-test-org/updateOutdatedBranches", + "homepage": null, + "size": 1, + "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" + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8" + }, + "html": { + "href": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/8" + }, + "issue": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/8" + }, + "comments": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/8/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/11033c5338d282a5dc36d6d79b05364e3ba4f1a1" + } + }, + "author_association": "MEMBER", + "active_lock_reason": null, + "merged": false, + "mergeable": null, + "rebaseable": null, + "mergeable_state": "unknown", + "merged_by": null, + "comments": 0, + "review_comments": 0, + "maintainer_can_modify": false, + "commits": 2, + "additions": 1, + "deletions": 0, + "changed_files": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/orgs_hub4j-test-org-1.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/orgs_hub4j-test-org-1.json new file mode 100644 index 0000000000..69ae694a2d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/orgs_hub4j-test-org-1.json @@ -0,0 +1,46 @@ +{ + "id": "67311f1e-f7ac-4d0f-9d89-4fd481d76373", + "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-1.json", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:20 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"ea860001e36aab2981aba60cd49099af\"", + "Last-Modified": "Thu, 04 Jun 2020 05:56:10 GMT", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4678", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "322", + "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": "C85C:B2ED:10164FBB:137C03EB:5F513E70" + } + }, + "uuid": "67311f1e-f7ac-4d0f-9d89-4fd481d76373", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/repos_hub4j-test-org_updateoutdatedbranches-2.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/repos_hub4j-test-org_updateoutdatedbranches-2.json new file mode 100644 index 0000000000..040d55dcab --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/repos_hub4j-test-org_updateoutdatedbranches-2.json @@ -0,0 +1,46 @@ +{ + "id": "3c5dbdec-4b4d-4ec0-8956-7439547d35c1", + "name": "repos_hub4j-test-org_updateoutdatedbranches", + "request": { + "url": "/repos/hub4j-test-org/updateOutdatedBranches", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_updateoutdatedbranches-2.json", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:20 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"4057812f41a84a1fca478d0ad9a4a3cc\"", + "Last-Modified": "Thu, 03 Sep 2020 17:51:34 GMT", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4677", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "323", + "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": "C85C:B2ED:1016504C:137C0457:5F513E70" + } + }, + "uuid": "3c5dbdec-4b4d-4ec0-8956-7439547d35c1", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-3.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-3.json new file mode 100644 index 0000000000..a4c3d3a581 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-3.json @@ -0,0 +1,47 @@ +{ + "id": "33db7ede-10ec-4e38-9d12-42ed2b3057b7", + "name": "repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated", + "request": { + "url": "/repos/hub4j-test-org/updateOutdatedBranches/git/refs/heads/outdated", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-3.json", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:21 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"906a27b3d6f7291ded0bc7756a9a07c9\"", + "Last-Modified": "Thu, 03 Sep 2020 17:51:34 GMT", + "X-Poll-Interval": "300", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4676", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "324", + "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": "C85C:B2ED:101650BA:137C04FD:5F513E70" + } + }, + "uuid": "33db7ede-10ec-4e38-9d12-42ed2b3057b7", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-4.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-4.json new file mode 100644 index 0000000000..ebab5cdf4b --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-4.json @@ -0,0 +1,52 @@ +{ + "id": "64e86703-71e2-47f6-a993-5bc98ffb5d70", + "name": "repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated", + "request": { + "url": "/repos/hub4j-test-org/updateOutdatedBranches/git/refs/heads/outdated", + "method": "PATCH", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"force\":true,\"sha\":\"6440189369f9f33b2366556a94dbc26f2cfdd969\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-4.json", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:22 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"b83e379d80a899ec6c708b8a1a5f746f\"", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4675", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "325", + "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": "C85C:B2ED:10165134:137C0582:5F513E71" + } + }, + "uuid": "64e86703-71e2-47f6-a993-5bc98ffb5d70", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls-5.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls-5.json new file mode 100644 index 0000000000..a5a7536b00 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls-5.json @@ -0,0 +1,53 @@ +{ + "id": "45378747-40bd-4399-912c-8c86743489f2", + "name": "repos_hub4j-test-org_updateoutdatedbranches_pulls", + "request": { + "url": "/repos/hub4j-test-org/updateOutdatedBranches/pulls", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.shadow-cat-preview+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"head\":\"outdated\",\"draft\":false,\"maintainer_can_modify\":true,\"title\":\"testUpdateOutdatedBranches\",\"body\":\"## test\",\"base\":\"master\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_hub4j-test-org_updateoutdatedbranches_pulls-5.json", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:23 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "201 Created", + "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": "\"635777ec5bf6397e341078701a9bda2b\"", + "Location": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8", + "X-GitHub-Media-Type": "github.v3; param=shadow-cat-preview; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4674", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "326", + "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": "C85C:B2ED:10165290:137C072D:5F513E72" + } + }, + "uuid": "45378747-40bd-4399-912c-8c86743489f2", + "persistent": true, + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls_8-6.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls_8-6.json new file mode 100644 index 0000000000..3cd14baaab --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls_8-6.json @@ -0,0 +1,49 @@ +{ + "id": "4de79e66-0c4b-4b2b-9563-a4f95dc3e7c6", + "name": "repos_hub4j-test-org_updateoutdatedbranches_pulls_8", + "request": { + "url": "/repos/hub4j-test-org/updateOutdatedBranches/pulls/8", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.shadow-cat-preview+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_updateoutdatedbranches_pulls_8-6.json", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:28 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"27a94437c98063b8b4d43fbec0ac4327\"", + "Last-Modified": "Thu, 03 Sep 2020 19:05:22 GMT", + "X-GitHub-Media-Type": "github.v3; param=shadow-cat-preview; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4673", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "327", + "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": "C85C:B2ED:10165CE0:137C09B8:5F513E73" + } + }, + "uuid": "4de79e66-0c4b-4b2b-9563-a4f95dc3e7c6", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-updateOutdatedBranches-pulls-8", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-repos-hub4j-test-org-updateOutdatedBranches-pulls-8-2", + "insertionIndex": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls_8-8.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls_8-8.json new file mode 100644 index 0000000000..10ba21bf18 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls_8-8.json @@ -0,0 +1,48 @@ +{ + "id": "655967c4-5549-4484-8b59-8194f7241568", + "name": "repos_hub4j-test-org_updateoutdatedbranches_pulls_8", + "request": { + "url": "/repos/hub4j-test-org/updateOutdatedBranches/pulls/8", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.shadow-cat-preview+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_updateoutdatedbranches_pulls_8-8.json", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:30 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"11d0727b16cb6765ff2c18421fb449fb\"", + "Last-Modified": "Thu, 03 Sep 2020 19:05:22 GMT", + "X-GitHub-Media-Type": "github.v3; param=shadow-cat-preview; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4671", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "329", + "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": "C85C:B2ED:1016605D:137C1803:5F513E7A" + } + }, + "uuid": "655967c4-5549-4484-8b59-8194f7241568", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-updateOutdatedBranches-pulls-8", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-updateOutdatedBranches-pulls-8-2", + "insertionIndex": 8 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls_8-9.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls_8-9.json new file mode 100644 index 0000000000..30a93d73fd --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls_8-9.json @@ -0,0 +1,52 @@ +{ + "id": "be58a6a0-6025-49d5-acae-51b25276bed0", + "name": "repos_hub4j-test-org_updateoutdatedbranches_pulls_8", + "request": { + "url": "/repos/hub4j-test-org/updateOutdatedBranches/pulls/8", + "method": "PATCH", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"state\":\"closed\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_updateoutdatedbranches_pulls_8-9.json", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:31 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"fcc21f5d9612a3fe09b8816f2f168889\"", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4670", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "330", + "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": "C85C:B2ED:101660EB:137C1902:5F513E7A" + } + }, + "uuid": "be58a6a0-6025-49d5-acae-51b25276bed0", + "persistent": true, + "insertionIndex": 9 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls_8_update-branch-7.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls_8_update-branch-7.json new file mode 100644 index 0000000000..3a978491ed --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranches/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls_8_update-branch-7.json @@ -0,0 +1,47 @@ +{ + "id": "8da7d3bd-9bd0-4c5d-9d52-19d4b0e9324c", + "name": "repos_hub4j-test-org_updateoutdatedbranches_pulls_8_update-branch", + "request": { + "url": "/repos/hub4j-test-org/updateOutdatedBranches/pulls/8/update-branch", + "method": "PUT", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.lydian-preview+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"expected_head_sha\":\"6440189369f9f33b2366556a94dbc26f2cfdd969\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 202, + "body": "{\"message\":\"Updating pull request branch.\",\"url\":\"https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8\"}", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:30 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "202 Accepted", + "location": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/8", + "X-GitHub-Media-Type": "github.lydian-preview; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4672", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "328", + "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": "C85C:B2ED:10165DB6:137C14C1:5F513E78" + } + }, + "uuid": "8da7d3bd-9bd0-4c5d-9d52-19d4b0e9324c", + "persistent": true, + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/__files/orgs_hub4j-test-org-1.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/__files/orgs_hub4j-test-org-1.json new file mode 100644 index 0000000000..7d3839a85a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/__files/orgs_hub4j-test-org-1.json @@ -0,0 +1,47 @@ +{ + "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": "Hub4j Test Org Description (this could be null or blank too)", + "name": "Hub4j Test Org Name (this could be null or blank too)", + "company": null, + "blog": "https://hub4j.url.io/could/be/null", + "location": "Hub4j Test Org Location (this could be null or blank too)", + "email": "hub4jtestorgemail@could.be.null.com", + "twitter_username": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 13, + "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-06-04T05:56:10Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 149, + "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": 18, + "seats": 3 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/__files/repos_hub4j-test-org_updateoutdatedbranches-2.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/__files/repos_hub4j-test-org_updateoutdatedbranches-2.json new file mode 100644 index 0000000000..c321e7b20d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/__files/repos_hub4j-test-org_updateoutdatedbranches-2.json @@ -0,0 +1,126 @@ +{ + "id": 292640382, + "node_id": "MDEwOlJlcG9zaXRvcnkyOTI2NDAzODI=", + "name": "updateOutdatedBranches", + "full_name": "hub4j-test-org/updateOutdatedBranches", + "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/updateOutdatedBranches", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches", + "forks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/deployments", + "created_at": "2020-09-03T17:47:33Z", + "updated_at": "2020-09-03T17:51:34Z", + "pushed_at": "2020-09-03T19:05:31Z", + "git_url": "git://github.com/hub4j-test-org/updateOutdatedBranches.git", + "ssh_url": "git@github.com:hub4j-test-org/updateOutdatedBranches.git", + "clone_url": "https://github.com/hub4j-test-org/updateOutdatedBranches.git", + "svn_url": "https://github.com/hub4j-test-org/updateOutdatedBranches", + "homepage": null, + "size": 1, + "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/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/__files/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-3.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/__files/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-3.json new file mode 100644 index 0000000000..73768aaaad --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/__files/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-3.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/outdated", + "node_id": "MDM6UmVmMjkyNjQwMzgyOnJlZnMvaGVhZHMvb3V0ZGF0ZWQ=", + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/refs/heads/outdated", + "object": { + "sha": "11033c5338d282a5dc36d6d79b05364e3ba4f1a1", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/commits/11033c5338d282a5dc36d6d79b05364e3ba4f1a1" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/__files/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-4.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/__files/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-4.json new file mode 100644 index 0000000000..d84043c289 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/__files/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-4.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/outdated", + "node_id": "MDM6UmVmMjkyNjQwMzgyOnJlZnMvaGVhZHMvb3V0ZGF0ZWQ=", + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/refs/heads/outdated", + "object": { + "sha": "6440189369f9f33b2366556a94dbc26f2cfdd969", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/commits/6440189369f9f33b2366556a94dbc26f2cfdd969" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/__files/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-7.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/__files/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-7.json new file mode 100644 index 0000000000..5f6229ac8c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/__files/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-7.json @@ -0,0 +1,10 @@ +{ + "ref": "refs/heads/outdated", + "node_id": "MDM6UmVmMjkyNjQwMzgyOnJlZnMvaGVhZHMvb3V0ZGF0ZWQ=", + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/refs/heads/outdated", + "object": { + "sha": "f567328eb81270487864963b7d7446953353f2b5", + "type": "commit", + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/commits/f567328eb81270487864963b7d7446953353f2b5" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/__files/repos_hub4j-test-org_updateoutdatedbranches_pulls-5.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/__files/repos_hub4j-test-org_updateoutdatedbranches_pulls-5.json new file mode 100644 index 0000000000..e04dd3d70e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/__files/repos_hub4j-test-org_updateoutdatedbranches_pulls-5.json @@ -0,0 +1,329 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/9", + "id": 478836965, + "node_id": "MDExOlB1bGxSZXF1ZXN0NDc4ODM2OTY1", + "html_url": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/9", + "diff_url": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/9.diff", + "patch_url": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/9.patch", + "issue_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/9", + "number": 9, + "state": "open", + "locked": false, + "title": "testUpdateOutdatedBranches", + "user": { + "login": "tginiotis-at-work", + "id": 61763026, + "node_id": "MDQ6VXNlcjYxNzYzMDI2", + "avatar_url": "https://avatars3.githubusercontent.com/u/61763026?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/tginiotis-at-work", + "html_url": "https://github.com/tginiotis-at-work", + "followers_url": "https://api.github.com/users/tginiotis-at-work/followers", + "following_url": "https://api.github.com/users/tginiotis-at-work/following{/other_user}", + "gists_url": "https://api.github.com/users/tginiotis-at-work/gists{/gist_id}", + "starred_url": "https://api.github.com/users/tginiotis-at-work/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/tginiotis-at-work/subscriptions", + "organizations_url": "https://api.github.com/users/tginiotis-at-work/orgs", + "repos_url": "https://api.github.com/users/tginiotis-at-work/repos", + "events_url": "https://api.github.com/users/tginiotis-at-work/events{/privacy}", + "received_events_url": "https://api.github.com/users/tginiotis-at-work/received_events", + "type": "User", + "site_admin": false + }, + "body": "## test", + "created_at": "2020-09-03T19:05:36Z", + "updated_at": "2020-09-03T19:05:36Z", + "closed_at": null, + "merged_at": null, + "merge_commit_sha": null, + "assignee": null, + "assignees": [], + "requested_reviewers": [], + "requested_teams": [], + "labels": [], + "milestone": null, + "draft": false, + "commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/9/commits", + "review_comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/9/comments", + "review_comment_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/9/comments", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/6440189369f9f33b2366556a94dbc26f2cfdd969", + "head": { + "label": "hub4j-test-org:outdated", + "ref": "outdated", + "sha": "6440189369f9f33b2366556a94dbc26f2cfdd969", + "user": { + "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 + }, + "repo": { + "id": 292640382, + "node_id": "MDEwOlJlcG9zaXRvcnkyOTI2NDAzODI=", + "name": "updateOutdatedBranches", + "full_name": "hub4j-test-org/updateOutdatedBranches", + "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/updateOutdatedBranches", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches", + "forks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/deployments", + "created_at": "2020-09-03T17:47:33Z", + "updated_at": "2020-09-03T17:51:34Z", + "pushed_at": "2020-09-03T19:05:35Z", + "git_url": "git://github.com/hub4j-test-org/updateOutdatedBranches.git", + "ssh_url": "git@github.com:hub4j-test-org/updateOutdatedBranches.git", + "clone_url": "https://github.com/hub4j-test-org/updateOutdatedBranches.git", + "svn_url": "https://github.com/hub4j-test-org/updateOutdatedBranches", + "homepage": null, + "size": 1, + "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": 1, + "license": null, + "forks": 0, + "open_issues": 1, + "watchers": 0, + "default_branch": "master" + } + }, + "base": { + "label": "hub4j-test-org:master", + "ref": "master", + "sha": "1300f2d207d52857bc92d37747d032aaab7a802e", + "user": { + "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 + }, + "repo": { + "id": 292640382, + "node_id": "MDEwOlJlcG9zaXRvcnkyOTI2NDAzODI=", + "name": "updateOutdatedBranches", + "full_name": "hub4j-test-org/updateOutdatedBranches", + "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/updateOutdatedBranches", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches", + "forks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/deployments", + "created_at": "2020-09-03T17:47:33Z", + "updated_at": "2020-09-03T17:51:34Z", + "pushed_at": "2020-09-03T19:05:35Z", + "git_url": "git://github.com/hub4j-test-org/updateOutdatedBranches.git", + "ssh_url": "git@github.com:hub4j-test-org/updateOutdatedBranches.git", + "clone_url": "https://github.com/hub4j-test-org/updateOutdatedBranches.git", + "svn_url": "https://github.com/hub4j-test-org/updateOutdatedBranches", + "homepage": null, + "size": 1, + "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": 1, + "license": null, + "forks": 0, + "open_issues": 1, + "watchers": 0, + "default_branch": "master" + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/9" + }, + "html": { + "href": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/9" + }, + "issue": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/9" + }, + "comments": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/9/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/9/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/9/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/6440189369f9f33b2366556a94dbc26f2cfdd969" + } + }, + "author_association": "MEMBER", + "active_lock_reason": null, + "merged": false, + "mergeable": null, + "rebaseable": null, + "mergeable_state": "unknown", + "merged_by": null, + "comments": 0, + "review_comments": 0, + "maintainer_can_modify": false, + "commits": 1, + "additions": 1, + "deletions": 0, + "changed_files": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/__files/repos_hub4j-test-org_updateoutdatedbranches_pulls_9-6.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/__files/repos_hub4j-test-org_updateoutdatedbranches_pulls_9-6.json new file mode 100644 index 0000000000..93adeed9f5 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/__files/repos_hub4j-test-org_updateoutdatedbranches_pulls_9-6.json @@ -0,0 +1,329 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/9", + "id": 478836965, + "node_id": "MDExOlB1bGxSZXF1ZXN0NDc4ODM2OTY1", + "html_url": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/9", + "diff_url": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/9.diff", + "patch_url": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/9.patch", + "issue_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/9", + "number": 9, + "state": "open", + "locked": false, + "title": "testUpdateOutdatedBranches", + "user": { + "login": "tginiotis-at-work", + "id": 61763026, + "node_id": "MDQ6VXNlcjYxNzYzMDI2", + "avatar_url": "https://avatars3.githubusercontent.com/u/61763026?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/tginiotis-at-work", + "html_url": "https://github.com/tginiotis-at-work", + "followers_url": "https://api.github.com/users/tginiotis-at-work/followers", + "following_url": "https://api.github.com/users/tginiotis-at-work/following{/other_user}", + "gists_url": "https://api.github.com/users/tginiotis-at-work/gists{/gist_id}", + "starred_url": "https://api.github.com/users/tginiotis-at-work/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/tginiotis-at-work/subscriptions", + "organizations_url": "https://api.github.com/users/tginiotis-at-work/orgs", + "repos_url": "https://api.github.com/users/tginiotis-at-work/repos", + "events_url": "https://api.github.com/users/tginiotis-at-work/events{/privacy}", + "received_events_url": "https://api.github.com/users/tginiotis-at-work/received_events", + "type": "User", + "site_admin": false + }, + "body": "## test", + "created_at": "2020-09-03T19:05:36Z", + "updated_at": "2020-09-03T19:05:36Z", + "closed_at": null, + "merged_at": null, + "merge_commit_sha": "344bd06243df84e130c26ea273a15d59b7220f57", + "assignee": null, + "assignees": [], + "requested_reviewers": [], + "requested_teams": [], + "labels": [], + "milestone": null, + "draft": false, + "commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/9/commits", + "review_comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/9/comments", + "review_comment_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/9/comments", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/6440189369f9f33b2366556a94dbc26f2cfdd969", + "head": { + "label": "hub4j-test-org:outdated", + "ref": "outdated", + "sha": "6440189369f9f33b2366556a94dbc26f2cfdd969", + "user": { + "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 + }, + "repo": { + "id": 292640382, + "node_id": "MDEwOlJlcG9zaXRvcnkyOTI2NDAzODI=", + "name": "updateOutdatedBranches", + "full_name": "hub4j-test-org/updateOutdatedBranches", + "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/updateOutdatedBranches", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches", + "forks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/deployments", + "created_at": "2020-09-03T17:47:33Z", + "updated_at": "2020-09-03T17:51:34Z", + "pushed_at": "2020-09-03T19:05:36Z", + "git_url": "git://github.com/hub4j-test-org/updateOutdatedBranches.git", + "ssh_url": "git@github.com:hub4j-test-org/updateOutdatedBranches.git", + "clone_url": "https://github.com/hub4j-test-org/updateOutdatedBranches.git", + "svn_url": "https://github.com/hub4j-test-org/updateOutdatedBranches", + "homepage": null, + "size": 1, + "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": 1, + "license": null, + "forks": 0, + "open_issues": 1, + "watchers": 0, + "default_branch": "master" + } + }, + "base": { + "label": "hub4j-test-org:master", + "ref": "master", + "sha": "1300f2d207d52857bc92d37747d032aaab7a802e", + "user": { + "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 + }, + "repo": { + "id": 292640382, + "node_id": "MDEwOlJlcG9zaXRvcnkyOTI2NDAzODI=", + "name": "updateOutdatedBranches", + "full_name": "hub4j-test-org/updateOutdatedBranches", + "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/updateOutdatedBranches", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches", + "forks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/deployments", + "created_at": "2020-09-03T17:47:33Z", + "updated_at": "2020-09-03T17:51:34Z", + "pushed_at": "2020-09-03T19:05:36Z", + "git_url": "git://github.com/hub4j-test-org/updateOutdatedBranches.git", + "ssh_url": "git@github.com:hub4j-test-org/updateOutdatedBranches.git", + "clone_url": "https://github.com/hub4j-test-org/updateOutdatedBranches.git", + "svn_url": "https://github.com/hub4j-test-org/updateOutdatedBranches", + "homepage": null, + "size": 1, + "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": 1, + "license": null, + "forks": 0, + "open_issues": 1, + "watchers": 0, + "default_branch": "master" + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/9" + }, + "html": { + "href": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/9" + }, + "issue": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/9" + }, + "comments": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/9/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/9/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/9/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/6440189369f9f33b2366556a94dbc26f2cfdd969" + } + }, + "author_association": "MEMBER", + "active_lock_reason": null, + "merged": false, + "mergeable": true, + "rebaseable": true, + "mergeable_state": "behind", + "merged_by": null, + "comments": 0, + "review_comments": 0, + "maintainer_can_modify": false, + "commits": 1, + "additions": 1, + "deletions": 0, + "changed_files": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/__files/repos_hub4j-test-org_updateoutdatedbranches_pulls_9-9.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/__files/repos_hub4j-test-org_updateoutdatedbranches_pulls_9-9.json new file mode 100644 index 0000000000..4fb3d0c06d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/__files/repos_hub4j-test-org_updateoutdatedbranches_pulls_9-9.json @@ -0,0 +1,329 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/9", + "id": 478836965, + "node_id": "MDExOlB1bGxSZXF1ZXN0NDc4ODM2OTY1", + "html_url": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/9", + "diff_url": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/9.diff", + "patch_url": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/9.patch", + "issue_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/9", + "number": 9, + "state": "closed", + "locked": false, + "title": "testUpdateOutdatedBranches", + "user": { + "login": "tginiotis-at-work", + "id": 61763026, + "node_id": "MDQ6VXNlcjYxNzYzMDI2", + "avatar_url": "https://avatars3.githubusercontent.com/u/61763026?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/tginiotis-at-work", + "html_url": "https://github.com/tginiotis-at-work", + "followers_url": "https://api.github.com/users/tginiotis-at-work/followers", + "following_url": "https://api.github.com/users/tginiotis-at-work/following{/other_user}", + "gists_url": "https://api.github.com/users/tginiotis-at-work/gists{/gist_id}", + "starred_url": "https://api.github.com/users/tginiotis-at-work/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/tginiotis-at-work/subscriptions", + "organizations_url": "https://api.github.com/users/tginiotis-at-work/orgs", + "repos_url": "https://api.github.com/users/tginiotis-at-work/repos", + "events_url": "https://api.github.com/users/tginiotis-at-work/events{/privacy}", + "received_events_url": "https://api.github.com/users/tginiotis-at-work/received_events", + "type": "User", + "site_admin": false + }, + "body": "## test", + "created_at": "2020-09-03T19:05:36Z", + "updated_at": "2020-09-03T19:05:43Z", + "closed_at": "2020-09-03T19:05:43Z", + "merged_at": null, + "merge_commit_sha": "344bd06243df84e130c26ea273a15d59b7220f57", + "assignee": null, + "assignees": [], + "requested_reviewers": [], + "requested_teams": [], + "labels": [], + "milestone": null, + "draft": false, + "commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/9/commits", + "review_comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/9/comments", + "review_comment_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/9/comments", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/6440189369f9f33b2366556a94dbc26f2cfdd969", + "head": { + "label": "hub4j-test-org:outdated", + "ref": "outdated", + "sha": "6440189369f9f33b2366556a94dbc26f2cfdd969", + "user": { + "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 + }, + "repo": { + "id": 292640382, + "node_id": "MDEwOlJlcG9zaXRvcnkyOTI2NDAzODI=", + "name": "updateOutdatedBranches", + "full_name": "hub4j-test-org/updateOutdatedBranches", + "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/updateOutdatedBranches", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches", + "forks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/deployments", + "created_at": "2020-09-03T17:47:33Z", + "updated_at": "2020-09-03T17:51:34Z", + "pushed_at": "2020-09-03T19:05:43Z", + "git_url": "git://github.com/hub4j-test-org/updateOutdatedBranches.git", + "ssh_url": "git@github.com:hub4j-test-org/updateOutdatedBranches.git", + "clone_url": "https://github.com/hub4j-test-org/updateOutdatedBranches.git", + "svn_url": "https://github.com/hub4j-test-org/updateOutdatedBranches", + "homepage": null, + "size": 1, + "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" + } + }, + "base": { + "label": "hub4j-test-org:master", + "ref": "master", + "sha": "1300f2d207d52857bc92d37747d032aaab7a802e", + "user": { + "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 + }, + "repo": { + "id": 292640382, + "node_id": "MDEwOlJlcG9zaXRvcnkyOTI2NDAzODI=", + "name": "updateOutdatedBranches", + "full_name": "hub4j-test-org/updateOutdatedBranches", + "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/updateOutdatedBranches", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches", + "forks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/deployments", + "created_at": "2020-09-03T17:47:33Z", + "updated_at": "2020-09-03T17:51:34Z", + "pushed_at": "2020-09-03T19:05:43Z", + "git_url": "git://github.com/hub4j-test-org/updateOutdatedBranches.git", + "ssh_url": "git@github.com:hub4j-test-org/updateOutdatedBranches.git", + "clone_url": "https://github.com/hub4j-test-org/updateOutdatedBranches.git", + "svn_url": "https://github.com/hub4j-test-org/updateOutdatedBranches", + "homepage": null, + "size": 1, + "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" + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/9" + }, + "html": { + "href": "https://github.com/hub4j-test-org/updateOutdatedBranches/pull/9" + }, + "issue": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/9" + }, + "comments": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/issues/9/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/9/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/9/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/statuses/6440189369f9f33b2366556a94dbc26f2cfdd969" + } + }, + "author_association": "MEMBER", + "active_lock_reason": null, + "merged": false, + "mergeable": null, + "rebaseable": null, + "mergeable_state": "unknown", + "merged_by": null, + "comments": 0, + "review_comments": 0, + "maintainer_can_modify": false, + "commits": 1, + "additions": 1, + "deletions": 0, + "changed_files": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/orgs_hub4j-test-org-1.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/orgs_hub4j-test-org-1.json new file mode 100644 index 0000000000..eadbe9f693 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/orgs_hub4j-test-org-1.json @@ -0,0 +1,46 @@ +{ + "id": "3f743c3c-4305-4844-9cc0-fb15599be517", + "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-1.json", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:34 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"ea860001e36aab2981aba60cd49099af\"", + "Last-Modified": "Thu, 04 Jun 2020 05:56:10 GMT", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4664", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "336", + "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": "C86E:BABF:11398CC:14CDFEE:5F513E7D" + } + }, + "uuid": "3f743c3c-4305-4844-9cc0-fb15599be517", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/repos_hub4j-test-org_updateoutdatedbranches-2.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/repos_hub4j-test-org_updateoutdatedbranches-2.json new file mode 100644 index 0000000000..8b4ff0df44 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/repos_hub4j-test-org_updateoutdatedbranches-2.json @@ -0,0 +1,46 @@ +{ + "id": "d64c5374-e59e-441b-9005-23235579d793", + "name": "repos_hub4j-test-org_updateoutdatedbranches", + "request": { + "url": "/repos/hub4j-test-org/updateOutdatedBranches", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_updateoutdatedbranches-2.json", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:34 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"db96b19056459bff5598a99c43b57210\"", + "Last-Modified": "Thu, 03 Sep 2020 17:51:34 GMT", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4663", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "337", + "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": "C86E:BABF:11398D2:14CDFF3:5F513E7E" + } + }, + "uuid": "d64c5374-e59e-441b-9005-23235579d793", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-3.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-3.json new file mode 100644 index 0000000000..44d577112a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-3.json @@ -0,0 +1,47 @@ +{ + "id": "23e7e0ec-5a82-499b-bd3c-437d03dc5ed9", + "name": "repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated", + "request": { + "url": "/repos/hub4j-test-org/updateOutdatedBranches/git/refs/heads/outdated", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-3.json", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:34 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"97243bb641512537ce424b3c091b05e2\"", + "Last-Modified": "Thu, 03 Sep 2020 19:05:29 GMT", + "X-Poll-Interval": "300", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4662", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "338", + "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": "C86E:BABF:11398D8:14CDFF9:5F513E7E" + } + }, + "uuid": "23e7e0ec-5a82-499b-bd3c-437d03dc5ed9", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-4.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-4.json new file mode 100644 index 0000000000..8cf61ce9d4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-4.json @@ -0,0 +1,52 @@ +{ + "id": "f714e482-61ac-428a-ad9b-6cbb0822bbcf", + "name": "repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated", + "request": { + "url": "/repos/hub4j-test-org/updateOutdatedBranches/git/refs/heads/outdated", + "method": "PATCH", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"force\":true,\"sha\":\"6440189369f9f33b2366556a94dbc26f2cfdd969\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-4.json", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:35 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"b83e379d80a899ec6c708b8a1a5f746f\"", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4661", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "339", + "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": "C86E:BABF:11398DB:14CE002:5F513E7E" + } + }, + "uuid": "f714e482-61ac-428a-ad9b-6cbb0822bbcf", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-7.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-7.json new file mode 100644 index 0000000000..012954d35b --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-7.json @@ -0,0 +1,52 @@ +{ + "id": "38c5ccfb-39ea-4724-9775-fc0c0c289503", + "name": "repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated", + "request": { + "url": "/repos/hub4j-test-org/updateOutdatedBranches/git/refs/heads/outdated", + "method": "PATCH", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"force\":true,\"sha\":\"f567328eb81270487864963b7d7446953353f2b5\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_updateoutdatedbranches_git_refs_heads_outdated-7.json", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:42 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"906a27b3d6f7291ded0bc7756a9a07c9\"", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4658", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "342", + "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": "C86E:BABF:1139952:14CE09D:5F513E86" + } + }, + "uuid": "38c5ccfb-39ea-4724-9775-fc0c0c289503", + "persistent": true, + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls-5.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls-5.json new file mode 100644 index 0000000000..9ec939795a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls-5.json @@ -0,0 +1,53 @@ +{ + "id": "93d23b65-a59f-4c10-936e-6c6e97215fb8", + "name": "repos_hub4j-test-org_updateoutdatedbranches_pulls", + "request": { + "url": "/repos/hub4j-test-org/updateOutdatedBranches/pulls", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.shadow-cat-preview+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"head\":\"outdated\",\"draft\":false,\"maintainer_can_modify\":true,\"title\":\"testUpdateOutdatedBranches\",\"body\":\"## test\",\"base\":\"master\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_hub4j-test-org_updateoutdatedbranches_pulls-5.json", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:36 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "201 Created", + "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": "\"36242180e9b56e9bb401bc17370064d6\"", + "Location": "https://api.github.com/repos/hub4j-test-org/updateOutdatedBranches/pulls/9", + "X-GitHub-Media-Type": "github.v3; param=shadow-cat-preview; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4660", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "340", + "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": "C86E:BABF:11398E9:14CE00F:5F513E7F" + } + }, + "uuid": "93d23b65-a59f-4c10-936e-6c6e97215fb8", + "persistent": true, + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls_9-6.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls_9-6.json new file mode 100644 index 0000000000..1702cdd13d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls_9-6.json @@ -0,0 +1,46 @@ +{ + "id": "ce75c972-790c-4198-a388-087205d78e43", + "name": "repos_hub4j-test-org_updateoutdatedbranches_pulls_9", + "request": { + "url": "/repos/hub4j-test-org/updateOutdatedBranches/pulls/9", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.shadow-cat-preview+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_updateoutdatedbranches_pulls_9-6.json", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:42 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"7e6ec7a092cd314ea7476c98c5ae5bdc\"", + "Last-Modified": "Thu, 03 Sep 2020 19:05:36 GMT", + "X-GitHub-Media-Type": "github.v3; param=shadow-cat-preview; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4659", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "341", + "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": "C86E:BABF:1139947:14CE030:5F513E80" + } + }, + "uuid": "ce75c972-790c-4198-a388-087205d78e43", + "persistent": true, + "insertionIndex": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls_9-9.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls_9-9.json new file mode 100644 index 0000000000..f6bc92de2f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls_9-9.json @@ -0,0 +1,52 @@ +{ + "id": "35d9a23c-f552-47fa-b5a6-3521de469b02", + "name": "repos_hub4j-test-org_updateoutdatedbranches_pulls_9", + "request": { + "url": "/repos/hub4j-test-org/updateOutdatedBranches/pulls/9", + "method": "PATCH", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"state\":\"closed\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_updateoutdatedbranches_pulls_9-9.json", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:44 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With", + "Accept-Encoding" + ], + "ETag": "W/\"0feed482794a521ea1bdb79dfa87ff12\"", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4656", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "344", + "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": "C86E:BABF:1139964:14CE0AF:5F513E87" + } + }, + "uuid": "35d9a23c-f552-47fa-b5a6-3521de469b02", + "persistent": true, + "insertionIndex": 9 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls_9_update-branch-8.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls_9_update-branch-8.json new file mode 100644 index 0000000000..9d1a26cfb2 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/updateOutdatedBranchesUnexpectedHead/mappings/repos_hub4j-test-org_updateoutdatedbranches_pulls_9_update-branch-8.json @@ -0,0 +1,46 @@ +{ + "id": "1d311b29-700c-4687-892b-f610e8bcbaa4", + "name": "repos_hub4j-test-org_updateoutdatedbranches_pulls_9_update-branch", + "request": { + "url": "/repos/hub4j-test-org/updateOutdatedBranches/pulls/9/update-branch", + "method": "PUT", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.lydian-preview+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"expected_head_sha\":\"6440189369f9f33b2366556a94dbc26f2cfdd969\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 422, + "body": "{\"message\":\"expected head sha didn’t match current head ref.\",\"documentation_url\":\"https://docs.github.com/rest/reference/pulls#update-a-pull-request-branch\"}", + "headers": { + "Date": "Thu, 03 Sep 2020 19:05:43 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "422 Unprocessable Entity", + "X-GitHub-Media-Type": "github.lydian-preview; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4657", + "X-RateLimit-Reset": "1599161295", + "X-RateLimit-Used": "343", + "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": "C86E:BABF:113995C:14CE0A8:5F513E86" + } + }, + "uuid": "1d311b29-700c-4687-892b-f610e8bcbaa4", + "persistent": true, + "insertionIndex": 8 +} \ No newline at end of file