diff --git a/src/main/java/org/kohsuke/github/GHEventPayload.java b/src/main/java/org/kohsuke/github/GHEventPayload.java index 80e5a31c60..40f0f0fd37 100644 --- a/src/main/java/org/kohsuke/github/GHEventPayload.java +++ b/src/main/java/org/kohsuke/github/GHEventPayload.java @@ -360,6 +360,7 @@ public static class PullRequest extends GHEventPayload { private int number; private GHPullRequest pullRequest; private GHLabel label; + private GHPullRequestChanges changes; /** * Gets number. @@ -389,6 +390,15 @@ public GHLabel getLabel() { return label; } + /** + * Get changes (for action="edited") + * + * @return changes + */ + public GHPullRequestChanges getChanges() { + return changes; + } + @Override void wrapUp(GitHub root) { super.wrapUp(root); diff --git a/src/main/java/org/kohsuke/github/GHPullRequestChanges.java b/src/main/java/org/kohsuke/github/GHPullRequestChanges.java new file mode 100644 index 0000000000..616d749d13 --- /dev/null +++ b/src/main/java/org/kohsuke/github/GHPullRequestChanges.java @@ -0,0 +1,86 @@ +package org.kohsuke.github; + +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + +/** + * Wrapper to define changed fields on pull_request action="edited" + * + * @see GHEventPayload.PullRequest + */ +@SuppressFBWarnings("UWF_UNWRITTEN_FIELD") +public class GHPullRequestChanges { + + private GHCommitPointer base; + private GHFrom title; + private GHFrom body; + + /** + * Old target branch for pull request. + * + * @return old target branch info (or null if not changed) + */ + public GHCommitPointer getBase() { + return base; + } + + /** + * Old pull request title. + * + * @return old pull request title (or null if not changed) + */ + public GHFrom getTitle() { + return title; + } + + /** + * Old pull request body. + * + * @return old pull request body (or null if not changed) + */ + public GHFrom getBody() { + return body; + } + + /** + * @see org.kohsuke.github.GHCommitPointer + */ + public static class GHCommitPointer { + private GHFrom ref; + private GHFrom sha; + + /** + * Named ref to the commit. This (from value) appears to be a "short ref" that doesn't include "refs/heads/" + * portion. + * + * @return the ref + */ + public GHFrom getRef() { + return ref; + } + + /** + * SHA1 of the commit. + * + * @return sha + */ + public GHFrom getSha() { + return sha; + } + } + + /** + * Wrapper for changed values. + */ + public static class GHFrom { + private String from; + + /** + * Previous value that was changed. + * + * @return previous value + */ + public String getFrom() { + return from; + } + } +} diff --git a/src/test/java/org/kohsuke/github/GHEventPayloadTest.java b/src/test/java/org/kohsuke/github/GHEventPayloadTest.java index 1366b79840..49434cf4fd 100644 --- a/src/test/java/org/kohsuke/github/GHEventPayloadTest.java +++ b/src/test/java/org/kohsuke/github/GHEventPayloadTest.java @@ -214,6 +214,35 @@ public void pull_request() throws Exception { assertThat(event.getSender().getLogin(), is("baxterthehacker")); } + @Test + public void pull_request_edited_base() throws Exception { + GHEventPayload.PullRequest event = GitHub.offline() + .parseEventPayload(payload.asReader(), GHEventPayload.PullRequest.class); + + assertThat(event.getAction(), is("edited")); + assertThat(event.getChanges().getTitle(), nullValue()); + assertThat(event.getPullRequest().getTitle(), is("REST-276 - easy-random")); + assertThat(event.getChanges().getBase().getRef().getFrom(), is("develop")); + assertThat(event.getChanges().getBase().getSha().getFrom(), is("4b0f3b9fd582b071652ccfccd10bfc8c143cff96")); + assertThat(event.getPullRequest().getBase().getRef(), is("4.3")); + assertThat(event.getPullRequest().getBody(), startsWith("**JIRA Ticket URL:**")); + assertThat(event.getChanges().getBody(), nullValue()); + } + + @Test + public void pull_request_edited_title() throws Exception { + GHEventPayload.PullRequest event = GitHub.offline() + .parseEventPayload(payload.asReader(), GHEventPayload.PullRequest.class); + + assertThat(event.getAction(), is("edited")); + assertThat(event.getChanges().getTitle().getFrom(), is("REST-276 - easy-random")); + assertThat(event.getPullRequest().getTitle(), is("REST-276 - easy-random 4.3.0")); + assertThat(event.getChanges().getBase(), nullValue()); + assertThat(event.getPullRequest().getBase().getRef(), is("4.3")); + assertThat(event.getPullRequest().getBody(), startsWith("**JIRA Ticket URL:**")); + assertThat(event.getChanges().getBody(), nullValue()); + } + @Test public void pull_request_labeled() throws Exception { GHEventPayload.PullRequest event = GitHub.offline() diff --git a/src/test/resources/org/kohsuke/github/GHEventPayloadTest/pull_request_edited_base.json b/src/test/resources/org/kohsuke/github/GHEventPayloadTest/pull_request_edited_base.json new file mode 100644 index 0000000000..6b3d838648 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHEventPayloadTest/pull_request_edited_base.json @@ -0,0 +1,495 @@ +{ + "action": "edited", + "number": 88, + "pull_request": { + "url": "https://api.github.com/repos/company-company/acme-rest-api-framework/pulls/88", + "id": 517605888, + "node_id": "MDExOlB1bGxSZXF1ZXN0NTE3NjA1ODg4", + "html_url": "https://github.com/company-company/acme-rest-api-framework/pull/88", + "diff_url": "https://github.com/company-company/acme-rest-api-framework/pull/88.diff", + "patch_url": "https://github.com/company-company/acme-rest-api-framework/pull/88.patch", + "issue_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues/88", + "number": 88, + "state": "open", + "locked": false, + "title": "REST-276 - easy-random", + "user": { + "login": "seregamorph", + "id": 2844909, + "node_id": "MDQ6VXNlcjQxMTg3Nzc4", + "avatar_url": "https://avatars1.githubusercontent.com/u/2844909?s=460&v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/seregamorph", + "html_url": "https://github.com/seregamorph", + "followers_url": "https://api.github.com/users/seregamorph/followers", + "following_url": "https://api.github.com/users/seregamorph/following{/other_user}", + "gists_url": "https://api.github.com/users/seregamorph/gists{/gist_id}", + "starred_url": "https://api.github.com/users/seregamorph/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/seregamorph/subscriptions", + "organizations_url": "https://api.github.com/users/seregamorph/orgs", + "repos_url": "https://api.github.com/users/seregamorph/repos", + "events_url": "https://api.github.com/users/seregamorph/events{/privacy}", + "received_events_url": "https://api.github.com/users/seregamorph/received_events", + "type": "User", + "site_admin": false + }, + "body": "**JIRA Ticket URL:**\r\nhttps://jira.acme.com/browse/REST-276\r\n\r\n**Changes proposed in the pull request:**\r\n-\r\n-\r\n\r\nproject | migration | build | comment\r\n--- | --- | --- | ---\r\nproject | [GitHub](https://github.com/) | [TeamCity](http://10.187.164.189:8111/) |\r\n\r\n**Checklist**\r\n- [ ] Only intended changes are included and nothing else\r\n- [ ] The summary starts with the ticket number, e.g.: 'REST-???: ....'\r\n- [ ] The latest changes from develop have been merged\r\n- [ ] The build has been verified locally\r\n- [ ] Reviewer is set\r\n", + "created_at": "2020-11-09T09:07:19Z", + "updated_at": "2020-11-18T07:22:31Z", + "closed_at": null, + "merged_at": null, + "merge_commit_sha": "2cdf27f1ab276f6ff5ffc4f70e6d1efd534b9708", + "assignee": null, + "assignees": [ + + ], + "requested_reviewers": [ + + ], + "requested_teams": [ + + ], + "labels": [ + { + "id": 1650486524, + "node_id": "MDU6TGFiZWwxNjUwNDg2NTI0", + "url": "https://api.github.com/repos/company-company/acme-rest-api-framework/labels/rest%20api", + "name": "rest api", + "color": "fef2c0", + "default": false, + "description": "REST API pull request" + } + ], + "milestone": null, + "draft": true, + "commits_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/pulls/88/commits", + "review_comments_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/pulls/88/comments", + "review_comment_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues/88/comments", + "statuses_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/statuses/bb65be22d249e252df15d2b9eaba3e6e90f39bdc", + "head": { + "label": "company-company:feature/REST-276-easy-random", + "ref": "feature/REST-276-easy-random", + "sha": "bb65be22d249e252df15d2b9eaba3e6e90f39bdc", + "user": { + "login": "company-company", + "id": 22237814, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjIyMjM3ODE0", + "avatar_url": "https://avatars1.githubusercontent.com/u/22237814?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/company-company", + "html_url": "https://github.com/company-company", + "followers_url": "https://api.github.com/users/company-company/followers", + "following_url": "https://api.github.com/users/company-company/following{/other_user}", + "gists_url": "https://api.github.com/users/company-company/gists{/gist_id}", + "starred_url": "https://api.github.com/users/company-company/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/company-company/subscriptions", + "organizations_url": "https://api.github.com/users/company-company/orgs", + "repos_url": "https://api.github.com/users/company-company/repos", + "events_url": "https://api.github.com/users/company-company/events{/privacy}", + "received_events_url": "https://api.github.com/users/company-company/received_events", + "type": "Organization", + "site_admin": false + }, + "repo": { + "id": 217940615, + "node_id": "MDEwOlJlcG9zaXRvcnkyMTc5NDA2MTU=", + "name": "acme-rest-api-framework", + "full_name": "company-company/acme-rest-api-framework", + "private": true, + "owner": { + "login": "company-company", + "id": 22237814, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjIyMjM3ODE0", + "avatar_url": "https://avatars1.githubusercontent.com/u/22237814?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/company-company", + "html_url": "https://github.com/company-company", + "followers_url": "https://api.github.com/users/company-company/followers", + "following_url": "https://api.github.com/users/company-company/following{/other_user}", + "gists_url": "https://api.github.com/users/company-company/gists{/gist_id}", + "starred_url": "https://api.github.com/users/company-company/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/company-company/subscriptions", + "organizations_url": "https://api.github.com/users/company-company/orgs", + "repos_url": "https://api.github.com/users/company-company/repos", + "events_url": "https://api.github.com/users/company-company/events{/privacy}", + "received_events_url": "https://api.github.com/users/company-company/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/company-company/acme-rest-api-framework", + "description": "https://confluence.acme.com/display/REST/Framework", + "fork": false, + "url": "https://api.github.com/repos/company-company/acme-rest-api-framework", + "forks_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/forks", + "keys_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/teams", + "hooks_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/hooks", + "issue_events_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues/events{/number}", + "events_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/events", + "assignees_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/assignees{/user}", + "branches_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/branches{/branch}", + "tags_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/tags", + "blobs_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/statuses/{sha}", + "languages_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/languages", + "stargazers_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/stargazers", + "contributors_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/contributors", + "subscribers_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/subscribers", + "subscription_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/subscription", + "commits_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/contents/{+path}", + "compare_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/merges", + "archive_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/downloads", + "issues_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues{/number}", + "pulls_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/pulls{/number}", + "milestones_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/milestones{/number}", + "notifications_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/labels{/name}", + "releases_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/releases{/id}", + "deployments_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/deployments", + "created_at": "2019-10-28T01:12:50Z", + "updated_at": "2020-11-03T10:08:22Z", + "pushed_at": "2020-11-18T07:21:59Z", + "git_url": "git://github.com/company-company/acme-rest-api-framework.git", + "ssh_url": "git@github.com:company-company/acme-rest-api-framework.git", + "clone_url": "https://github.com/company-company/acme-rest-api-framework.git", + "svn_url": "https://github.com/company-company/acme-rest-api-framework", + "homepage": "", + "size": 933, + "stargazers_count": 2, + "watchers_count": 2, + "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": 1, + "license": null, + "forks": 0, + "open_issues": 1, + "watchers": 2, + "default_branch": "develop", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "delete_branch_on_merge": true + } + }, + "base": { + "label": "company-company:4.3", + "ref": "4.3", + "sha": "137f0d8aedb7e1406e9525f50c1a384f8f4c4355", + "user": { + "login": "company-company", + "id": 22237814, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjIyMjM3ODE0", + "avatar_url": "https://avatars1.githubusercontent.com/u/22237814?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/company-company", + "html_url": "https://github.com/company-company", + "followers_url": "https://api.github.com/users/company-company/followers", + "following_url": "https://api.github.com/users/company-company/following{/other_user}", + "gists_url": "https://api.github.com/users/company-company/gists{/gist_id}", + "starred_url": "https://api.github.com/users/company-company/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/company-company/subscriptions", + "organizations_url": "https://api.github.com/users/company-company/orgs", + "repos_url": "https://api.github.com/users/company-company/repos", + "events_url": "https://api.github.com/users/company-company/events{/privacy}", + "received_events_url": "https://api.github.com/users/company-company/received_events", + "type": "Organization", + "site_admin": false + }, + "repo": { + "id": 217940615, + "node_id": "MDEwOlJlcG9zaXRvcnkyMTc5NDA2MTU=", + "name": "acme-rest-api-framework", + "full_name": "company-company/acme-rest-api-framework", + "private": true, + "owner": { + "login": "company-company", + "id": 22237814, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjIyMjM3ODE0", + "avatar_url": "https://avatars1.githubusercontent.com/u/22237814?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/company-company", + "html_url": "https://github.com/company-company", + "followers_url": "https://api.github.com/users/company-company/followers", + "following_url": "https://api.github.com/users/company-company/following{/other_user}", + "gists_url": "https://api.github.com/users/company-company/gists{/gist_id}", + "starred_url": "https://api.github.com/users/company-company/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/company-company/subscriptions", + "organizations_url": "https://api.github.com/users/company-company/orgs", + "repos_url": "https://api.github.com/users/company-company/repos", + "events_url": "https://api.github.com/users/company-company/events{/privacy}", + "received_events_url": "https://api.github.com/users/company-company/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/company-company/acme-rest-api-framework", + "description": "https://confluence.acme.com/display/REST/Framework", + "fork": false, + "url": "https://api.github.com/repos/company-company/acme-rest-api-framework", + "forks_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/forks", + "keys_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/teams", + "hooks_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/hooks", + "issue_events_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues/events{/number}", + "events_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/events", + "assignees_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/assignees{/user}", + "branches_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/branches{/branch}", + "tags_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/tags", + "blobs_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/statuses/{sha}", + "languages_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/languages", + "stargazers_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/stargazers", + "contributors_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/contributors", + "subscribers_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/subscribers", + "subscription_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/subscription", + "commits_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/contents/{+path}", + "compare_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/merges", + "archive_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/downloads", + "issues_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues{/number}", + "pulls_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/pulls{/number}", + "milestones_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/milestones{/number}", + "notifications_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/labels{/name}", + "releases_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/releases{/id}", + "deployments_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/deployments", + "created_at": "2019-10-28T01:12:50Z", + "updated_at": "2020-11-03T10:08:22Z", + "pushed_at": "2020-11-18T07:21:59Z", + "git_url": "git://github.com/company-company/acme-rest-api-framework.git", + "ssh_url": "git@github.com:company-company/acme-rest-api-framework.git", + "clone_url": "https://github.com/company-company/acme-rest-api-framework.git", + "svn_url": "https://github.com/company-company/acme-rest-api-framework", + "homepage": "", + "size": 933, + "stargazers_count": 2, + "watchers_count": 2, + "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": 1, + "license": null, + "forks": 0, + "open_issues": 1, + "watchers": 2, + "default_branch": "develop", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "delete_branch_on_merge": true + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/company-company/acme-rest-api-framework/pulls/88" + }, + "html": { + "href": "https://github.com/company-company/acme-rest-api-framework/pull/88" + }, + "issue": { + "href": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues/88" + }, + "comments": { + "href": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues/88/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/company-company/acme-rest-api-framework/pulls/88/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/company-company/acme-rest-api-framework/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/company-company/acme-rest-api-framework/pulls/88/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/company-company/acme-rest-api-framework/statuses/bb65be22d249e252df15d2b9eaba3e6e90f39bdc" + } + }, + "author_association": "COLLABORATOR", + "active_lock_reason": null, + "merged": false, + "mergeable": null, + "rebaseable": null, + "mergeable_state": "draft", + "merged_by": null, + "comments": 0, + "review_comments": 0, + "maintainer_can_modify": false, + "commits": 1, + "additions": 100, + "deletions": 79, + "changed_files": 14 + }, + "changes": { + "base": { + "ref": { + "from": "develop" + }, + "sha": { + "from": "4b0f3b9fd582b071652ccfccd10bfc8c143cff96" + } + } + }, + "repository": { + "id": 217940615, + "node_id": "MDEwOlJlcG9zaXRvcnkyMTc5NDA2MTU=", + "name": "acme-rest-api-framework", + "full_name": "company-company/acme-rest-api-framework", + "private": true, + "owner": { + "login": "company-company", + "id": 22237814, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjIyMjM3ODE0", + "avatar_url": "https://avatars1.githubusercontent.com/u/22237814?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/company-company", + "html_url": "https://github.com/company-company", + "followers_url": "https://api.github.com/users/company-company/followers", + "following_url": "https://api.github.com/users/company-company/following{/other_user}", + "gists_url": "https://api.github.com/users/company-company/gists{/gist_id}", + "starred_url": "https://api.github.com/users/company-company/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/company-company/subscriptions", + "organizations_url": "https://api.github.com/users/company-company/orgs", + "repos_url": "https://api.github.com/users/company-company/repos", + "events_url": "https://api.github.com/users/company-company/events{/privacy}", + "received_events_url": "https://api.github.com/users/company-company/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/company-company/acme-rest-api-framework", + "description": "https://confluence.acme.com/display/REST/Framework", + "fork": false, + "url": "https://api.github.com/repos/company-company/acme-rest-api-framework", + "forks_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/forks", + "keys_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/teams", + "hooks_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/hooks", + "issue_events_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues/events{/number}", + "events_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/events", + "assignees_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/assignees{/user}", + "branches_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/branches{/branch}", + "tags_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/tags", + "blobs_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/statuses/{sha}", + "languages_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/languages", + "stargazers_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/stargazers", + "contributors_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/contributors", + "subscribers_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/subscribers", + "subscription_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/subscription", + "commits_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/contents/{+path}", + "compare_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/merges", + "archive_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/downloads", + "issues_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues{/number}", + "pulls_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/pulls{/number}", + "milestones_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/milestones{/number}", + "notifications_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/labels{/name}", + "releases_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/releases{/id}", + "deployments_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/deployments", + "created_at": "2019-10-28T01:12:50Z", + "updated_at": "2020-11-03T10:08:22Z", + "pushed_at": "2020-11-18T07:21:59Z", + "git_url": "git://github.com/company-company/acme-rest-api-framework.git", + "ssh_url": "git@github.com:company-company/acme-rest-api-framework.git", + "clone_url": "https://github.com/company-company/acme-rest-api-framework.git", + "svn_url": "https://github.com/company-company/acme-rest-api-framework", + "homepage": "", + "size": 933, + "stargazers_count": 2, + "watchers_count": 2, + "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": 1, + "license": null, + "forks": 0, + "open_issues": 1, + "watchers": 2, + "default_branch": "develop" + }, + "organization": { + "login": "company-company", + "id": 22237814, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjIyMjM3ODE0", + "url": "https://api.github.com/orgs/company-company", + "repos_url": "https://api.github.com/orgs/company-company/repos", + "events_url": "https://api.github.com/orgs/company-company/events", + "hooks_url": "https://api.github.com/orgs/company-company/hooks", + "issues_url": "https://api.github.com/orgs/company-company/issues", + "members_url": "https://api.github.com/orgs/company-company/members{/member}", + "public_members_url": "https://api.github.com/orgs/company-company/public_members{/member}", + "avatar_url": "https://avatars1.githubusercontent.com/u/22237814?v=4", + "description": "" + }, + "sender": { + "login": "seregamorph", + "id": 2844909, + "node_id": "MDQ6VXNlcjQxMTg3Nzc4", + "avatar_url": "https://avatars1.githubusercontent.com/u/2844909?s=460&v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/seregamorph", + "html_url": "https://github.com/seregamorph", + "followers_url": "https://api.github.com/users/seregamorph/followers", + "following_url": "https://api.github.com/users/seregamorph/following{/other_user}", + "gists_url": "https://api.github.com/users/seregamorph/gists{/gist_id}", + "starred_url": "https://api.github.com/users/seregamorph/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/seregamorph/subscriptions", + "organizations_url": "https://api.github.com/users/seregamorph/orgs", + "repos_url": "https://api.github.com/users/seregamorph/repos", + "events_url": "https://api.github.com/users/seregamorph/events{/privacy}", + "received_events_url": "https://api.github.com/users/seregamorph/received_events", + "type": "User", + "site_admin": false + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHEventPayloadTest/pull_request_edited_title.json b/src/test/resources/org/kohsuke/github/GHEventPayloadTest/pull_request_edited_title.json new file mode 100644 index 0000000000..7b49d01211 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHEventPayloadTest/pull_request_edited_title.json @@ -0,0 +1,490 @@ +{ + "action": "edited", + "number": 88, + "pull_request": { + "url": "https://api.github.com/repos/company-company/acme-rest-api-framework/pulls/88", + "id": 517605888, + "node_id": "MDExOlB1bGxSZXF1ZXN0NTE3NjA1ODg4", + "html_url": "https://github.com/company-company/acme-rest-api-framework/pull/88", + "diff_url": "https://github.com/company-company/acme-rest-api-framework/pull/88.diff", + "patch_url": "https://github.com/company-company/acme-rest-api-framework/pull/88.patch", + "issue_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues/88", + "number": 88, + "state": "open", + "locked": false, + "title": "REST-276 - easy-random 4.3.0", + "user": { + "login": "seregamorph", + "id": 2844909, + "node_id": "MDQ6VXNlcjQxMTg3Nzc4", + "avatar_url": "https://avatars3.githubusercontent.com/u/2844909?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/seregamorph", + "html_url": "https://github.com/seregamorph", + "followers_url": "https://api.github.com/users/seregamorph/followers", + "following_url": "https://api.github.com/users/seregamorph/following{/other_user}", + "gists_url": "https://api.github.com/users/seregamorph/gists{/gist_id}", + "starred_url": "https://api.github.com/users/seregamorph/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/seregamorph/subscriptions", + "organizations_url": "https://api.github.com/users/seregamorph/orgs", + "repos_url": "https://api.github.com/users/seregamorph/repos", + "events_url": "https://api.github.com/users/seregamorph/events{/privacy}", + "received_events_url": "https://api.github.com/users/seregamorph/received_events", + "type": "User", + "site_admin": false + }, + "body": "**JIRA Ticket URL:**\r\nhttps://jira.acme.com/browse/REST-276\r\n\r\n**Changes proposed in the pull request:**\r\n-\r\n-\r\n\r\nproject | migration | build | comment\r\n--- | --- | --- | ---\r\nXO | `feature/REST-276-easy-random` branch | [TeamCity](http://10.187.164.189:8111/) |\r\n\r\n**Checklist**\r\n- [ ] Only intended changes are included and nothing else\r\n- [ ] The summary starts with the ticket number, e.g.: 'REST-???: ....'\r\n- [ ] The latest changes from develop have been merged\r\n- [ ] The build has been verified locally\r\n- [ ] Reviewer is set\r\n", + "created_at": "2020-11-09T09:07:19Z", + "updated_at": "2020-11-18T07:46:27Z", + "closed_at": null, + "merged_at": null, + "merge_commit_sha": "187be6bf82d515b2e4c556a65aa71f23244f6019", + "assignee": null, + "assignees": [ + + ], + "requested_reviewers": [ + + ], + "requested_teams": [ + + ], + "labels": [ + { + "id": 1650486524, + "node_id": "MDU6TGFiZWwxNjUwNDg2NTI0", + "url": "https://api.github.com/repos/company-company/acme-rest-api-framework/labels/rest%20api", + "name": "rest api", + "color": "fef2c0", + "default": false, + "description": "REST API pull request" + } + ], + "milestone": null, + "draft": true, + "commits_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/pulls/88/commits", + "review_comments_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/pulls/88/comments", + "review_comment_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues/88/comments", + "statuses_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/statuses/bb65be22d249e252df15d2b9eaba3e6e90f39bdc", + "head": { + "label": "company-company:feature/REST-276-easy-random", + "ref": "feature/REST-276-easy-random", + "sha": "bb65be22d249e252df15d2b9eaba3e6e90f39bdc", + "user": { + "login": "company-company", + "id": 22237814, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjIyMjM3ODE0", + "avatar_url": "https://avatars1.githubusercontent.com/u/22237814?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/company-company", + "html_url": "https://github.com/company-company", + "followers_url": "https://api.github.com/users/company-company/followers", + "following_url": "https://api.github.com/users/company-company/following{/other_user}", + "gists_url": "https://api.github.com/users/company-company/gists{/gist_id}", + "starred_url": "https://api.github.com/users/company-company/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/company-company/subscriptions", + "organizations_url": "https://api.github.com/users/company-company/orgs", + "repos_url": "https://api.github.com/users/company-company/repos", + "events_url": "https://api.github.com/users/company-company/events{/privacy}", + "received_events_url": "https://api.github.com/users/company-company/received_events", + "type": "Organization", + "site_admin": false + }, + "repo": { + "id": 217940615, + "node_id": "MDEwOlJlcG9zaXRvcnkyMTc5NDA2MTU=", + "name": "acme-rest-api-framework", + "full_name": "company-company/acme-rest-api-framework", + "private": true, + "owner": { + "login": "company-company", + "id": 22237814, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjIyMjM3ODE0", + "avatar_url": "https://avatars1.githubusercontent.com/u/22237814?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/company-company", + "html_url": "https://github.com/company-company", + "followers_url": "https://api.github.com/users/company-company/followers", + "following_url": "https://api.github.com/users/company-company/following{/other_user}", + "gists_url": "https://api.github.com/users/company-company/gists{/gist_id}", + "starred_url": "https://api.github.com/users/company-company/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/company-company/subscriptions", + "organizations_url": "https://api.github.com/users/company-company/orgs", + "repos_url": "https://api.github.com/users/company-company/repos", + "events_url": "https://api.github.com/users/company-company/events{/privacy}", + "received_events_url": "https://api.github.com/users/company-company/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/company-company/acme-rest-api-framework", + "description": "https://confluence.acme.com/display/REST/Framework", + "fork": false, + "url": "https://api.github.com/repos/company-company/acme-rest-api-framework", + "forks_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/forks", + "keys_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/teams", + "hooks_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/hooks", + "issue_events_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues/events{/number}", + "events_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/events", + "assignees_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/assignees{/user}", + "branches_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/branches{/branch}", + "tags_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/tags", + "blobs_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/statuses/{sha}", + "languages_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/languages", + "stargazers_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/stargazers", + "contributors_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/contributors", + "subscribers_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/subscribers", + "subscription_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/subscription", + "commits_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/contents/{+path}", + "compare_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/merges", + "archive_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/downloads", + "issues_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues{/number}", + "pulls_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/pulls{/number}", + "milestones_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/milestones{/number}", + "notifications_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/labels{/name}", + "releases_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/releases{/id}", + "deployments_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/deployments", + "created_at": "2019-10-28T01:12:50Z", + "updated_at": "2020-11-03T10:08:22Z", + "pushed_at": "2020-11-18T07:21:59Z", + "git_url": "git://github.com/company-company/acme-rest-api-framework.git", + "ssh_url": "git@github.com:company-company/acme-rest-api-framework.git", + "clone_url": "https://github.com/company-company/acme-rest-api-framework.git", + "svn_url": "https://github.com/company-company/acme-rest-api-framework", + "homepage": "", + "size": 933, + "stargazers_count": 2, + "watchers_count": 2, + "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": 1, + "license": null, + "forks": 0, + "open_issues": 1, + "watchers": 2, + "default_branch": "develop", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "delete_branch_on_merge": true + } + }, + "base": { + "label": "company-company:4.3", + "ref": "4.3", + "sha": "137f0d8aedb7e1406e9525f50c1a384f8f4c4355", + "user": { + "login": "company-company", + "id": 22237814, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjIyMjM3ODE0", + "avatar_url": "https://avatars1.githubusercontent.com/u/22237814?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/company-company", + "html_url": "https://github.com/company-company", + "followers_url": "https://api.github.com/users/company-company/followers", + "following_url": "https://api.github.com/users/company-company/following{/other_user}", + "gists_url": "https://api.github.com/users/company-company/gists{/gist_id}", + "starred_url": "https://api.github.com/users/company-company/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/company-company/subscriptions", + "organizations_url": "https://api.github.com/users/company-company/orgs", + "repos_url": "https://api.github.com/users/company-company/repos", + "events_url": "https://api.github.com/users/company-company/events{/privacy}", + "received_events_url": "https://api.github.com/users/company-company/received_events", + "type": "Organization", + "site_admin": false + }, + "repo": { + "id": 217940615, + "node_id": "MDEwOlJlcG9zaXRvcnkyMTc5NDA2MTU=", + "name": "acme-rest-api-framework", + "full_name": "company-company/acme-rest-api-framework", + "private": true, + "owner": { + "login": "company-company", + "id": 22237814, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjIyMjM3ODE0", + "avatar_url": "https://avatars1.githubusercontent.com/u/22237814?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/company-company", + "html_url": "https://github.com/company-company", + "followers_url": "https://api.github.com/users/company-company/followers", + "following_url": "https://api.github.com/users/company-company/following{/other_user}", + "gists_url": "https://api.github.com/users/company-company/gists{/gist_id}", + "starred_url": "https://api.github.com/users/company-company/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/company-company/subscriptions", + "organizations_url": "https://api.github.com/users/company-company/orgs", + "repos_url": "https://api.github.com/users/company-company/repos", + "events_url": "https://api.github.com/users/company-company/events{/privacy}", + "received_events_url": "https://api.github.com/users/company-company/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/company-company/acme-rest-api-framework", + "description": "https://confluence.acme.com/display/REST/Framework", + "fork": false, + "url": "https://api.github.com/repos/company-company/acme-rest-api-framework", + "forks_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/forks", + "keys_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/teams", + "hooks_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/hooks", + "issue_events_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues/events{/number}", + "events_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/events", + "assignees_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/assignees{/user}", + "branches_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/branches{/branch}", + "tags_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/tags", + "blobs_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/statuses/{sha}", + "languages_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/languages", + "stargazers_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/stargazers", + "contributors_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/contributors", + "subscribers_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/subscribers", + "subscription_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/subscription", + "commits_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/contents/{+path}", + "compare_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/merges", + "archive_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/downloads", + "issues_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues{/number}", + "pulls_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/pulls{/number}", + "milestones_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/milestones{/number}", + "notifications_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/labels{/name}", + "releases_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/releases{/id}", + "deployments_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/deployments", + "created_at": "2019-10-28T01:12:50Z", + "updated_at": "2020-11-03T10:08:22Z", + "pushed_at": "2020-11-18T07:21:59Z", + "git_url": "git://github.com/company-company/acme-rest-api-framework.git", + "ssh_url": "git@github.com:company-company/acme-rest-api-framework.git", + "clone_url": "https://github.com/company-company/acme-rest-api-framework.git", + "svn_url": "https://github.com/company-company/acme-rest-api-framework", + "homepage": "", + "size": 933, + "stargazers_count": 2, + "watchers_count": 2, + "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": 1, + "license": null, + "forks": 0, + "open_issues": 1, + "watchers": 2, + "default_branch": "develop", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "delete_branch_on_merge": true + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/company-company/acme-rest-api-framework/pulls/88" + }, + "html": { + "href": "https://github.com/company-company/acme-rest-api-framework/pull/88" + }, + "issue": { + "href": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues/88" + }, + "comments": { + "href": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues/88/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/company-company/acme-rest-api-framework/pulls/88/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/company-company/acme-rest-api-framework/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/company-company/acme-rest-api-framework/pulls/88/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/company-company/acme-rest-api-framework/statuses/bb65be22d249e252df15d2b9eaba3e6e90f39bdc" + } + }, + "author_association": "COLLABORATOR", + "active_lock_reason": null, + "merged": false, + "mergeable": true, + "rebaseable": true, + "mergeable_state": "draft", + "merged_by": null, + "comments": 0, + "review_comments": 5, + "maintainer_can_modify": false, + "commits": 1, + "additions": 100, + "deletions": 79, + "changed_files": 14 + }, + "changes": { + "title": { + "from": "REST-276 - easy-random" + } + }, + "repository": { + "id": 217940615, + "node_id": "MDEwOlJlcG9zaXRvcnkyMTc5NDA2MTU=", + "name": "acme-rest-api-framework", + "full_name": "company-company/acme-rest-api-framework", + "private": true, + "owner": { + "login": "company-company", + "id": 22237814, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjIyMjM3ODE0", + "avatar_url": "https://avatars1.githubusercontent.com/u/22237814?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/company-company", + "html_url": "https://github.com/company-company", + "followers_url": "https://api.github.com/users/company-company/followers", + "following_url": "https://api.github.com/users/company-company/following{/other_user}", + "gists_url": "https://api.github.com/users/company-company/gists{/gist_id}", + "starred_url": "https://api.github.com/users/company-company/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/company-company/subscriptions", + "organizations_url": "https://api.github.com/users/company-company/orgs", + "repos_url": "https://api.github.com/users/company-company/repos", + "events_url": "https://api.github.com/users/company-company/events{/privacy}", + "received_events_url": "https://api.github.com/users/company-company/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/company-company/acme-rest-api-framework", + "description": "https://confluence.acme.com/display/REST/Framework", + "fork": false, + "url": "https://api.github.com/repos/company-company/acme-rest-api-framework", + "forks_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/forks", + "keys_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/teams", + "hooks_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/hooks", + "issue_events_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues/events{/number}", + "events_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/events", + "assignees_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/assignees{/user}", + "branches_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/branches{/branch}", + "tags_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/tags", + "blobs_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/statuses/{sha}", + "languages_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/languages", + "stargazers_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/stargazers", + "contributors_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/contributors", + "subscribers_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/subscribers", + "subscription_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/subscription", + "commits_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/contents/{+path}", + "compare_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/merges", + "archive_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/downloads", + "issues_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/issues{/number}", + "pulls_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/pulls{/number}", + "milestones_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/milestones{/number}", + "notifications_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/labels{/name}", + "releases_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/releases{/id}", + "deployments_url": "https://api.github.com/repos/company-company/acme-rest-api-framework/deployments", + "created_at": "2019-10-28T01:12:50Z", + "updated_at": "2020-11-03T10:08:22Z", + "pushed_at": "2020-11-18T07:21:59Z", + "git_url": "git://github.com/company-company/acme-rest-api-framework.git", + "ssh_url": "git@github.com:company-company/acme-rest-api-framework.git", + "clone_url": "https://github.com/company-company/acme-rest-api-framework.git", + "svn_url": "https://github.com/company-company/acme-rest-api-framework", + "homepage": "", + "size": 933, + "stargazers_count": 2, + "watchers_count": 2, + "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": 1, + "license": null, + "forks": 0, + "open_issues": 1, + "watchers": 2, + "default_branch": "develop" + }, + "organization": { + "login": "company-company", + "id": 22237814, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjIyMjM3ODE0", + "url": "https://api.github.com/orgs/company-company", + "repos_url": "https://api.github.com/orgs/company-company/repos", + "events_url": "https://api.github.com/orgs/company-company/events", + "hooks_url": "https://api.github.com/orgs/company-company/hooks", + "issues_url": "https://api.github.com/orgs/company-company/issues", + "members_url": "https://api.github.com/orgs/company-company/members{/member}", + "public_members_url": "https://api.github.com/orgs/company-company/public_members{/member}", + "avatar_url": "https://avatars1.githubusercontent.com/u/22237814?v=4", + "description": "" + }, + "sender": { + "login": "seregamorph", + "id": 2844909, + "node_id": "MDQ6VXNlcjQxMTg3Nzc4", + "avatar_url": "https://avatars1.githubusercontent.com/u/2844909?s=460&v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/seregamorph", + "html_url": "https://github.com/seregamorph", + "followers_url": "https://api.github.com/users/seregamorph/followers", + "following_url": "https://api.github.com/users/seregamorph/following{/other_user}", + "gists_url": "https://api.github.com/users/seregamorph/gists{/gist_id}", + "starred_url": "https://api.github.com/users/seregamorph/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/seregamorph/subscriptions", + "organizations_url": "https://api.github.com/users/seregamorph/orgs", + "repos_url": "https://api.github.com/users/seregamorph/repos", + "events_url": "https://api.github.com/users/seregamorph/events{/privacy}", + "received_events_url": "https://api.github.com/users/seregamorph/received_events", + "type": "User", + "site_admin": false + } +} \ No newline at end of file