From affd487747f0573cc0fdb56f981d55f5cb03563c Mon Sep 17 00:00:00 2001 From: Rob Anderson Date: Fri, 4 Feb 2022 07:48:49 -0800 Subject: [PATCH 1/6] add vars.json --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0a3812d..8b8623f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ node_modules # aws sam stuff .aws-sam -samconfig.toml \ No newline at end of file +samconfig.toml +vars.json \ No newline at end of file From facd041325c73ae581b5eed594742f65e30e7a10 Mon Sep 17 00:00:00 2001 From: Rob Anderson Date: Fri, 4 Feb 2022 09:28:29 -0800 Subject: [PATCH 2/6] env sample file --- .env-sample | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .env-sample diff --git a/.env-sample b/.env-sample new file mode 100644 index 0000000..cd8661e --- /dev/null +++ b/.env-sample @@ -0,0 +1,4 @@ +WEBHOOK_PROXY_URL= +APP_ID= +WEBHOOK_SECRET= +PRIVATE_KEY= \ No newline at end of file From d7673319b5336c977b1ecf68d61d09398bd4ac4c Mon Sep 17 00:00:00 2001 From: Rob Anderson Date: Fri, 4 Feb 2022 09:28:56 -0800 Subject: [PATCH 3/6] remove aws sam local debug junk --- events/body.json | 190 ---------------------------------------------- events/event.json | 91 ---------------------- vars.json | 7 -- 3 files changed, 288 deletions(-) delete mode 100644 events/body.json delete mode 100644 events/event.json delete mode 100644 vars.json diff --git a/events/body.json b/events/body.json deleted file mode 100644 index bb1c480..0000000 --- a/events/body.json +++ /dev/null @@ -1,190 +0,0 @@ -{ - "action": "opened", - "issue": { - "url": "https://api.github.com/repos/robandpdx/junk/issues/5", - "repository_url": "https://api.github.com/repos/robandpdx/junk", - "labels_url": "https://api.github.com/repos/robandpdx/junk/issues/5/labels{/name}", - "comments_url": "https://api.github.com/repos/robandpdx/junk/issues/5/comments", - "events_url": "https://api.github.com/repos/robandpdx/junk/issues/5/events", - "html_url": "https://github.com/robandpdx/junk/issues/5", - "id": 1123881704, - "node_id": "I_kwDOGxmGS85C_RLo", - "number": 5, - "title": "this is a testing issue", - "user": { - "login": "robandpdx", - "id": 95243761, - "node_id": "U_kgDOBa1N8Q", - "avatar_url": "https://avatars.githubusercontent.com/u/95243761?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/robandpdx", - "html_url": "https://github.com/robandpdx", - "followers_url": "https://api.github.com/users/robandpdx/followers", - "following_url": "https://api.github.com/users/robandpdx/following{/other_user}", - "gists_url": "https://api.github.com/users/robandpdx/gists{/gist_id}", - "starred_url": "https://api.github.com/users/robandpdx/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/robandpdx/subscriptions", - "organizations_url": "https://api.github.com/users/robandpdx/orgs", - "repos_url": "https://api.github.com/users/robandpdx/repos", - "events_url": "https://api.github.com/users/robandpdx/events{/privacy}", - "received_events_url": "https://api.github.com/users/robandpdx/received_events", - "type": "User", - "site_admin": true - }, - "labels": [ - - ], - "state": "open", - "locked": false, - "assignee": null, - "assignees": [ - - ], - "milestone": null, - "comments": 0, - "created_at": "2022-02-04T07:05:18Z", - "updated_at": "2022-02-04T07:05:18Z", - "closed_at": null, - "author_association": "OWNER", - "active_lock_reason": null, - "body": "here is a test issue", - "reactions": { - "url": "https://api.github.com/repos/robandpdx/junk/issues/5/reactions", - "total_count": 0, - "+1": 0, - "-1": 0, - "laugh": 0, - "hooray": 0, - "confused": 0, - "heart": 0, - "rocket": 0, - "eyes": 0 - }, - "timeline_url": "https://api.github.com/repos/robandpdx/junk/issues/5/timeline", - "performed_via_github_app": null - }, - "repository": { - "id": 454657611, - "node_id": "R_kgDOGxmGSw", - "name": "junk", - "full_name": "robandpdx/junk", - "private": false, - "owner": { - "login": "robandpdx", - "id": 95243761, - "node_id": "U_kgDOBa1N8Q", - "avatar_url": "https://avatars.githubusercontent.com/u/95243761?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/robandpdx", - "html_url": "https://github.com/robandpdx", - "followers_url": "https://api.github.com/users/robandpdx/followers", - "following_url": "https://api.github.com/users/robandpdx/following{/other_user}", - "gists_url": "https://api.github.com/users/robandpdx/gists{/gist_id}", - "starred_url": "https://api.github.com/users/robandpdx/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/robandpdx/subscriptions", - "organizations_url": "https://api.github.com/users/robandpdx/orgs", - "repos_url": "https://api.github.com/users/robandpdx/repos", - "events_url": "https://api.github.com/users/robandpdx/events{/privacy}", - "received_events_url": "https://api.github.com/users/robandpdx/received_events", - "type": "User", - "site_admin": true - }, - "html_url": "https://github.com/robandpdx/junk", - "description": "random junk", - "fork": false, - "url": "https://api.github.com/repos/robandpdx/junk", - "forks_url": "https://api.github.com/repos/robandpdx/junk/forks", - "keys_url": "https://api.github.com/repos/robandpdx/junk/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/robandpdx/junk/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/robandpdx/junk/teams", - "hooks_url": "https://api.github.com/repos/robandpdx/junk/hooks", - "issue_events_url": "https://api.github.com/repos/robandpdx/junk/issues/events{/number}", - "events_url": "https://api.github.com/repos/robandpdx/junk/events", - "assignees_url": "https://api.github.com/repos/robandpdx/junk/assignees{/user}", - "branches_url": "https://api.github.com/repos/robandpdx/junk/branches{/branch}", - "tags_url": "https://api.github.com/repos/robandpdx/junk/tags", - "blobs_url": "https://api.github.com/repos/robandpdx/junk/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/robandpdx/junk/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/robandpdx/junk/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/robandpdx/junk/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/robandpdx/junk/statuses/{sha}", - "languages_url": "https://api.github.com/repos/robandpdx/junk/languages", - "stargazers_url": "https://api.github.com/repos/robandpdx/junk/stargazers", - "contributors_url": "https://api.github.com/repos/robandpdx/junk/contributors", - "subscribers_url": "https://api.github.com/repos/robandpdx/junk/subscribers", - "subscription_url": "https://api.github.com/repos/robandpdx/junk/subscription", - "commits_url": "https://api.github.com/repos/robandpdx/junk/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/robandpdx/junk/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/robandpdx/junk/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/robandpdx/junk/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/robandpdx/junk/contents/{+path}", - "compare_url": "https://api.github.com/repos/robandpdx/junk/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/robandpdx/junk/merges", - "archive_url": "https://api.github.com/repos/robandpdx/junk/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/robandpdx/junk/downloads", - "issues_url": "https://api.github.com/repos/robandpdx/junk/issues{/number}", - "pulls_url": "https://api.github.com/repos/robandpdx/junk/pulls{/number}", - "milestones_url": "https://api.github.com/repos/robandpdx/junk/milestones{/number}", - "notifications_url": "https://api.github.com/repos/robandpdx/junk/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/robandpdx/junk/labels{/name}", - "releases_url": "https://api.github.com/repos/robandpdx/junk/releases{/id}", - "deployments_url": "https://api.github.com/repos/robandpdx/junk/deployments", - "created_at": "2022-02-02T05:46:11Z", - "updated_at": "2022-02-02T05:46:11Z", - "pushed_at": "2022-02-02T05:49:35Z", - "git_url": "git://github.com/robandpdx/junk.git", - "ssh_url": "git@github.com:robandpdx/junk.git", - "clone_url": "https://github.com/robandpdx/junk.git", - "svn_url": "https://github.com/robandpdx/junk", - "homepage": null, - "size": 3, - "stargazers_count": 0, - "watchers_count": 0, - "language": null, - "has_issues": true, - "has_projects": true, - "has_downloads": true, - "has_wiki": true, - "has_pages": false, - "forks_count": 0, - "mirror_url": null, - "archived": false, - "disabled": false, - "open_issues_count": 1, - "license": null, - "allow_forking": true, - "is_template": false, - "topics": [ - - ], - "visibility": "public", - "forks": 0, - "open_issues": 1, - "watchers": 0, - "default_branch": "main" - }, - "sender": { - "login": "robandpdx", - "id": 95243761, - "node_id": "U_kgDOBa1N8Q", - "avatar_url": "https://avatars.githubusercontent.com/u/95243761?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/robandpdx", - "html_url": "https://github.com/robandpdx", - "followers_url": "https://api.github.com/users/robandpdx/followers", - "following_url": "https://api.github.com/users/robandpdx/following{/other_user}", - "gists_url": "https://api.github.com/users/robandpdx/gists{/gist_id}", - "starred_url": "https://api.github.com/users/robandpdx/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/robandpdx/subscriptions", - "organizations_url": "https://api.github.com/users/robandpdx/orgs", - "repos_url": "https://api.github.com/users/robandpdx/repos", - "events_url": "https://api.github.com/users/robandpdx/events{/privacy}", - "received_events_url": "https://api.github.com/users/robandpdx/received_events", - "type": "User", - "site_admin": true - }, - "installation": { - "id": 22934599, - "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uMjI5MzQ1OTk=" - } -} \ No newline at end of file diff --git a/events/event.json b/events/event.json deleted file mode 100644 index e16170b..0000000 --- a/events/event.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "resource": "/api/github/webhooks", - "path": "/api/github/webhooks", - "httpMethod": "POST", - "headers": { - "Accept": "*/*", - "Authorization": "Basic dGVzdDp0ZXN0", - "charsets": "utf-8", - "CloudFront-Forwarded-Proto": "https", - "CloudFront-Is-Desktop-Viewer": "true", - "CloudFront-Is-Mobile-Viewer": "false", - "CloudFront-Is-SmartTV-Viewer": "false", - "CloudFront-Is-Tablet-Viewer": "false", - "CloudFront-Viewer-Country": "AU", - "Content-Type": "application/json", - "Host": "j981iasjti.execute-api.us-west-2.amazonaws.com", - "User-Agent": "Amazon CloudFront", - "Via": "1.1 52fa887ba82513d16e3f586c3db681fe.cloudfront.net (CloudFront)", - "X-Amz-Cf-Id": "qHw4Y-eBsSYbswcb0dFiUG9_XhqMgHXXALY2YktgWvnQuWwBNfpEmw==", - "X-Amzn-Trace-Id": "Root=1-5fa1c363-4a1fbc2e177e29f1181f0a0d", - "X-Forwarded-For": "101.187.202.219, 64.252.187.152", - "X-Forwarded-Port": "443", - "X-Forwarded-Proto": "https", - "X-GitHub-Delivery": "cfa49900-8588-11ec-9a61-8db47b7b8d75", - "X-GitHub-Event": "issues", - "X-GitHub-Hook-ID": "341463970", - "X-GitHub-Hook-Installation-Target-ID": "169690", - "X-GitHub-Hook-Installation-Target-Type": "integration", - "X-Hub-Signature": "sha1=a90e8fe16c2f9631bfa34337a7b509a87db2d27d", - "X-Hub-Signature-256": "sha256=4ffb473deffbe858bada9694ea6b3d5761b223db2112595d9e976652e0d3e491" - }, - "multiValueHeaders": { - "Accept": [ "application/json" ], - "Authorization": [ "Basic xxxxxxxxx" ], - "charsets": [ "utf-8" ], - "CloudFront-Forwarded-Proto": [ "https" ], - "CloudFront-Is-Desktop-Viewer": [ "true" ], - "CloudFront-Is-Mobile-Viewer": [ "false" ], - "CloudFront-Is-SmartTV-Viewer": [ "false" ], - "CloudFront-Is-Tablet-Viewer": [ "false" ], - "CloudFront-Viewer-Country": [ "AU" ], - "Content-Type": [ "application/json" ], - "Host": [ "j981iasjti.execute-api.us-west-2.amazonaws.com" ], - "User-Agent": [ "Amazon CloudFront" ], - "Via": [ - "1.1 52fa887ba82513d16e3f586c3db681fe.cloudfront.net (CloudFront)" - ], - "X-Amz-Cf-Id": [ "qHw4Y-eBsSYbswcb0dFiUG9_XhqMgHXXALY2YktgWvnQuWwBNfpEmw==" ], - "X-Amzn-Trace-Id": [ "Root=1-5fa1c363-4a1fbc2e177e29f1181f0a0d" ], - "X-Forwarded-For": [ "101.187.202.219, 64.252.187.152" ], - "X-Forwarded-Port": [ "443" ], - "X-Forwarded-Proto": [ "https" ] - }, - "queryStringParameters": null, - "multiValueQueryStringParameters": null, - "pathParameters": null, - "stageVariables": null, - "requestContext": { - "resourceId": "5amg2g", - "authorizer": { "principalId": "test", "integrationLatency": 0 }, - "resourcePath": "/api/github/webhooks", - "httpMethod": "POST", - "extendedRequestId": "Vct3iHXzvHcFtXg=", - "requestTime": "03/Nov/2020:20:53:55 +0000", - "path": "/Prod//api/github/webhooks", - "accountId": "953721827634", - "protocol": "HTTP/1.1", - "stage": "Prod", - "domainPrefix": "xxxxxxxxx", - "requestTimeEpoch": 1604436835380, - "requestId": "be6c5a1b-30fa-46dc-bc42-9c1f424dd170", - "identity": { - "cognitoIdentityPoolId": null, - "accountId": null, - "cognitoIdentityId": null, - "caller": null, - "sourceIp": "101.187.202.219", - "principalOrgId": null, - "accessKey": null, - "cognitoAuthenticationType": null, - "cognitoAuthenticationProvider": null, - "userArn": null, - "userAgent": "Amazon CloudFront", - "user": null - }, - "domainName": "xxxxxxxxx.execute-api.us-west-2.amazonaws.com", - "apiId": "xxxxxxxxx" - }, - "body": "{\r\n \"action\": \"opened\",\r\n \"issue\": {\r\n \"url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/issues\/3\",\r\n \"repository_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\",\r\n \"labels_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/issues\/3\/labels{\/name}\",\r\n \"comments_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/issues\/3\/comments\",\r\n \"events_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/issues\/3\/events\",\r\n \"html_url\": \"https:\/\/github.com\/robandpdx\/junk\/issues\/3\",\r\n \"id\": 1123861965,\r\n \"node_id\": \"I_kwDOGxmGS85C_MXN\",\r\n \"number\": 3,\r\n \"title\": \"yet another issue\",\r\n \"user\": {\r\n \"login\": \"robandpdx\",\r\n \"id\": 95243761,\r\n \"node_id\": \"U_kgDOBa1N8Q\",\r\n \"avatar_url\": \"https:\/\/avatars.githubusercontent.com\/u\/95243761?v=4\",\r\n \"gravatar_id\": \"\",\r\n \"url\": \"https:\/\/api.github.com\/users\/robandpdx\",\r\n \"html_url\": \"https:\/\/github.com\/robandpdx\",\r\n \"followers_url\": \"https:\/\/api.github.com\/users\/robandpdx\/followers\",\r\n \"following_url\": \"https:\/\/api.github.com\/users\/robandpdx\/following{\/other_user}\",\r\n \"gists_url\": \"https:\/\/api.github.com\/users\/robandpdx\/gists{\/gist_id}\",\r\n \"starred_url\": \"https:\/\/api.github.com\/users\/robandpdx\/starred{\/owner}{\/repo}\",\r\n \"subscriptions_url\": \"https:\/\/api.github.com\/users\/robandpdx\/subscriptions\",\r\n \"organizations_url\": \"https:\/\/api.github.com\/users\/robandpdx\/orgs\",\r\n \"repos_url\": \"https:\/\/api.github.com\/users\/robandpdx\/repos\",\r\n \"events_url\": \"https:\/\/api.github.com\/users\/robandpdx\/events{\/privacy}\",\r\n \"received_events_url\": \"https:\/\/api.github.com\/users\/robandpdx\/received_events\",\r\n \"type\": \"User\",\r\n \"site_admin\": true\r\n },\r\n \"labels\": [\r\n\r\n ],\r\n \"state\": \"open\",\r\n \"locked\": false,\r\n \"assignee\": null,\r\n \"assignees\": [\r\n\r\n ],\r\n \"milestone\": null,\r\n \"comments\": 0,\r\n \"created_at\": \"2022-02-04T06:26:49Z\",\r\n \"updated_at\": \"2022-02-04T06:26:49Z\",\r\n \"closed_at\": null,\r\n \"author_association\": \"OWNER\",\r\n \"active_lock_reason\": null,\r\n \"body\": \"here we go again\",\r\n \"reactions\": {\r\n \"url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/issues\/3\/reactions\",\r\n \"total_count\": 0,\r\n \"+1\": 0,\r\n \"-1\": 0,\r\n \"laugh\": 0,\r\n \"hooray\": 0,\r\n \"confused\": 0,\r\n \"heart\": 0,\r\n \"rocket\": 0,\r\n \"eyes\": 0\r\n },\r\n \"timeline_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/issues\/3\/timeline\",\r\n \"performed_via_github_app\": null\r\n },\r\n \"repository\": {\r\n \"id\": 454657611,\r\n \"node_id\": \"R_kgDOGxmGSw\",\r\n \"name\": \"junk\",\r\n \"full_name\": \"robandpdx\/junk\",\r\n \"private\": false,\r\n \"owner\": {\r\n \"login\": \"robandpdx\",\r\n \"id\": 95243761,\r\n \"node_id\": \"U_kgDOBa1N8Q\",\r\n \"avatar_url\": \"https:\/\/avatars.githubusercontent.com\/u\/95243761?v=4\",\r\n \"gravatar_id\": \"\",\r\n \"url\": \"https:\/\/api.github.com\/users\/robandpdx\",\r\n \"html_url\": \"https:\/\/github.com\/robandpdx\",\r\n \"followers_url\": \"https:\/\/api.github.com\/users\/robandpdx\/followers\",\r\n \"following_url\": \"https:\/\/api.github.com\/users\/robandpdx\/following{\/other_user}\",\r\n \"gists_url\": \"https:\/\/api.github.com\/users\/robandpdx\/gists{\/gist_id}\",\r\n \"starred_url\": \"https:\/\/api.github.com\/users\/robandpdx\/starred{\/owner}{\/repo}\",\r\n \"subscriptions_url\": \"https:\/\/api.github.com\/users\/robandpdx\/subscriptions\",\r\n \"organizations_url\": \"https:\/\/api.github.com\/users\/robandpdx\/orgs\",\r\n \"repos_url\": \"https:\/\/api.github.com\/users\/robandpdx\/repos\",\r\n \"events_url\": \"https:\/\/api.github.com\/users\/robandpdx\/events{\/privacy}\",\r\n \"received_events_url\": \"https:\/\/api.github.com\/users\/robandpdx\/received_events\",\r\n \"type\": \"User\",\r\n \"site_admin\": true\r\n },\r\n \"html_url\": \"https:\/\/github.com\/robandpdx\/junk\",\r\n \"description\": \"random junk\",\r\n \"fork\": false,\r\n \"url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\",\r\n \"forks_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/forks\",\r\n \"keys_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/keys{\/key_id}\",\r\n \"collaborators_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/collaborators{\/collaborator}\",\r\n \"teams_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/teams\",\r\n \"hooks_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/hooks\",\r\n \"issue_events_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/issues\/events{\/number}\",\r\n \"events_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/events\",\r\n \"assignees_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/assignees{\/user}\",\r\n \"branches_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/branches{\/branch}\",\r\n \"tags_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/tags\",\r\n \"blobs_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/git\/blobs{\/sha}\",\r\n \"git_tags_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/git\/tags{\/sha}\",\r\n \"git_refs_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/git\/refs{\/sha}\",\r\n \"trees_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/git\/trees{\/sha}\",\r\n \"statuses_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/statuses\/{sha}\",\r\n \"languages_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/languages\",\r\n \"stargazers_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/stargazers\",\r\n \"contributors_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/contributors\",\r\n \"subscribers_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/subscribers\",\r\n \"subscription_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/subscription\",\r\n \"commits_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/commits{\/sha}\",\r\n \"git_commits_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/git\/commits{\/sha}\",\r\n \"comments_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/comments{\/number}\",\r\n \"issue_comment_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/issues\/comments{\/number}\",\r\n \"contents_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/contents\/{+path}\",\r\n \"compare_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/compare\/{base}...{head}\",\r\n \"merges_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/merges\",\r\n \"archive_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/{archive_format}{\/ref}\",\r\n \"downloads_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/downloads\",\r\n \"issues_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/issues{\/number}\",\r\n \"pulls_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/pulls{\/number}\",\r\n \"milestones_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/milestones{\/number}\",\r\n \"notifications_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/notifications{?since,all,participating}\",\r\n \"labels_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/labels{\/name}\",\r\n \"releases_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/releases{\/id}\",\r\n \"deployments_url\": \"https:\/\/api.github.com\/repos\/robandpdx\/junk\/deployments\",\r\n \"created_at\": \"2022-02-02T05:46:11Z\",\r\n \"updated_at\": \"2022-02-02T05:46:11Z\",\r\n \"pushed_at\": \"2022-02-02T05:49:35Z\",\r\n \"git_url\": \"git:\/\/github.com\/robandpdx\/junk.git\",\r\n \"ssh_url\": \"git@github.com:robandpdx\/junk.git\",\r\n \"clone_url\": \"https:\/\/github.com\/robandpdx\/junk.git\",\r\n \"svn_url\": \"https:\/\/github.com\/robandpdx\/junk\",\r\n \"homepage\": null,\r\n \"size\": 3,\r\n \"stargazers_count\": 0,\r\n \"watchers_count\": 0,\r\n \"language\": null,\r\n \"has_issues\": true,\r\n \"has_projects\": true,\r\n \"has_downloads\": true,\r\n \"has_wiki\": true,\r\n \"has_pages\": false,\r\n \"forks_count\": 0,\r\n \"mirror_url\": null,\r\n \"archived\": false,\r\n \"disabled\": false,\r\n \"open_issues_count\": 3,\r\n \"license\": null,\r\n \"allow_forking\": true,\r\n \"is_template\": false,\r\n \"topics\": [\r\n\r\n ],\r\n \"visibility\": \"public\",\r\n \"forks\": 0,\r\n \"open_issues\": 3,\r\n \"watchers\": 0,\r\n \"default_branch\": \"main\"\r\n },\r\n \"sender\": {\r\n \"login\": \"robandpdx\",\r\n \"id\": 95243761,\r\n \"node_id\": \"U_kgDOBa1N8Q\",\r\n \"avatar_url\": \"https:\/\/avatars.githubusercontent.com\/u\/95243761?v=4\",\r\n \"gravatar_id\": \"\",\r\n \"url\": \"https:\/\/api.github.com\/users\/robandpdx\",\r\n \"html_url\": \"https:\/\/github.com\/robandpdx\",\r\n \"followers_url\": \"https:\/\/api.github.com\/users\/robandpdx\/followers\",\r\n \"following_url\": \"https:\/\/api.github.com\/users\/robandpdx\/following{\/other_user}\",\r\n \"gists_url\": \"https:\/\/api.github.com\/users\/robandpdx\/gists{\/gist_id}\",\r\n \"starred_url\": \"https:\/\/api.github.com\/users\/robandpdx\/starred{\/owner}{\/repo}\",\r\n \"subscriptions_url\": \"https:\/\/api.github.com\/users\/robandpdx\/subscriptions\",\r\n \"organizations_url\": \"https:\/\/api.github.com\/users\/robandpdx\/orgs\",\r\n \"repos_url\": \"https:\/\/api.github.com\/users\/robandpdx\/repos\",\r\n \"events_url\": \"https:\/\/api.github.com\/users\/robandpdx\/events{\/privacy}\",\r\n \"received_events_url\": \"https:\/\/api.github.com\/users\/robandpdx\/received_events\",\r\n \"type\": \"User\",\r\n \"site_admin\": true\r\n },\r\n \"installation\": {\r\n \"id\": 22934599,\r\n \"node_id\": \"MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uMjI5MzQ1OTk=\"\r\n }\r\n}", - "isBase64Encoded": false - } \ No newline at end of file diff --git a/vars.json b/vars.json deleted file mode 100644 index 71c9f4e..0000000 --- a/vars.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "webhooks": { - "APP_ID": "", - "WEBHOOK_SECRET": "", - "PRIVATE_KEY": "" - } -} \ No newline at end of file From cf8cbe9afe576e173e974bfea40b4cb079fe83e7 Mon Sep 17 00:00:00 2001 From: Rob Anderson Date: Fri, 4 Feb 2022 10:26:33 -0800 Subject: [PATCH 4/6] ignore .env --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8b8623f..c2a21a6 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ node_modules # aws sam stuff .aws-sam samconfig.toml -vars.json \ No newline at end of file +vars.json +.env \ No newline at end of file From 6dc04454046cac633274fdefa91d4c1b91167514 Mon Sep 17 00:00:00 2001 From: Rob Anderson Date: Fri, 4 Feb 2022 10:26:44 -0800 Subject: [PATCH 5/6] remove unused stuff --- .vscode/launch.json | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index a50e4ea..5961adf 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -6,28 +6,12 @@ "configurations": [ { "type": "node", - "request": "attach", - "name": "Attach to lambda", - "address": "localhost", - "port": 9999, - "localRoot": "${workspaceRoot}", - "remoteRoot": "/var/task", - "protocol": "inspector", - "stopOnEntry": false - }, - { - "type": "aws-sam", - "request": "direct-invoke", - "name": "webhooks", - "invokeTarget": { - "target": "template", - "templatePath": "${workspaceFolder}/template.yaml", - "logicalId": "webhooks" - }, - "lambda": { - "payload": {}, - "environmentVariables": {} - } + "request": "launch", + "name": "Launch Probot", + "runtimeExecutable": "probot", + "runtimeArgs": ["run", "./app.js"], + "console": "integratedTerminal", + "cwd": "${workspaceRoot}/", } ] } \ No newline at end of file From 7237b4c0a1ede66bd008451555de1fca2991f9b3 Mon Sep 17 00:00:00 2001 From: Rob Anderson Date: Fri, 4 Feb 2022 10:27:25 -0800 Subject: [PATCH 6/6] update to debugging instructions --- README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 220e102..df7053d 100644 --- a/README.md +++ b/README.md @@ -34,12 +34,10 @@ Subsequent deploys to the same stack to the default environment... 1. run `sam deploy` ## Debugging locally -1. Populate the values in vars.json with the ones specific for your GitHub app. For the `PRIVATE_KEY` replace newlines with `\\n` to make the string value a single line. -1. run `sam build` -1. Run sam local via bash... -``` -sam local invoke -d 9999 webhooks -n vars.json -e events/event.json -``` +1. Point your GitHub app to your local using something like smee.io +1. Copy .env-sample to .env and populate with values specific for your GitHub app. For the `PRIVATE_KEY` replace newlines with `\\n` to make the string value a single line. +1. From the VSCode `RUN AND DEBUG` menu select `Launch Probot` and click the green arrow to start debugging. + ## License [ISC](LICENSE)