Minor tweaks

This commit is contained in:
Liam Newman
2020-07-27 14:12:15 -07:00
parent 59e0046c1e
commit 43063fe8ce
7 changed files with 8 additions and 387 deletions

View File

@@ -74,8 +74,10 @@ public class GHMilestoneTest extends AbstractGitHubWireMockTest {
public void testUnsetMilestoneFromPullRequest() throws IOException {
GHRepository repo = getRepository();
GHMilestone milestone = repo.createMilestone("Unset Test Milestone", "For testUnsetMilestone");
GHPullRequest p = getRepository()
.createPullRequest("testUnsetMilestoneFromPullRequest", "test/stable", "master", "## test");
GHPullRequest p = repo.createPullRequest("testUnsetMilestoneFromPullRequest",
"test/stable",
"master",
"## test pull request");
// set the milestone
p.setMilestone(milestone);

View File

@@ -1,332 +0,0 @@
{
"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-07-27T20:44:55Z",
"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": 19050,
"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-07-27T20:33:12Z",
"pushed_at": "2020-07-27T20:38:26Z",
"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": 24664,
"stargazers_count": 687,
"watchers_count": 687,
"language": "Java",
"has_issues": true,
"has_projects": true,
"has_downloads": true,
"has_wiki": true,
"has_pages": true,
"forks_count": 493,
"mirror_url": null,
"archived": false,
"disabled": false,
"open_issues_count": 70,
"license": {
"key": "mit",
"name": "MIT License",
"spdx_id": "MIT",
"url": "https://api.github.com/licenses/mit",
"node_id": "MDc6TGljZW5zZTEz"
},
"forks": 493,
"open_issues": 70,
"watchers": 687,
"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-07-27T20:33:12Z",
"pushed_at": "2020-07-27T20:38:26Z",
"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": 24664,
"stargazers_count": 687,
"watchers_count": 687,
"language": "Java",
"has_issues": true,
"has_projects": true,
"has_downloads": true,
"has_wiki": true,
"has_pages": true,
"forks_count": 493,
"mirror_url": null,
"archived": false,
"disabled": false,
"open_issues_count": 70,
"license": {
"key": "mit",
"name": "MIT License",
"spdx_id": "MIT",
"url": "https://api.github.com/licenses/mit",
"node_id": "MDc6TGljZW5zZTEz"
},
"forks": 493,
"open_issues": 70,
"watchers": 687,
"default_branch": "master"
},
"network_count": 493,
"subscribers_count": 0
}

View File

@@ -30,7 +30,7 @@
"type": "User",
"site_admin": false
},
"body": "## test",
"body": "## test pull request",
"created_at": "2020-07-27T20:46:37Z",
"updated_at": "2020-07-27T20:46:37Z",
"closed_at": null,

View File

@@ -30,7 +30,7 @@
"type": "User",
"site_admin": false
},
"body": "## test",
"body": "## test pull request",
"created_at": "2020-07-27T20:46:37Z",
"updated_at": "2020-07-27T20:46:39Z",
"closed_at": null,

View File

@@ -30,7 +30,7 @@
"type": "User",
"site_admin": false
},
"body": "## test",
"body": "## test pull request",
"created_at": "2020-07-27T20:46:37Z",
"updated_at": "2020-07-27T20:46:38Z",
"closed_at": null,

View File

@@ -1,49 +0,0 @@
{
"id": "9f855f1f-a388-4d78-9551-e1d5136fc804",
"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-5.json",
"headers": {
"Date": "Mon, 27 Jul 2020 20:46:36 GMT",
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4909",
"X-RateLimit-Reset": "1595885200",
"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/\"5a80625b81785acf0855c7e7cb5bf574\"",
"Last-Modified": "Wed, 10 Jun 2020 23:27:59 GMT",
"X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages",
"X-Accepted-OAuth-Scopes": "repo",
"X-GitHub-Media-Type": "unknown, github.v3",
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
"X-Frame-Options": "deny",
"X-Content-Type-Options": "nosniff",
"X-XSS-Protection": "1; mode=block",
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
"Content-Security-Policy": "default-src 'none'",
"X-GitHub-Request-Id": "C730:4712:B35F7C:FFAB61:5F1F3D2C"
}
},
"uuid": "9f855f1f-a388-4d78-9551-e1d5136fc804",
"persistent": true,
"scenarioName": "scenario-1-repos-hub4j-test-org-github-api",
"requiredScenarioState": "scenario-1-repos-hub4j-test-org-github-api-2",
"insertionIndex": 5
}

View File

@@ -11,7 +11,7 @@
},
"bodyPatterns": [
{
"equalToJson": "{\"head\":\"test/stable\",\"draft\":false,\"maintainer_can_modify\":true,\"title\":\"testUnsetMilestoneFromPullRequest\",\"body\":\"## test\",\"base\":\"master\"}",
"equalToJson": "{\"head\":\"test/stable\",\"draft\":false,\"maintainer_can_modify\":true,\"title\":\"testUnsetMilestoneFromPullRequest\",\"body\":\"## test pull request\",\"base\":\"master\"}",
"ignoreArrayOrder": true,
"ignoreExtraElements": false
}