From ea060be67dad522ab6c31444fc4274955ac6e918 Mon Sep 17 00:00:00 2001 From: Kezhi Xiong Date: Mon, 17 Aug 2020 22:16:14 +0800 Subject: [PATCH] Use rerequested action created by github instead of user requested action --- .../github/CheckRunGHEventSubscriber.java | 17 +- .../github/CheckRunGHEventSubscriberTest.java | 40 +-- .../check-run-event-with-created-action.json | 307 ++++++++++++++++++ ...un-event-with-rerun-action-for-master.json | 179 +++++----- ...ck-run-event-with-rerun-action-for-pr.json | 261 ++++++++------- 5 files changed, 548 insertions(+), 256 deletions(-) create mode 100644 src/test/resources/io/jenkins/plugins/checks/github/CheckRunGHEventSubscriberTest/check-run-event-with-created-action.json diff --git a/src/main/java/io/jenkins/plugins/checks/github/CheckRunGHEventSubscriber.java b/src/main/java/io/jenkins/plugins/checks/github/CheckRunGHEventSubscriber.java index 8d1799ed..ce0f69f2 100644 --- a/src/main/java/io/jenkins/plugins/checks/github/CheckRunGHEventSubscriber.java +++ b/src/main/java/io/jenkins/plugins/checks/github/CheckRunGHEventSubscriber.java @@ -64,21 +64,18 @@ protected Set events() { @Override protected void onEvent(final GHSubscriberEvent event) { - // TODO: open a PR in Checks API to expose properties in GHRequestedAction final String payload = event.getPayload(); - JSONObject json = JSONObject.fromObject(payload); - if (!json.getString("action").equals("requested_action") - || !json.getJSONObject("requested_action").get("identifier").equals("rerun")) { - LOGGER.log(Level.FINE, "Unsupported check run event: " + payload.replaceAll("[\r\n]", "")); - return; - } - GHEventPayload.CheckRun checkRun; try { checkRun = GitHub.offline().parseEventPayload(new StringReader(payload), GHEventPayload.CheckRun.class); } catch (IOException e) { - throw new IllegalStateException("Could not parse check run event: " + payload.replaceAll("\r\n", ""), e); + throw new IllegalStateException("Could not parse check run event: " + payload.replaceAll("[\r\n]", ""), e); + } + + if (!checkRun.getAction().equals("rerequested")) { + LOGGER.log(Level.FINE, "Unsupported check run action: " + checkRun.getAction().replaceAll("[\r\n]", "")); + return; } LOGGER.log(Level.INFO, "Received rerun request through GitHub checks API."); @@ -108,7 +105,7 @@ private void scheduleRerun(final GHEventPayload.CheckRun checkRun, final String } LOGGER.log(Level.WARNING, String.format("No proper job found for the rerun request from repository: %s and " - + "branch: %s", repository.getFullName(), branchName).replaceAll("\r\n", "")); + + "branch: %s", repository.getFullName(), branchName).replaceAll("[\r\n]", "")); } /** diff --git a/src/test/java/io/jenkins/plugins/checks/github/CheckRunGHEventSubscriberTest.java b/src/test/java/io/jenkins/plugins/checks/github/CheckRunGHEventSubscriberTest.java index 8aff0107..c00e13a3 100644 --- a/src/test/java/io/jenkins/plugins/checks/github/CheckRunGHEventSubscriberTest.java +++ b/src/test/java/io/jenkins/plugins/checks/github/CheckRunGHEventSubscriberTest.java @@ -63,7 +63,7 @@ void shouldSubscribeToCheckRunEvent() { } @Test - void shouldProcessCheckRunEventWithRerunAction() throws IOException { + void shouldProcessCheckRunEventWithRerequestedAction() throws IOException { loggerRule.record(CheckRunGHEventSubscriber.class.getName(), Level.INFO).capture(1); new CheckRunGHEventSubscriber(mock(JenkinsFacade.class), mock(GitHubSCMFacade.class)) .onEvent(createEventWithRerunRequest(RERUN_REQUEST_JSON_FOR_PR)); @@ -71,25 +71,11 @@ void shouldProcessCheckRunEventWithRerunAction() throws IOException { } @Test - void shouldIgnoreCheckRunEventWithoutRequestedAction() { - GHSubscriberEvent event = mock(GHSubscriberEvent.class); - when(event.getPayload()).thenReturn("{\"action\":\"created\"}"); - + void shouldIgnoreCheckRunEventWithoutRerequestedAction() throws IOException { loggerRule.record(CheckRunGHEventSubscriber.class.getName(), Level.FINE).capture(1); - new CheckRunGHEventSubscriber(mock(JenkinsFacade.class), mock(GitHubSCMFacade.class)).onEvent(event); - assertThat(loggerRule.getMessages()).contains("Unsupported check run event: {\"action\":\"created\"}"); - } - - @Test - void shouldIgnoreCheckRunEVentWithOtherAction() { - GHSubscriberEvent event = mock(GHSubscriberEvent.class); - when(event.getPayload()).thenReturn("{\"action\":\"requested_action\",\"requested_action\":" + - "{\"identifier\":\"fix\"}}"); - - loggerRule.record(CheckRunGHEventSubscriber.class.getName(), Level.FINE).capture(1); - new CheckRunGHEventSubscriber(mock(JenkinsFacade.class), mock(GitHubSCMFacade.class)).onEvent(event); - assertThat(loggerRule.getMessages()).contains("Unsupported check run event: " + - "{\"action\":\"requested_action\",\"requested_action\":{\"identifier\":\"fix\"}}"); + new CheckRunGHEventSubscriber(mock(JenkinsFacade.class), mock(GitHubSCMFacade.class)) + .onEvent(createEventWithRerunRequest("check-run-event-with-created-action.json")); + assertThat(loggerRule.getMessages()).contains("Unsupported check run action: created"); } @Test @@ -100,10 +86,10 @@ void shouldScheduleRerunForPR() throws IOException { GitHubSCMSource source = mock(GitHubSCMSource.class); when(jenkinsFacade.getAllJobs()).thenReturn(Collections.singletonList(job)); - when(jenkinsFacade.getFullNameOf(job)).thenReturn("Sandbox/PR-1"); + when(jenkinsFacade.getFullNameOf(job)).thenReturn("codingstyle/PR-1"); when(scmFacade.findGitHubSCMSource(job)).thenReturn(Optional.of(source)); when(source.getRepoOwner()).thenReturn("XiongKezhi"); - when(source.getRepository()).thenReturn("Sandbox"); + when(source.getRepository()).thenReturn("codingstyle"); when(job.getNextBuildNumber()).thenReturn(1); when(job.getName()).thenReturn("PR-1"); @@ -111,7 +97,7 @@ void shouldScheduleRerunForPR() throws IOException { new CheckRunGHEventSubscriber(jenkinsFacade, scmFacade) .onEvent(createEventWithRerunRequest(RERUN_REQUEST_JSON_FOR_PR)); assertThat(loggerRule.getMessages()) - .contains("Scheduled rerun (build #1) for job Sandbox/PR-1, requested by XiongKezhi"); + .contains("Scheduled rerun (build #1) for job codingstyle/PR-1, requested by XiongKezhi"); } @Test @@ -122,10 +108,10 @@ void shouldScheduleRerunForMaster() throws IOException { GitHubSCMSource source = mock(GitHubSCMSource.class); when(jenkinsFacade.getAllJobs()).thenReturn(Collections.singletonList(job)); - when(jenkinsFacade.getFullNameOf(job)).thenReturn("Sandbox/master"); + when(jenkinsFacade.getFullNameOf(job)).thenReturn("codingstyle/master"); when(scmFacade.findGitHubSCMSource(job)).thenReturn(Optional.of(source)); when(source.getRepoOwner()).thenReturn("XiongKezhi"); - when(source.getRepository()).thenReturn("Sandbox"); + when(source.getRepository()).thenReturn("codingstyle"); when(job.getNextBuildNumber()).thenReturn(1); when(job.getName()).thenReturn("master"); @@ -133,7 +119,7 @@ void shouldScheduleRerunForMaster() throws IOException { new CheckRunGHEventSubscriber(jenkinsFacade, scmFacade) .onEvent(createEventWithRerunRequest(RERUN_REQUEST_JSON_FOR_MASTER)); assertThat(loggerRule.getMessages()) - .contains("Scheduled rerun (build #1) for job Sandbox/master, requested by XiongKezhi"); + .contains("Scheduled rerun (build #1) for job codingstyle/master, requested by XiongKezhi"); } @Test @@ -196,7 +182,7 @@ void shouldNotScheduleRerunWhenBranchNamesAreDifferent() throws IOException { when(jenkinsFacade.getAllJobs()).thenReturn(Collections.singletonList(job)); when(scmFacade.findGitHubSCMSource(job)).thenReturn(Optional.of(source)); when(source.getRepoOwner()).thenReturn("XiongKezhi"); - when(source.getRepository()).thenReturn("Sandbox"); + when(source.getRepository()).thenReturn("codingstyle"); when(job.getName()).thenReturn("PR-2"); assertNoBuildIsScheduled(jenkinsFacade, scmFacade, createEventWithRerunRequest(RERUN_REQUEST_JSON_FOR_PR)); @@ -215,7 +201,7 @@ private void assertNoBuildIsScheduled(final JenkinsFacade jenkinsFacade, final G loggerRule.record(CheckRunGHEventSubscriber.class.getName(), Level.WARNING).capture(1); new CheckRunGHEventSubscriber(jenkinsFacade, scmFacade).onEvent(event); assertThat(loggerRule.getMessages()) - .contains("No proper job found for the rerun request from repository: XiongKezhi/Sandbox and " + .contains("No proper job found for the rerun request from repository: XiongKezhi/codingstyle and " + "branch: PR-1"); } diff --git a/src/test/resources/io/jenkins/plugins/checks/github/CheckRunGHEventSubscriberTest/check-run-event-with-created-action.json b/src/test/resources/io/jenkins/plugins/checks/github/CheckRunGHEventSubscriberTest/check-run-event-with-created-action.json new file mode 100644 index 00000000..e1c8297f --- /dev/null +++ b/src/test/resources/io/jenkins/plugins/checks/github/CheckRunGHEventSubscriberTest/check-run-event-with-created-action.json @@ -0,0 +1,307 @@ +{ + "action": "created", + "check_run": { + "id": 993905870, + "node_id": "MDg6Q2hlY2tSdW45OTM5MDU4NzA=", + "head_sha": "8eb551d2e1dead07d7791deedc0fe26ce0802cdb", + "external_id": "", + "url": "https://api.github.com/repos/XiongKezhi/codingstyle/check-runs/993905870", + "html_url": "https://github.com/XiongKezhi/codingstyle/runs/993905870", + "details_url": "http://127.0.0.1:8080/job/pipeline-coding-style/job/PR-6/1/", + "status": "completed", + "conclusion": "success", + "started_at": "2020-08-17T14:00:10Z", + "completed_at": "2020-08-17T14:00:10Z", + "output": { + "title": "No new issues, 4 total.", + "summary": "## 4 issues in total:\n- ### 0 new issues\n- ### 4 outstanding issues\n- ### 0 delta issues\n- ### 0 fixed issues", + "text": "## Total Issue Statistics:\n* Error: 0\n* High: 0\n* Normal: 4\n* Low: 0\n## New Issue Statistics:\n* Error: 0\n* High: 0\n* Normal: 0\n* Low: 0\n## Delta Issue Statistics:\n* Error: 0\n* High: 0\n* Normal: 0\n* Low: 0\n", + "annotations_count": 0, + "annotations_url": "https://api.github.com/repos/XiongKezhi/codingstyle/check-runs/993905870/annotations" + }, + "name": "Maven", + "check_suite": { + "id": 1060372754, + "node_id": "MDEwOkNoZWNrU3VpdGUxMDYwMzcyNzU0", + "head_branch": "reproduce-issue", + "head_sha": "8eb551d2e1dead07d7791deedc0fe26ce0802cdb", + "status": "in_progress", + "conclusion": null, + "url": "https://api.github.com/repos/XiongKezhi/codingstyle/check-suites/1060372754", + "before": "0d805f431443b103eefe4a48222884f3ac6acc96", + "after": "8eb551d2e1dead07d7791deedc0fe26ce0802cdb", + "pull_requests": [ + { + "url": "https://api.github.com/repos/XiongKezhi/codingstyle/pulls/6", + "id": 466567081, + "number": 6, + "head": { + "ref": "reproduce-issue", + "sha": "8eb551d2e1dead07d7791deedc0fe26ce0802cdb", + "repo": { + "id": 278546516, + "url": "https://api.github.com/repos/XiongKezhi/codingstyle", + "name": "codingstyle" + } + }, + "base": { + "ref": "master", + "sha": "487d357398fc831d782b1fce1fef7606878f5560", + "repo": { + "id": 278546516, + "url": "https://api.github.com/repos/XiongKezhi/codingstyle", + "name": "codingstyle" + } + } + } + ], + "app": { + "id": 76899, + "slug": "jenkins-checks-api", + "node_id": "MDM6QXBwNzY4OTk=", + "owner": { + "login": "XiongKezhi", + "id": 30348893, + "node_id": "MDQ6VXNlcjMwMzQ4ODkz", + "avatar_url": "https://avatars1.githubusercontent.com/u/30348893?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/XiongKezhi", + "html_url": "https://github.com/XiongKezhi", + "followers_url": "https://api.github.com/users/XiongKezhi/followers", + "following_url": "https://api.github.com/users/XiongKezhi/following{/other_user}", + "gists_url": "https://api.github.com/users/XiongKezhi/gists{/gist_id}", + "starred_url": "https://api.github.com/users/XiongKezhi/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/XiongKezhi/subscriptions", + "organizations_url": "https://api.github.com/users/XiongKezhi/orgs", + "repos_url": "https://api.github.com/users/XiongKezhi/repos", + "events_url": "https://api.github.com/users/XiongKezhi/events{/privacy}", + "received_events_url": "https://api.github.com/users/XiongKezhi/received_events", + "type": "User", + "site_admin": false + }, + "name": "Jenkins Checks API", + "description": "", + "external_url": "https://smee.io/2C4VArPRXWl2zFg", + "html_url": "https://github.com/apps/jenkins-checks-api", + "created_at": "2020-08-14T08:47:10Z", + "updated_at": "2020-08-14T09:04:57Z", + "permissions": { + "checks": "write", + "contents": "write", + "metadata": "read", + "organization_hooks": "write", + "pull_requests": "write", + "repository_hooks": "write", + "statuses": "write" + }, + "events": [ + "check_run", + "commit_comment", + "create", + "pull_request", + "push", + "status" + ] + }, + "created_at": "2020-08-17T13:55:11Z", + "updated_at": "2020-08-17T13:55:34Z" + }, + "app": { + "id": 76899, + "slug": "jenkins-checks-api", + "node_id": "MDM6QXBwNzY4OTk=", + "owner": { + "login": "XiongKezhi", + "id": 30348893, + "node_id": "MDQ6VXNlcjMwMzQ4ODkz", + "avatar_url": "https://avatars1.githubusercontent.com/u/30348893?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/XiongKezhi", + "html_url": "https://github.com/XiongKezhi", + "followers_url": "https://api.github.com/users/XiongKezhi/followers", + "following_url": "https://api.github.com/users/XiongKezhi/following{/other_user}", + "gists_url": "https://api.github.com/users/XiongKezhi/gists{/gist_id}", + "starred_url": "https://api.github.com/users/XiongKezhi/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/XiongKezhi/subscriptions", + "organizations_url": "https://api.github.com/users/XiongKezhi/orgs", + "repos_url": "https://api.github.com/users/XiongKezhi/repos", + "events_url": "https://api.github.com/users/XiongKezhi/events{/privacy}", + "received_events_url": "https://api.github.com/users/XiongKezhi/received_events", + "type": "User", + "site_admin": false + }, + "name": "Jenkins Checks API", + "description": "", + "external_url": "https://smee.io/2C4VArPRXWl2zFg", + "html_url": "https://github.com/apps/jenkins-checks-api", + "created_at": "2020-08-14T08:47:10Z", + "updated_at": "2020-08-14T09:04:57Z", + "permissions": { + "checks": "write", + "contents": "write", + "metadata": "read", + "organization_hooks": "write", + "pull_requests": "write", + "repository_hooks": "write", + "statuses": "write" + }, + "events": [ + "check_run", + "commit_comment", + "create", + "pull_request", + "push", + "status" + ] + }, + "pull_requests": [ + { + "url": "https://api.github.com/repos/XiongKezhi/codingstyle/pulls/6", + "id": 466567081, + "number": 6, + "head": { + "ref": "reproduce-issue", + "sha": "8eb551d2e1dead07d7791deedc0fe26ce0802cdb", + "repo": { + "id": 278546516, + "url": "https://api.github.com/repos/XiongKezhi/codingstyle", + "name": "codingstyle" + } + }, + "base": { + "ref": "master", + "sha": "487d357398fc831d782b1fce1fef7606878f5560", + "repo": { + "id": 278546516, + "url": "https://api.github.com/repos/XiongKezhi/codingstyle", + "name": "codingstyle" + } + } + } + ] + }, + "repository": { + "id": 278546516, + "node_id": "MDEwOlJlcG9zaXRvcnkyNzg1NDY1MTY=", + "name": "codingstyle", + "full_name": "XiongKezhi/codingstyle", + "private": false, + "owner": { + "login": "XiongKezhi", + "id": 30348893, + "node_id": "MDQ6VXNlcjMwMzQ4ODkz", + "avatar_url": "https://avatars1.githubusercontent.com/u/30348893?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/XiongKezhi", + "html_url": "https://github.com/XiongKezhi", + "followers_url": "https://api.github.com/users/XiongKezhi/followers", + "following_url": "https://api.github.com/users/XiongKezhi/following{/other_user}", + "gists_url": "https://api.github.com/users/XiongKezhi/gists{/gist_id}", + "starred_url": "https://api.github.com/users/XiongKezhi/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/XiongKezhi/subscriptions", + "organizations_url": "https://api.github.com/users/XiongKezhi/orgs", + "repos_url": "https://api.github.com/users/XiongKezhi/repos", + "events_url": "https://api.github.com/users/XiongKezhi/events{/privacy}", + "received_events_url": "https://api.github.com/users/XiongKezhi/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/XiongKezhi/codingstyle", + "description": "Java coding style and template project used at Munich university of applied sciences ", + "fork": true, + "url": "https://api.github.com/repos/XiongKezhi/codingstyle", + "forks_url": "https://api.github.com/repos/XiongKezhi/codingstyle/forks", + "keys_url": "https://api.github.com/repos/XiongKezhi/codingstyle/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/XiongKezhi/codingstyle/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/XiongKezhi/codingstyle/teams", + "hooks_url": "https://api.github.com/repos/XiongKezhi/codingstyle/hooks", + "issue_events_url": "https://api.github.com/repos/XiongKezhi/codingstyle/issues/events{/number}", + "events_url": "https://api.github.com/repos/XiongKezhi/codingstyle/events", + "assignees_url": "https://api.github.com/repos/XiongKezhi/codingstyle/assignees{/user}", + "branches_url": "https://api.github.com/repos/XiongKezhi/codingstyle/branches{/branch}", + "tags_url": "https://api.github.com/repos/XiongKezhi/codingstyle/tags", + "blobs_url": "https://api.github.com/repos/XiongKezhi/codingstyle/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/XiongKezhi/codingstyle/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/XiongKezhi/codingstyle/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/XiongKezhi/codingstyle/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/XiongKezhi/codingstyle/statuses/{sha}", + "languages_url": "https://api.github.com/repos/XiongKezhi/codingstyle/languages", + "stargazers_url": "https://api.github.com/repos/XiongKezhi/codingstyle/stargazers", + "contributors_url": "https://api.github.com/repos/XiongKezhi/codingstyle/contributors", + "subscribers_url": "https://api.github.com/repos/XiongKezhi/codingstyle/subscribers", + "subscription_url": "https://api.github.com/repos/XiongKezhi/codingstyle/subscription", + "commits_url": "https://api.github.com/repos/XiongKezhi/codingstyle/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/XiongKezhi/codingstyle/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/XiongKezhi/codingstyle/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/XiongKezhi/codingstyle/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/XiongKezhi/codingstyle/contents/{+path}", + "compare_url": "https://api.github.com/repos/XiongKezhi/codingstyle/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/XiongKezhi/codingstyle/merges", + "archive_url": "https://api.github.com/repos/XiongKezhi/codingstyle/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/XiongKezhi/codingstyle/downloads", + "issues_url": "https://api.github.com/repos/XiongKezhi/codingstyle/issues{/number}", + "pulls_url": "https://api.github.com/repos/XiongKezhi/codingstyle/pulls{/number}", + "milestones_url": "https://api.github.com/repos/XiongKezhi/codingstyle/milestones{/number}", + "notifications_url": "https://api.github.com/repos/XiongKezhi/codingstyle/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/XiongKezhi/codingstyle/labels{/name}", + "releases_url": "https://api.github.com/repos/XiongKezhi/codingstyle/releases{/id}", + "deployments_url": "https://api.github.com/repos/XiongKezhi/codingstyle/deployments", + "created_at": "2020-07-10T05:28:50Z", + "updated_at": "2020-08-17T12:56:37Z", + "pushed_at": "2020-08-17T13:27:38Z", + "git_url": "git://github.com/XiongKezhi/codingstyle.git", + "ssh_url": "git@github.com:XiongKezhi/codingstyle.git", + "clone_url": "https://github.com/XiongKezhi/codingstyle.git", + "svn_url": "https://github.com/XiongKezhi/codingstyle", + "homepage": "", + "size": 1003, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Java", + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 3, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 5, + "license": { + "key": "other", + "name": "Other", + "spdx_id": "NOASSERTION", + "url": null, + "node_id": "MDc6TGljZW5zZTA=" + }, + "forks": 3, + "open_issues": 5, + "watchers": 0, + "default_branch": "master" + }, + "sender": { + "login": "XiongKezhi", + "id": 30348893, + "node_id": "MDQ6VXNlcjMwMzQ4ODkz", + "avatar_url": "https://avatars1.githubusercontent.com/u/30348893?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/XiongKezhi", + "html_url": "https://github.com/XiongKezhi", + "followers_url": "https://api.github.com/users/XiongKezhi/followers", + "following_url": "https://api.github.com/users/XiongKezhi/following{/other_user}", + "gists_url": "https://api.github.com/users/XiongKezhi/gists{/gist_id}", + "starred_url": "https://api.github.com/users/XiongKezhi/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/XiongKezhi/subscriptions", + "organizations_url": "https://api.github.com/users/XiongKezhi/orgs", + "repos_url": "https://api.github.com/users/XiongKezhi/repos", + "events_url": "https://api.github.com/users/XiongKezhi/events{/privacy}", + "received_events_url": "https://api.github.com/users/XiongKezhi/received_events", + "type": "User", + "site_admin": false + }, + "installation": { + "id": 11244691, + "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uMTEyNDQ2OTE=" + } +} \ No newline at end of file diff --git a/src/test/resources/io/jenkins/plugins/checks/github/CheckRunGHEventSubscriberTest/check-run-event-with-rerun-action-for-master.json b/src/test/resources/io/jenkins/plugins/checks/github/CheckRunGHEventSubscriberTest/check-run-event-with-rerun-action-for-master.json index 9f7b4a9d..28e2f217 100644 --- a/src/test/resources/io/jenkins/plugins/checks/github/CheckRunGHEventSubscriberTest/check-run-event-with-rerun-action-for-master.json +++ b/src/test/resources/io/jenkins/plugins/checks/github/CheckRunGHEventSubscriberTest/check-run-event-with-rerun-action-for-master.json @@ -1,35 +1,35 @@ { - "action": "requested_action", + "action": "rerequested", "check_run": { - "id": 990088794, - "node_id": "MDg6Q2hlY2tSdW45OTAwODg3OTQ=", - "head_sha": "8650243c225cd0a9479a96a7ca0565084d82b83f", + "id": 993663296, + "node_id": "MDg6Q2hlY2tSdW45OTM2NjMyOTY=", + "head_sha": "b22fdfec1127073e509224a99a7704eeebdebe11", "external_id": "", - "url": "https://api.github.com/repos/XiongKezhi/Sandbox/check-runs/990088794", - "html_url": "https://github.com/XiongKezhi/Sandbox/runs/990088794", - "details_url": "https://ci.jenkins.io", + "url": "https://api.github.com/repos/XiongKezhi/codingstyle/check-runs/993663296", + "html_url": "https://github.com/XiongKezhi/codingstyle/runs/993663296", + "details_url": "http://127.0.0.1:8080/job/free-coding-style/8/display/redirect", "status": "completed", - "conclusion": "success", - "started_at": "1970-01-12T13:46:39Z", - "completed_at": "1970-01-12T13:46:39Z", + "conclusion": "failure", + "started_at": "2020-08-17T13:01:07Z", + "completed_at": "2020-08-17T13:01:07Z", "output": { - "title": "Found 15 new issues and 5 error issues. Quality Gate: Success.", - "summary": "# A Successful Build", - "text": "## 0 Failures", - "annotations_count": 1, - "annotations_url": "https://api.github.com/repos/XiongKezhi/Sandbox/check-runs/990088794/annotations" + "title": null, + "summary": null, + "text": null, + "annotations_count": 0, + "annotations_url": "https://api.github.com/repos/XiongKezhi/codingstyle/check-runs/993663296/annotations" }, "name": "Jenkins", "check_suite": { - "id": 1050109883, - "node_id": "MDEwOkNoZWNrU3VpdGUxMDUwMTA5ODgz", + "id": 1060102573, + "node_id": "MDEwOkNoZWNrU3VpdGUxMDYwMTAyNTcz", "head_branch": "master", - "head_sha": "8650243c225cd0a9479a96a7ca0565084d82b83f", - "status": "completed", - "conclusion": "success", - "url": "https://api.github.com/repos/XiongKezhi/Sandbox/check-suites/1050109883", - "before": "f8efbfd174beb60f68c5a424e7482a84032b2941", - "after": "8650243c225cd0a9479a96a7ca0565084d82b83f", + "head_sha": "b22fdfec1127073e509224a99a7704eeebdebe11", + "status": "queued", + "conclusion": null, + "url": "https://api.github.com/repos/XiongKezhi/codingstyle/check-suites/1060102573", + "before": "487d357398fc831d782b1fce1fef7606878f5560", + "after": "b22fdfec1127073e509224a99a7704eeebdebe11", "pull_requests": [], "app": { "id": 76899, @@ -79,8 +79,8 @@ "status" ] }, - "created_at": "2020-08-14T08:58:24Z", - "updated_at": "2020-08-14T08:58:43Z" + "created_at": "2020-08-17T12:56:34Z", + "updated_at": "2020-08-17T13:02:34Z" }, "app": { "id": 76899, @@ -132,14 +132,11 @@ }, "pull_requests": [] }, - "requested_action": { - "identifier": "rerun" - }, "repository": { - "id": 265261970, - "node_id": "MDEwOlJlcG9zaXRvcnkyNjUyNjE5NzA=", - "name": "Sandbox", - "full_name": "XiongKezhi/Sandbox", + "id": 278546516, + "node_id": "MDEwOlJlcG9zaXRvcnkyNzg1NDY1MTY=", + "name": "codingstyle", + "full_name": "XiongKezhi/codingstyle", "private": false, "owner": { "login": "XiongKezhi", @@ -161,71 +158,77 @@ "type": "User", "site_admin": false }, - "html_url": "https://github.com/XiongKezhi/Sandbox", - "description": "Sandbox for testing Jenkins Checks API Plugin", - "fork": false, - "url": "https://api.github.com/repos/XiongKezhi/Sandbox", - "forks_url": "https://api.github.com/repos/XiongKezhi/Sandbox/forks", - "keys_url": "https://api.github.com/repos/XiongKezhi/Sandbox/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/XiongKezhi/Sandbox/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/XiongKezhi/Sandbox/teams", - "hooks_url": "https://api.github.com/repos/XiongKezhi/Sandbox/hooks", - "issue_events_url": "https://api.github.com/repos/XiongKezhi/Sandbox/issues/events{/number}", - "events_url": "https://api.github.com/repos/XiongKezhi/Sandbox/events", - "assignees_url": "https://api.github.com/repos/XiongKezhi/Sandbox/assignees{/user}", - "branches_url": "https://api.github.com/repos/XiongKezhi/Sandbox/branches{/branch}", - "tags_url": "https://api.github.com/repos/XiongKezhi/Sandbox/tags", - "blobs_url": "https://api.github.com/repos/XiongKezhi/Sandbox/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/XiongKezhi/Sandbox/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/XiongKezhi/Sandbox/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/XiongKezhi/Sandbox/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/XiongKezhi/Sandbox/statuses/{sha}", - "languages_url": "https://api.github.com/repos/XiongKezhi/Sandbox/languages", - "stargazers_url": "https://api.github.com/repos/XiongKezhi/Sandbox/stargazers", - "contributors_url": "https://api.github.com/repos/XiongKezhi/Sandbox/contributors", - "subscribers_url": "https://api.github.com/repos/XiongKezhi/Sandbox/subscribers", - "subscription_url": "https://api.github.com/repos/XiongKezhi/Sandbox/subscription", - "commits_url": "https://api.github.com/repos/XiongKezhi/Sandbox/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/XiongKezhi/Sandbox/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/XiongKezhi/Sandbox/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/XiongKezhi/Sandbox/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/XiongKezhi/Sandbox/contents/{+path}", - "compare_url": "https://api.github.com/repos/XiongKezhi/Sandbox/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/XiongKezhi/Sandbox/merges", - "archive_url": "https://api.github.com/repos/XiongKezhi/Sandbox/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/XiongKezhi/Sandbox/downloads", - "issues_url": "https://api.github.com/repos/XiongKezhi/Sandbox/issues{/number}", - "pulls_url": "https://api.github.com/repos/XiongKezhi/Sandbox/pulls{/number}", - "milestones_url": "https://api.github.com/repos/XiongKezhi/Sandbox/milestones{/number}", - "notifications_url": "https://api.github.com/repos/XiongKezhi/Sandbox/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/XiongKezhi/Sandbox/labels{/name}", - "releases_url": "https://api.github.com/repos/XiongKezhi/Sandbox/releases{/id}", - "deployments_url": "https://api.github.com/repos/XiongKezhi/Sandbox/deployments", - "created_at": "2020-05-19T13:58:09Z", - "updated_at": "2020-08-13T09:24:15Z", - "pushed_at": "2020-08-16T05:16:47Z", - "git_url": "git://github.com/XiongKezhi/Sandbox.git", - "ssh_url": "git@github.com:XiongKezhi/Sandbox.git", - "clone_url": "https://github.com/XiongKezhi/Sandbox.git", - "svn_url": "https://github.com/XiongKezhi/Sandbox", - "homepage": null, - "size": 1026, + "html_url": "https://github.com/XiongKezhi/codingstyle", + "description": "Java coding style and template project used at Munich university of applied sciences ", + "fork": true, + "url": "https://api.github.com/repos/XiongKezhi/codingstyle", + "forks_url": "https://api.github.com/repos/XiongKezhi/codingstyle/forks", + "keys_url": "https://api.github.com/repos/XiongKezhi/codingstyle/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/XiongKezhi/codingstyle/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/XiongKezhi/codingstyle/teams", + "hooks_url": "https://api.github.com/repos/XiongKezhi/codingstyle/hooks", + "issue_events_url": "https://api.github.com/repos/XiongKezhi/codingstyle/issues/events{/number}", + "events_url": "https://api.github.com/repos/XiongKezhi/codingstyle/events", + "assignees_url": "https://api.github.com/repos/XiongKezhi/codingstyle/assignees{/user}", + "branches_url": "https://api.github.com/repos/XiongKezhi/codingstyle/branches{/branch}", + "tags_url": "https://api.github.com/repos/XiongKezhi/codingstyle/tags", + "blobs_url": "https://api.github.com/repos/XiongKezhi/codingstyle/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/XiongKezhi/codingstyle/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/XiongKezhi/codingstyle/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/XiongKezhi/codingstyle/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/XiongKezhi/codingstyle/statuses/{sha}", + "languages_url": "https://api.github.com/repos/XiongKezhi/codingstyle/languages", + "stargazers_url": "https://api.github.com/repos/XiongKezhi/codingstyle/stargazers", + "contributors_url": "https://api.github.com/repos/XiongKezhi/codingstyle/contributors", + "subscribers_url": "https://api.github.com/repos/XiongKezhi/codingstyle/subscribers", + "subscription_url": "https://api.github.com/repos/XiongKezhi/codingstyle/subscription", + "commits_url": "https://api.github.com/repos/XiongKezhi/codingstyle/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/XiongKezhi/codingstyle/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/XiongKezhi/codingstyle/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/XiongKezhi/codingstyle/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/XiongKezhi/codingstyle/contents/{+path}", + "compare_url": "https://api.github.com/repos/XiongKezhi/codingstyle/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/XiongKezhi/codingstyle/merges", + "archive_url": "https://api.github.com/repos/XiongKezhi/codingstyle/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/XiongKezhi/codingstyle/downloads", + "issues_url": "https://api.github.com/repos/XiongKezhi/codingstyle/issues{/number}", + "pulls_url": "https://api.github.com/repos/XiongKezhi/codingstyle/pulls{/number}", + "milestones_url": "https://api.github.com/repos/XiongKezhi/codingstyle/milestones{/number}", + "notifications_url": "https://api.github.com/repos/XiongKezhi/codingstyle/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/XiongKezhi/codingstyle/labels{/name}", + "releases_url": "https://api.github.com/repos/XiongKezhi/codingstyle/releases{/id}", + "deployments_url": "https://api.github.com/repos/XiongKezhi/codingstyle/deployments", + "created_at": "2020-07-10T05:28:50Z", + "updated_at": "2020-08-17T12:56:37Z", + "pushed_at": "2020-08-17T12:56:34Z", + "git_url": "git://github.com/XiongKezhi/codingstyle.git", + "ssh_url": "git@github.com:XiongKezhi/codingstyle.git", + "clone_url": "https://github.com/XiongKezhi/codingstyle.git", + "svn_url": "https://github.com/XiongKezhi/codingstyle", + "homepage": "", + "size": 999, "stargazers_count": 0, "watchers_count": 0, - "language": null, - "has_issues": true, + "language": "Java", + "has_issues": false, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": false, - "forks_count": 0, + "forks_count": 3, "mirror_url": null, "archived": false, "disabled": false, - "open_issues_count": 3, - "license": null, - "forks": 0, - "open_issues": 3, + "open_issues_count": 5, + "license": { + "key": "other", + "name": "Other", + "spdx_id": "NOASSERTION", + "url": null, + "node_id": "MDc6TGljZW5zZTA=" + }, + "forks": 3, + "open_issues": 5, "watchers": 0, "default_branch": "master" }, diff --git a/src/test/resources/io/jenkins/plugins/checks/github/CheckRunGHEventSubscriberTest/check-run-event-with-rerun-action-for-pr.json b/src/test/resources/io/jenkins/plugins/checks/github/CheckRunGHEventSubscriberTest/check-run-event-with-rerun-action-for-pr.json index 93041a1f..b571f8b4 100644 --- a/src/test/resources/io/jenkins/plugins/checks/github/CheckRunGHEventSubscriberTest/check-run-event-with-rerun-action-for-pr.json +++ b/src/test/resources/io/jenkins/plugins/checks/github/CheckRunGHEventSubscriberTest/check-run-event-with-rerun-action-for-pr.json @@ -1,64 +1,64 @@ { - "action": "requested_action", + "action": "rerequested", "check_run": { - "id": 980966906, - "node_id": "MDg6Q2hlY2tSdW45ODA5NjY5MDY=", - "head_sha": "18c8e2fd86e7aa3748e279c14a00dc3f0b963e7f", + "id": 993923912, + "node_id": "MDg6Q2hlY2tSdW45OTM5MjM5MTI=", + "head_sha": "3c0ea12c02129ff4919afe087616d84547d93539", "external_id": "", - "url": "https://api.github.com/repos/XiongKezhi/Sandbox/check-runs/980966906", - "html_url": "https://github.com/XiongKezhi/Sandbox/runs/980966906", - "details_url": "https://ci.jenkins.io", + "url": "https://api.github.com/repos/XiongKezhi/codingstyle/check-runs/993923912", + "html_url": "https://github.com/XiongKezhi/codingstyle/runs/993923912", + "details_url": "http://127.0.0.1:8080/job/pipeline-coding-style/job/PR-1/2/display/redirect", "status": "completed", - "conclusion": "success", - "started_at": "1970-01-12T13:46:39Z", - "completed_at": "1970-01-12T13:46:39Z", + "conclusion": "failure", + "started_at": "2020-08-17T14:04:06Z", + "completed_at": "2020-08-17T14:04:06Z", "output": { - "title": "Found 15 new issues and 5 error issues. Quality Gate: Success.", - "summary": "# A Successful Build", - "text": "## 0 Failures", - "annotations_count": 2, - "annotations_url": "https://api.github.com/repos/XiongKezhi/Sandbox/check-runs/980966906/annotations" + "title": null, + "summary": null, + "text": null, + "annotations_count": 0, + "annotations_url": "https://api.github.com/repos/XiongKezhi/codingstyle/check-runs/993923912/annotations" }, "name": "Jenkins", "check_suite": { - "id": 696648086, - "node_id": "MDEwOkNoZWNrU3VpdGU2OTY2NDgwODY=", - "head_branch": "checks-api", - "head_sha": "18c8e2fd86e7aa3748e279c14a00dc3f0b963e7f", - "status": "completed", - "conclusion": "success", - "url": "https://api.github.com/repos/XiongKezhi/Sandbox/check-suites/696648086", - "before": "0000000000000000000000000000000000000000", - "after": "18c8e2fd86e7aa3748e279c14a00dc3f0b963e7f", + "id": 1060407784, + "node_id": "MDEwOkNoZWNrU3VpdGUxMDYwNDA3Nzg0", + "head_branch": "simplify-jenkinsfile", + "head_sha": "3c0ea12c02129ff4919afe087616d84547d93539", + "status": "queued", + "conclusion": null, + "url": "https://api.github.com/repos/XiongKezhi/codingstyle/check-suites/1060407784", + "before": "2a5453f64dc2dc2433411afbbbfaf757e8ff1793", + "after": "3c0ea12c02129ff4919afe087616d84547d93539", "pull_requests": [ { - "url": "https://api.github.com/repos/XiongKezhi/Sandbox/pulls/1", - "id": 420202204, + "url": "https://api.github.com/repos/XiongKezhi/codingstyle/pulls/1", + "id": 447475694, "number": 1, "head": { - "ref": "checks-api", - "sha": "18c8e2fd86e7aa3748e279c14a00dc3f0b963e7f", + "ref": "simplify-jenkinsfile", + "sha": "3c0ea12c02129ff4919afe087616d84547d93539", "repo": { - "id": 265261970, - "url": "https://api.github.com/repos/XiongKezhi/Sandbox", - "name": "Sandbox" + "id": 278546516, + "url": "https://api.github.com/repos/XiongKezhi/codingstyle", + "name": "codingstyle" } }, "base": { "ref": "master", - "sha": "d0a551f39d079ed617db3702cadb40dfe3d37e1b", + "sha": "b22fdfec1127073e509224a99a7704eeebdebe11", "repo": { - "id": 265261970, - "url": "https://api.github.com/repos/XiongKezhi/Sandbox", - "name": "Sandbox" + "id": 278546516, + "url": "https://api.github.com/repos/XiongKezhi/codingstyle", + "name": "codingstyle" } } } ], "app": { - "id": 55021, + "id": 76899, "slug": "jenkins-checks-api", - "node_id": "MDM6QXBwNTUwMjE=", + "node_id": "MDM6QXBwNzY4OTk=", "owner": { "login": "XiongKezhi", "id": 30348893, @@ -80,38 +80,36 @@ "site_admin": false }, "name": "Jenkins Checks API", - "description": "Integrate Jenkins as GitHub APP in order to create checks", + "description": "", "external_url": "https://smee.io/2C4VArPRXWl2zFg", "html_url": "https://github.com/apps/jenkins-checks-api", - "created_at": "2020-02-22T08:15:07Z", - "updated_at": "2020-08-13T03:18:00Z", + "created_at": "2020-08-14T08:47:10Z", + "updated_at": "2020-08-14T09:04:57Z", "permissions": { - "actions": "write", "checks": "write", "contents": "write", - "members": "write", "metadata": "read", "organization_hooks": "write", - "organization_projects": "write", "pull_requests": "write", "repository_hooks": "write", "statuses": "write" }, "events": [ "check_run", - "check_suite", + "commit_comment", + "create", "pull_request", "push", "status" ] }, - "created_at": "2020-05-19T15:39:32Z", - "updated_at": "2020-08-12T15:45:51Z" + "created_at": "2020-08-17T14:02:27Z", + "updated_at": "2020-08-17T14:04:50Z" }, "app": { - "id": 55021, + "id": 76899, "slug": "jenkins-checks-api", - "node_id": "MDM6QXBwNTUwMjE=", + "node_id": "MDM6QXBwNzY4OTk=", "owner": { "login": "XiongKezhi", "id": 30348893, @@ -133,26 +131,24 @@ "site_admin": false }, "name": "Jenkins Checks API", - "description": "Integrate Jenkins as GitHub APP in order to create checks", + "description": "", "external_url": "https://smee.io/2C4VArPRXWl2zFg", "html_url": "https://github.com/apps/jenkins-checks-api", - "created_at": "2020-02-22T08:15:07Z", - "updated_at": "2020-08-13T03:18:00Z", + "created_at": "2020-08-14T08:47:10Z", + "updated_at": "2020-08-14T09:04:57Z", "permissions": { - "actions": "write", "checks": "write", "contents": "write", - "members": "write", "metadata": "read", "organization_hooks": "write", - "organization_projects": "write", "pull_requests": "write", "repository_hooks": "write", "statuses": "write" }, "events": [ "check_run", - "check_suite", + "commit_comment", + "create", "pull_request", "push", "status" @@ -160,38 +156,35 @@ }, "pull_requests": [ { - "url": "https://api.github.com/repos/XiongKezhi/Sandbox/pulls/1", - "id": 420202204, + "url": "https://api.github.com/repos/XiongKezhi/codingstyle/pulls/1", + "id": 447475694, "number": 1, "head": { - "ref": "checks-api", - "sha": "18c8e2fd86e7aa3748e279c14a00dc3f0b963e7f", + "ref": "simplify-jenkinsfile", + "sha": "3c0ea12c02129ff4919afe087616d84547d93539", "repo": { - "id": 265261970, - "url": "https://api.github.com/repos/XiongKezhi/Sandbox", - "name": "Sandbox" + "id": 278546516, + "url": "https://api.github.com/repos/XiongKezhi/codingstyle", + "name": "codingstyle" } }, "base": { "ref": "master", - "sha": "d0a551f39d079ed617db3702cadb40dfe3d37e1b", + "sha": "b22fdfec1127073e509224a99a7704eeebdebe11", "repo": { - "id": 265261970, - "url": "https://api.github.com/repos/XiongKezhi/Sandbox", - "name": "Sandbox" + "id": 278546516, + "url": "https://api.github.com/repos/XiongKezhi/codingstyle", + "name": "codingstyle" } } } ] }, - "requested_action": { - "identifier": "rerun" - }, "repository": { - "id": 265261970, - "node_id": "MDEwOlJlcG9zaXRvcnkyNjUyNjE5NzA=", - "name": "Sandbox", - "full_name": "XiongKezhi/Sandbox", + "id": 278546516, + "node_id": "MDEwOlJlcG9zaXRvcnkyNzg1NDY1MTY=", + "name": "codingstyle", + "full_name": "XiongKezhi/codingstyle", "private": false, "owner": { "login": "XiongKezhi", @@ -213,71 +206,77 @@ "type": "User", "site_admin": false }, - "html_url": "https://github.com/XiongKezhi/Sandbox", - "description": "Sandbox for testing Jenkins Checks API Plugin", - "fork": false, - "url": "https://api.github.com/repos/XiongKezhi/Sandbox", - "forks_url": "https://api.github.com/repos/XiongKezhi/Sandbox/forks", - "keys_url": "https://api.github.com/repos/XiongKezhi/Sandbox/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/XiongKezhi/Sandbox/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/XiongKezhi/Sandbox/teams", - "hooks_url": "https://api.github.com/repos/XiongKezhi/Sandbox/hooks", - "issue_events_url": "https://api.github.com/repos/XiongKezhi/Sandbox/issues/events{/number}", - "events_url": "https://api.github.com/repos/XiongKezhi/Sandbox/events", - "assignees_url": "https://api.github.com/repos/XiongKezhi/Sandbox/assignees{/user}", - "branches_url": "https://api.github.com/repos/XiongKezhi/Sandbox/branches{/branch}", - "tags_url": "https://api.github.com/repos/XiongKezhi/Sandbox/tags", - "blobs_url": "https://api.github.com/repos/XiongKezhi/Sandbox/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/XiongKezhi/Sandbox/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/XiongKezhi/Sandbox/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/XiongKezhi/Sandbox/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/XiongKezhi/Sandbox/statuses/{sha}", - "languages_url": "https://api.github.com/repos/XiongKezhi/Sandbox/languages", - "stargazers_url": "https://api.github.com/repos/XiongKezhi/Sandbox/stargazers", - "contributors_url": "https://api.github.com/repos/XiongKezhi/Sandbox/contributors", - "subscribers_url": "https://api.github.com/repos/XiongKezhi/Sandbox/subscribers", - "subscription_url": "https://api.github.com/repos/XiongKezhi/Sandbox/subscription", - "commits_url": "https://api.github.com/repos/XiongKezhi/Sandbox/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/XiongKezhi/Sandbox/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/XiongKezhi/Sandbox/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/XiongKezhi/Sandbox/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/XiongKezhi/Sandbox/contents/{+path}", - "compare_url": "https://api.github.com/repos/XiongKezhi/Sandbox/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/XiongKezhi/Sandbox/merges", - "archive_url": "https://api.github.com/repos/XiongKezhi/Sandbox/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/XiongKezhi/Sandbox/downloads", - "issues_url": "https://api.github.com/repos/XiongKezhi/Sandbox/issues{/number}", - "pulls_url": "https://api.github.com/repos/XiongKezhi/Sandbox/pulls{/number}", - "milestones_url": "https://api.github.com/repos/XiongKezhi/Sandbox/milestones{/number}", - "notifications_url": "https://api.github.com/repos/XiongKezhi/Sandbox/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/XiongKezhi/Sandbox/labels{/name}", - "releases_url": "https://api.github.com/repos/XiongKezhi/Sandbox/releases{/id}", - "deployments_url": "https://api.github.com/repos/XiongKezhi/Sandbox/deployments", - "created_at": "2020-05-19T13:58:09Z", - "updated_at": "2020-08-13T09:24:15Z", - "pushed_at": "2020-08-13T09:24:13Z", - "git_url": "git://github.com/XiongKezhi/Sandbox.git", - "ssh_url": "git@github.com:XiongKezhi/Sandbox.git", - "clone_url": "https://github.com/XiongKezhi/Sandbox.git", - "svn_url": "https://github.com/XiongKezhi/Sandbox", - "homepage": null, - "size": 1027, + "html_url": "https://github.com/XiongKezhi/codingstyle", + "description": "Java coding style and template project used at Munich university of applied sciences ", + "fork": true, + "url": "https://api.github.com/repos/XiongKezhi/codingstyle", + "forks_url": "https://api.github.com/repos/XiongKezhi/codingstyle/forks", + "keys_url": "https://api.github.com/repos/XiongKezhi/codingstyle/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/XiongKezhi/codingstyle/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/XiongKezhi/codingstyle/teams", + "hooks_url": "https://api.github.com/repos/XiongKezhi/codingstyle/hooks", + "issue_events_url": "https://api.github.com/repos/XiongKezhi/codingstyle/issues/events{/number}", + "events_url": "https://api.github.com/repos/XiongKezhi/codingstyle/events", + "assignees_url": "https://api.github.com/repos/XiongKezhi/codingstyle/assignees{/user}", + "branches_url": "https://api.github.com/repos/XiongKezhi/codingstyle/branches{/branch}", + "tags_url": "https://api.github.com/repos/XiongKezhi/codingstyle/tags", + "blobs_url": "https://api.github.com/repos/XiongKezhi/codingstyle/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/XiongKezhi/codingstyle/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/XiongKezhi/codingstyle/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/XiongKezhi/codingstyle/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/XiongKezhi/codingstyle/statuses/{sha}", + "languages_url": "https://api.github.com/repos/XiongKezhi/codingstyle/languages", + "stargazers_url": "https://api.github.com/repos/XiongKezhi/codingstyle/stargazers", + "contributors_url": "https://api.github.com/repos/XiongKezhi/codingstyle/contributors", + "subscribers_url": "https://api.github.com/repos/XiongKezhi/codingstyle/subscribers", + "subscription_url": "https://api.github.com/repos/XiongKezhi/codingstyle/subscription", + "commits_url": "https://api.github.com/repos/XiongKezhi/codingstyle/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/XiongKezhi/codingstyle/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/XiongKezhi/codingstyle/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/XiongKezhi/codingstyle/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/XiongKezhi/codingstyle/contents/{+path}", + "compare_url": "https://api.github.com/repos/XiongKezhi/codingstyle/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/XiongKezhi/codingstyle/merges", + "archive_url": "https://api.github.com/repos/XiongKezhi/codingstyle/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/XiongKezhi/codingstyle/downloads", + "issues_url": "https://api.github.com/repos/XiongKezhi/codingstyle/issues{/number}", + "pulls_url": "https://api.github.com/repos/XiongKezhi/codingstyle/pulls{/number}", + "milestones_url": "https://api.github.com/repos/XiongKezhi/codingstyle/milestones{/number}", + "notifications_url": "https://api.github.com/repos/XiongKezhi/codingstyle/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/XiongKezhi/codingstyle/labels{/name}", + "releases_url": "https://api.github.com/repos/XiongKezhi/codingstyle/releases{/id}", + "deployments_url": "https://api.github.com/repos/XiongKezhi/codingstyle/deployments", + "created_at": "2020-07-10T05:28:50Z", + "updated_at": "2020-08-17T12:56:37Z", + "pushed_at": "2020-08-17T14:02:28Z", + "git_url": "git://github.com/XiongKezhi/codingstyle.git", + "ssh_url": "git@github.com:XiongKezhi/codingstyle.git", + "clone_url": "https://github.com/XiongKezhi/codingstyle.git", + "svn_url": "https://github.com/XiongKezhi/codingstyle", + "homepage": "", + "size": 1003, "stargazers_count": 0, "watchers_count": 0, - "language": null, - "has_issues": true, + "language": "Java", + "has_issues": false, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": false, - "forks_count": 0, + "forks_count": 3, "mirror_url": null, "archived": false, "disabled": false, - "open_issues_count": 3, - "license": null, - "forks": 0, - "open_issues": 3, + "open_issues_count": 5, + "license": { + "key": "other", + "name": "Other", + "spdx_id": "NOASSERTION", + "url": null, + "node_id": "MDc6TGljZW5zZTA=" + }, + "forks": 3, + "open_issues": 5, "watchers": 0, "default_branch": "master" }, @@ -302,7 +301,7 @@ "site_admin": false }, "installation": { - "id": 6929754, - "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNjkyOTc1NA==" + "id": 11244691, + "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uMTEyNDQ2OTE=" } } \ No newline at end of file