-
Notifications
You must be signed in to change notification settings - Fork 736
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add withName method to GHCheckRunBuilder (#1769)
* issue1587: withName method created in GHCheckRunBuilder and its test has been written. * issue1587: test * issue1587: new test added to coverage missing lines and javadoc edited * issue1587: formatted --------- Co-authored-by: mehmet.afacan <[email protected]> Co-authored-by: Liam Newman <[email protected]>
- Loading branch information
1 parent
665a723
commit 0f19519
Showing
22 changed files
with
1,173 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...g/kohsuke/github/GHCheckRunBuilderTest/wiremock/updateCheckRunWithName/__files/1-app.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"id": 89368, | ||
"slug": "ghapi-test-app-3", | ||
"node_id": "MDM6QXBwODkzNjg=", | ||
"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 | ||
}, | ||
"name": "GHApi Test app 3", | ||
"description": "Test app for checks api testing", | ||
"external_url": "http://localhost", | ||
"html_url": "https://github.com/apps/ghapi-test-app-3", | ||
"created_at": "2020-11-19T14:30:34Z", | ||
"updated_at": "2020-11-19T14:30:34Z", | ||
"permissions": { | ||
"checks": "write", | ||
"metadata": "read" | ||
}, | ||
"events": [], | ||
"installations_count": 1 | ||
} |
45 changes: 45 additions & 0 deletions
45
...ub/GHCheckRunBuilderTest/wiremock/updateCheckRunWithName/__files/2-app_installations.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
[ | ||
{ | ||
"id": 13064215, | ||
"account": { | ||
"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 | ||
}, | ||
"repository_selection": "selected", | ||
"access_tokens_url": "https://api.github.com/app/installations/13064215/access_tokens", | ||
"repositories_url": "https://api.github.com/installation/repositories", | ||
"html_url": "https://github.com/organizations/hub4j-test-org/settings/installations/13064215", | ||
"app_id": 89368, | ||
"app_slug": "ghapi-test-app-3", | ||
"target_id": 7544739, | ||
"target_type": "Organization", | ||
"permissions": { | ||
"checks": "write", | ||
"metadata": "read" | ||
}, | ||
"events": [], | ||
"created_at": "2020-11-19T14:33:27.000Z", | ||
"updated_at": "2020-11-19T14:33:27.000Z", | ||
"single_file_name": null, | ||
"has_multiple_single_files": false, | ||
"single_file_paths": [], | ||
"suspended_by": null, | ||
"suspended_at": null | ||
} | ||
] |
121 changes: 121 additions & 0 deletions
121
...thub/GHCheckRunBuilderTest/wiremock/updateCheckRunWithName/__files/4-r_h_test-checks.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
{ | ||
"id": 314259932, | ||
"node_id": "MDEwOlJlcG9zaXRvcnkzMTQyNTk5MzI=", | ||
"name": "test-checks", | ||
"full_name": "hub4j-test-org/test-checks", | ||
"private": true, | ||
"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/test-checks", | ||
"description": "Repo for testing the checks API", | ||
"fork": false, | ||
"url": "https://api.github.com/repos/hub4j-test-org/test-checks", | ||
"forks_url": "https://api.github.com/repos/hub4j-test-org/test-checks/forks", | ||
"keys_url": "https://api.github.com/repos/hub4j-test-org/test-checks/keys{/key_id}", | ||
"collaborators_url": "https://api.github.com/repos/hub4j-test-org/test-checks/collaborators{/collaborator}", | ||
"teams_url": "https://api.github.com/repos/hub4j-test-org/test-checks/teams", | ||
"hooks_url": "https://api.github.com/repos/hub4j-test-org/test-checks/hooks", | ||
"issue_events_url": "https://api.github.com/repos/hub4j-test-org/test-checks/issues/events{/number}", | ||
"events_url": "https://api.github.com/repos/hub4j-test-org/test-checks/events", | ||
"assignees_url": "https://api.github.com/repos/hub4j-test-org/test-checks/assignees{/user}", | ||
"branches_url": "https://api.github.com/repos/hub4j-test-org/test-checks/branches{/branch}", | ||
"tags_url": "https://api.github.com/repos/hub4j-test-org/test-checks/tags", | ||
"blobs_url": "https://api.github.com/repos/hub4j-test-org/test-checks/git/blobs{/sha}", | ||
"git_tags_url": "https://api.github.com/repos/hub4j-test-org/test-checks/git/tags{/sha}", | ||
"git_refs_url": "https://api.github.com/repos/hub4j-test-org/test-checks/git/refs{/sha}", | ||
"trees_url": "https://api.github.com/repos/hub4j-test-org/test-checks/git/trees{/sha}", | ||
"statuses_url": "https://api.github.com/repos/hub4j-test-org/test-checks/statuses/{sha}", | ||
"languages_url": "https://api.github.com/repos/hub4j-test-org/test-checks/languages", | ||
"stargazers_url": "https://api.github.com/repos/hub4j-test-org/test-checks/stargazers", | ||
"contributors_url": "https://api.github.com/repos/hub4j-test-org/test-checks/contributors", | ||
"subscribers_url": "https://api.github.com/repos/hub4j-test-org/test-checks/subscribers", | ||
"subscription_url": "https://api.github.com/repos/hub4j-test-org/test-checks/subscription", | ||
"commits_url": "https://api.github.com/repos/hub4j-test-org/test-checks/commits{/sha}", | ||
"git_commits_url": "https://api.github.com/repos/hub4j-test-org/test-checks/git/commits{/sha}", | ||
"comments_url": "https://api.github.com/repos/hub4j-test-org/test-checks/comments{/number}", | ||
"issue_comment_url": "https://api.github.com/repos/hub4j-test-org/test-checks/issues/comments{/number}", | ||
"contents_url": "https://api.github.com/repos/hub4j-test-org/test-checks/contents/{+path}", | ||
"compare_url": "https://api.github.com/repos/hub4j-test-org/test-checks/compare/{base}...{head}", | ||
"merges_url": "https://api.github.com/repos/hub4j-test-org/test-checks/merges", | ||
"archive_url": "https://api.github.com/repos/hub4j-test-org/test-checks/{archive_format}{/ref}", | ||
"downloads_url": "https://api.github.com/repos/hub4j-test-org/test-checks/downloads", | ||
"issues_url": "https://api.github.com/repos/hub4j-test-org/test-checks/issues{/number}", | ||
"pulls_url": "https://api.github.com/repos/hub4j-test-org/test-checks/pulls{/number}", | ||
"milestones_url": "https://api.github.com/repos/hub4j-test-org/test-checks/milestones{/number}", | ||
"notifications_url": "https://api.github.com/repos/hub4j-test-org/test-checks/notifications{?since,all,participating}", | ||
"labels_url": "https://api.github.com/repos/hub4j-test-org/test-checks/labels{/name}", | ||
"releases_url": "https://api.github.com/repos/hub4j-test-org/test-checks/releases{/id}", | ||
"deployments_url": "https://api.github.com/repos/hub4j-test-org/test-checks/deployments", | ||
"created_at": "2020-11-19T13:41:45Z", | ||
"updated_at": "2020-11-19T13:41:50Z", | ||
"pushed_at": "2020-11-19T13:41:47Z", | ||
"git_url": "git://github.com/hub4j-test-org/test-checks.git", | ||
"ssh_url": "[email protected]:hub4j-test-org/test-checks.git", | ||
"clone_url": "https://github.com/hub4j-test-org/test-checks.git", | ||
"svn_url": "https://github.com/hub4j-test-org/test-checks", | ||
"homepage": null, | ||
"size": 0, | ||
"stargazers_count": 0, | ||
"watchers_count": 0, | ||
"language": null, | ||
"has_issues": true, | ||
"has_projects": true, | ||
"has_downloads": true, | ||
"has_wiki": true, | ||
"has_pages": false, | ||
"forks_count": 0, | ||
"mirror_url": null, | ||
"archived": false, | ||
"disabled": false, | ||
"open_issues_count": 0, | ||
"license": null, | ||
"forks": 0, | ||
"open_issues": 0, | ||
"watchers": 0, | ||
"default_branch": "main", | ||
"permissions": { | ||
"admin": false, | ||
"push": false, | ||
"pull": false | ||
}, | ||
"organization": { | ||
"login": "hub4j-test-org", | ||
"id": 7544739, | ||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", | ||
"avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", | ||
"gravatar_id": "", | ||
"url": "https://api.github.com/users/hub4j-test-org", | ||
"html_url": "https://github.com/hub4j-test-org", | ||
"followers_url": "https://api.github.com/users/hub4j-test-org/followers", | ||
"following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", | ||
"gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", | ||
"starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", | ||
"subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", | ||
"organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", | ||
"repos_url": "https://api.github.com/users/hub4j-test-org/repos", | ||
"events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", | ||
"received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", | ||
"type": "Organization", | ||
"site_admin": false | ||
}, | ||
"network_count": 0, | ||
"subscribers_count": 8 | ||
} |
61 changes: 61 additions & 0 deletions
61
...hub/GHCheckRunBuilderTest/wiremock/updateCheckRunWithName/__files/5-r_h_t_check-runs.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"id": 1424883037, | ||
"node_id": "MDg6Q2hlY2tSdW4xNDI0ODgzMDM3", | ||
"head_sha": "89a9ae301e35e667756034fdc933b1fc94f63fc1", | ||
"external_id": "", | ||
"url": "https://api.github.com/repos/hub4j-test-org/test-checks/check-runs/1424883037", | ||
"html_url": "https://github.com/hub4j-test-org/test-checks/runs/1424883037", | ||
"details_url": "http://localhost", | ||
"status": "in_progress", | ||
"conclusion": null, | ||
"started_at": "1970-01-12T13:46:39Z", | ||
"completed_at": null, | ||
"output": { | ||
"title": "Some Title", | ||
"summary": "what happened…", | ||
"text": null, | ||
"annotations_count": 1, | ||
"annotations_url": "https://api.github.com/repos/hub4j-test-org/test-checks/check-runs/1424883037/annotations" | ||
}, | ||
"name": "foo", | ||
"check_suite": { | ||
"id": 1529145983 | ||
}, | ||
"app": { | ||
"id": 89368, | ||
"slug": "ghapi-test-app-3", | ||
"node_id": "MDM6QXBwODkzNjg=", | ||
"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 | ||
}, | ||
"name": "GHApi Test app 3", | ||
"description": "Test app for checks api testing", | ||
"external_url": "http://localhost", | ||
"html_url": "https://github.com/apps/ghapi-test-app-3", | ||
"created_at": "2020-11-19T14:30:34Z", | ||
"updated_at": "2020-11-19T14:30:34Z", | ||
"permissions": { | ||
"checks": "write", | ||
"metadata": "read" | ||
}, | ||
"events": [] | ||
}, | ||
"pull_requests": [] | ||
} |
Oops, something went wrong.