diff --git a/docs/sample-master-push.json b/docs/sample-master-push.json index f21a599..9cdb7c1 100644 --- a/docs/sample-master-push.json +++ b/docs/sample-master-push.json @@ -177,5 +177,5 @@ "ref": "refs/heads/master", "workflow": "test-local", "action": "self", - "actor": "mshick." + "actor": "mshick" } diff --git a/docs/sample-pulls-api-response.json b/docs/sample-pulls-api-response.json new file mode 100644 index 0000000..99e3001 --- /dev/null +++ b/docs/sample-pulls-api-response.json @@ -0,0 +1,356 @@ +{ + "statusCode": 200, + "result": [ + { + "url": "https://api.github.com/repos/mshick/add-pr-comment/pulls/6", + "id": 401139651, + "node_id": "MDExOlB1bGxSZXF1ZXN0NDAxMTM5NjUx", + "html_url": "https://github.com/mshick/add-pr-comment/pull/6", + "diff_url": "https://github.com/mshick/add-pr-comment/pull/6.diff", + "patch_url": "https://github.com/mshick/add-pr-comment/pull/6.patch", + "issue_url": "https://api.github.com/repos/mshick/add-pr-comment/issues/6", + "number": 6, + "state": "closed", + "locked": false, + "title": "debug: trigger small change", + "user": { + "login": "mshick", + "id": 277401, + "node_id": "MDQ6VXNlcjI3NzQwMQ==", + "avatar_url": "https://avatars1.githubusercontent.com/u/277401?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/mshick", + "html_url": "https://github.com/mshick", + "followers_url": "https://api.github.com/users/mshick/followers", + "following_url": "https://api.github.com/users/mshick/following{/other_user}", + "gists_url": "https://api.github.com/users/mshick/gists{/gist_id}", + "starred_url": "https://api.github.com/users/mshick/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/mshick/subscriptions", + "organizations_url": "https://api.github.com/users/mshick/orgs", + "repos_url": "https://api.github.com/users/mshick/repos", + "events_url": "https://api.github.com/users/mshick/events{/privacy}", + "received_events_url": "https://api.github.com/users/mshick/received_events", + "type": "User", + "site_admin": false + }, + "body": "", + "created_at": "2020-04-09T00:07:01Z", + "updated_at": "2020-04-09T00:08:32Z", + "closed_at": "2020-04-09T00:08:32Z", + "merged_at": "2020-04-09T00:08:32Z", + "merge_commit_sha": "8dba58ef879174e996c956424d47f88a1a36e04a", + "assignee": null, + "assignees": [], + "requested_reviewers": [], + "requested_teams": [], + "labels": [], + "milestone": null, + "draft": false, + "commits_url": "https://api.github.com/repos/mshick/add-pr-comment/pulls/6/commits", + "review_comments_url": "https://api.github.com/repos/mshick/add-pr-comment/pulls/6/comments", + "review_comment_url": "https://api.github.com/repos/mshick/add-pr-comment/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/mshick/add-pr-comment/issues/6/comments", + "statuses_url": "https://api.github.com/repos/mshick/add-pr-comment/statuses/9bef15e74a60ecbb5197e7e975096fd7c6525794", + "head": { + "label": "mshick:feature/test2", + "ref": "feature/test2", + "sha": "9bef15e74a60ecbb5197e7e975096fd7c6525794", + "user": { + "login": "mshick", + "id": 277401, + "node_id": "MDQ6VXNlcjI3NzQwMQ==", + "avatar_url": "https://avatars1.githubusercontent.com/u/277401?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/mshick", + "html_url": "https://github.com/mshick", + "followers_url": "https://api.github.com/users/mshick/followers", + "following_url": "https://api.github.com/users/mshick/following{/other_user}", + "gists_url": "https://api.github.com/users/mshick/gists{/gist_id}", + "starred_url": "https://api.github.com/users/mshick/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/mshick/subscriptions", + "organizations_url": "https://api.github.com/users/mshick/orgs", + "repos_url": "https://api.github.com/users/mshick/repos", + "events_url": "https://api.github.com/users/mshick/events{/privacy}", + "received_events_url": "https://api.github.com/users/mshick/received_events", + "type": "User", + "site_admin": false + }, + "repo": { + "id": 223494945, + "node_id": "MDEwOlJlcG9zaXRvcnkyMjM0OTQ5NDU=", + "name": "add-pr-comment", + "full_name": "mshick/add-pr-comment", + "private": false, + "owner": { + "login": "mshick", + "id": 277401, + "node_id": "MDQ6VXNlcjI3NzQwMQ==", + "avatar_url": "https://avatars1.githubusercontent.com/u/277401?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/mshick", + "html_url": "https://github.com/mshick", + "followers_url": "https://api.github.com/users/mshick/followers", + "following_url": "https://api.github.com/users/mshick/following{/other_user}", + "gists_url": "https://api.github.com/users/mshick/gists{/gist_id}", + "starred_url": "https://api.github.com/users/mshick/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/mshick/subscriptions", + "organizations_url": "https://api.github.com/users/mshick/orgs", + "repos_url": "https://api.github.com/users/mshick/repos", + "events_url": "https://api.github.com/users/mshick/events{/privacy}", + "received_events_url": "https://api.github.com/users/mshick/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/mshick/add-pr-comment", + "description": "uses: mshick/add-pr-comment@v1", + "fork": false, + "url": "https://api.github.com/repos/mshick/add-pr-comment", + "forks_url": "https://api.github.com/repos/mshick/add-pr-comment/forks", + "keys_url": "https://api.github.com/repos/mshick/add-pr-comment/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/mshick/add-pr-comment/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/mshick/add-pr-comment/teams", + "hooks_url": "https://api.github.com/repos/mshick/add-pr-comment/hooks", + "issue_events_url": "https://api.github.com/repos/mshick/add-pr-comment/issues/events{/number}", + "events_url": "https://api.github.com/repos/mshick/add-pr-comment/events", + "assignees_url": "https://api.github.com/repos/mshick/add-pr-comment/assignees{/user}", + "branches_url": "https://api.github.com/repos/mshick/add-pr-comment/branches{/branch}", + "tags_url": "https://api.github.com/repos/mshick/add-pr-comment/tags", + "blobs_url": "https://api.github.com/repos/mshick/add-pr-comment/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/mshick/add-pr-comment/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/mshick/add-pr-comment/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/mshick/add-pr-comment/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/mshick/add-pr-comment/statuses/{sha}", + "languages_url": "https://api.github.com/repos/mshick/add-pr-comment/languages", + "stargazers_url": "https://api.github.com/repos/mshick/add-pr-comment/stargazers", + "contributors_url": "https://api.github.com/repos/mshick/add-pr-comment/contributors", + "subscribers_url": "https://api.github.com/repos/mshick/add-pr-comment/subscribers", + "subscription_url": "https://api.github.com/repos/mshick/add-pr-comment/subscription", + "commits_url": "https://api.github.com/repos/mshick/add-pr-comment/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/mshick/add-pr-comment/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/mshick/add-pr-comment/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/mshick/add-pr-comment/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/mshick/add-pr-comment/contents/{+path}", + "compare_url": "https://api.github.com/repos/mshick/add-pr-comment/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/mshick/add-pr-comment/merges", + "archive_url": "https://api.github.com/repos/mshick/add-pr-comment/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/mshick/add-pr-comment/downloads", + "issues_url": "https://api.github.com/repos/mshick/add-pr-comment/issues{/number}", + "pulls_url": "https://api.github.com/repos/mshick/add-pr-comment/pulls{/number}", + "milestones_url": "https://api.github.com/repos/mshick/add-pr-comment/milestones{/number}", + "notifications_url": "https://api.github.com/repos/mshick/add-pr-comment/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/mshick/add-pr-comment/labels{/name}", + "releases_url": "https://api.github.com/repos/mshick/add-pr-comment/releases{/id}", + "deployments_url": "https://api.github.com/repos/mshick/add-pr-comment/deployments", + "created_at": "2019-11-22T22:11:44Z", + "updated_at": "2020-04-09T00:08:35Z", + "pushed_at": "2020-04-09T00:08:32Z", + "git_url": "git://github.com/mshick/add-pr-comment.git", + "ssh_url": "git@github.com:mshick/add-pr-comment.git", + "clone_url": "https://github.com/mshick/add-pr-comment.git", + "svn_url": "https://github.com/mshick/add-pr-comment", + "homepage": "https://github.com/marketplace/actions/add-pr-comment", + "size": 299, + "stargazers_count": 8, + "watchers_count": 8, + "language": "JavaScript", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 2, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 1, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 2, + "open_issues": 1, + "watchers": 8, + "default_branch": "master" + } + }, + "base": { + "label": "mshick:master", + "ref": "master", + "sha": "240085d7fd326249008880448fe368e9da6f45b8", + "user": { + "login": "mshick", + "id": 277401, + "node_id": "MDQ6VXNlcjI3NzQwMQ==", + "avatar_url": "https://avatars1.githubusercontent.com/u/277401?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/mshick", + "html_url": "https://github.com/mshick", + "followers_url": "https://api.github.com/users/mshick/followers", + "following_url": "https://api.github.com/users/mshick/following{/other_user}", + "gists_url": "https://api.github.com/users/mshick/gists{/gist_id}", + "starred_url": "https://api.github.com/users/mshick/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/mshick/subscriptions", + "organizations_url": "https://api.github.com/users/mshick/orgs", + "repos_url": "https://api.github.com/users/mshick/repos", + "events_url": "https://api.github.com/users/mshick/events{/privacy}", + "received_events_url": "https://api.github.com/users/mshick/received_events", + "type": "User", + "site_admin": false + }, + "repo": { + "id": 223494945, + "node_id": "MDEwOlJlcG9zaXRvcnkyMjM0OTQ5NDU=", + "name": "add-pr-comment", + "full_name": "mshick/add-pr-comment", + "private": false, + "owner": { + "login": "mshick", + "id": 277401, + "node_id": "MDQ6VXNlcjI3NzQwMQ==", + "avatar_url": "https://avatars1.githubusercontent.com/u/277401?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/mshick", + "html_url": "https://github.com/mshick", + "followers_url": "https://api.github.com/users/mshick/followers", + "following_url": "https://api.github.com/users/mshick/following{/other_user}", + "gists_url": "https://api.github.com/users/mshick/gists{/gist_id}", + "starred_url": "https://api.github.com/users/mshick/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/mshick/subscriptions", + "organizations_url": "https://api.github.com/users/mshick/orgs", + "repos_url": "https://api.github.com/users/mshick/repos", + "events_url": "https://api.github.com/users/mshick/events{/privacy}", + "received_events_url": "https://api.github.com/users/mshick/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/mshick/add-pr-comment", + "description": "uses: mshick/add-pr-comment@v1", + "fork": false, + "url": "https://api.github.com/repos/mshick/add-pr-comment", + "forks_url": "https://api.github.com/repos/mshick/add-pr-comment/forks", + "keys_url": "https://api.github.com/repos/mshick/add-pr-comment/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/mshick/add-pr-comment/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/mshick/add-pr-comment/teams", + "hooks_url": "https://api.github.com/repos/mshick/add-pr-comment/hooks", + "issue_events_url": "https://api.github.com/repos/mshick/add-pr-comment/issues/events{/number}", + "events_url": "https://api.github.com/repos/mshick/add-pr-comment/events", + "assignees_url": "https://api.github.com/repos/mshick/add-pr-comment/assignees{/user}", + "branches_url": "https://api.github.com/repos/mshick/add-pr-comment/branches{/branch}", + "tags_url": "https://api.github.com/repos/mshick/add-pr-comment/tags", + "blobs_url": "https://api.github.com/repos/mshick/add-pr-comment/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/mshick/add-pr-comment/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/mshick/add-pr-comment/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/mshick/add-pr-comment/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/mshick/add-pr-comment/statuses/{sha}", + "languages_url": "https://api.github.com/repos/mshick/add-pr-comment/languages", + "stargazers_url": "https://api.github.com/repos/mshick/add-pr-comment/stargazers", + "contributors_url": "https://api.github.com/repos/mshick/add-pr-comment/contributors", + "subscribers_url": "https://api.github.com/repos/mshick/add-pr-comment/subscribers", + "subscription_url": "https://api.github.com/repos/mshick/add-pr-comment/subscription", + "commits_url": "https://api.github.com/repos/mshick/add-pr-comment/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/mshick/add-pr-comment/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/mshick/add-pr-comment/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/mshick/add-pr-comment/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/mshick/add-pr-comment/contents/{+path}", + "compare_url": "https://api.github.com/repos/mshick/add-pr-comment/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/mshick/add-pr-comment/merges", + "archive_url": "https://api.github.com/repos/mshick/add-pr-comment/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/mshick/add-pr-comment/downloads", + "issues_url": "https://api.github.com/repos/mshick/add-pr-comment/issues{/number}", + "pulls_url": "https://api.github.com/repos/mshick/add-pr-comment/pulls{/number}", + "milestones_url": "https://api.github.com/repos/mshick/add-pr-comment/milestones{/number}", + "notifications_url": "https://api.github.com/repos/mshick/add-pr-comment/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/mshick/add-pr-comment/labels{/name}", + "releases_url": "https://api.github.com/repos/mshick/add-pr-comment/releases{/id}", + "deployments_url": "https://api.github.com/repos/mshick/add-pr-comment/deployments", + "created_at": "2019-11-22T22:11:44Z", + "updated_at": "2020-04-09T00:08:35Z", + "pushed_at": "2020-04-09T00:08:32Z", + "git_url": "git://github.com/mshick/add-pr-comment.git", + "ssh_url": "git@github.com:mshick/add-pr-comment.git", + "clone_url": "https://github.com/mshick/add-pr-comment.git", + "svn_url": "https://github.com/mshick/add-pr-comment", + "homepage": "https://github.com/marketplace/actions/add-pr-comment", + "size": 299, + "stargazers_count": 8, + "watchers_count": 8, + "language": "JavaScript", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 2, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 1, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 2, + "open_issues": 1, + "watchers": 8, + "default_branch": "master" + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/mshick/add-pr-comment/pulls/6" + }, + "html": { "href": "https://github.com/mshick/add-pr-comment/pull/6" }, + "issue": { + "href": "https://api.github.com/repos/mshick/add-pr-comment/issues/6" + }, + "comments": { + "href": "https://api.github.com/repos/mshick/add-pr-comment/issues/6/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/mshick/add-pr-comment/pulls/6/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/mshick/add-pr-comment/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/mshick/add-pr-comment/pulls/6/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/mshick/add-pr-comment/statuses/9bef15e74a60ecbb5197e7e975096fd7c6525794" + } + }, + "author_association": "OWNER" + } + ], + "headers": { + "server": "GitHub.com", + "date": "Thu, 09 Apr 2020 00:09:21 GMT", + "content-type": "application/json; charset=utf-8", + "status": "200 OK", + "cache-control": "public, max-age=60, s-maxage=60", + "vary": "Accept, Accept-Encoding, Accept, X-Requested-With", + "etag": "W/\"c8d0f2877b89a817343189c4c84e5afd\"", + "x-github-media-type": "github.groot-preview; format=json", + "access-control-expose-headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset", + "access-control-allow-origin": "*", + "strict-transport-security": "max-age=31536000; includeSubdomains; preload", + "x-frame-options": "deny", + "x-content-type-options": "nosniff", + "x-xss-protection": "1; mode=block", + "referrer-policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "content-security-policy": "default-src 'none'", + "x-ratelimit-limit": "60", + "x-ratelimit-remaining": "50", + "x-ratelimit-reset": "1586392794", + "accept-ranges": "bytes", + "transfer-encoding": "chunked", + "connection": "close", + "x-github-request-id": "0401:253A:371D25:5CAF8A:5E8E67B1" + } +}