{"id":15568673,"url":"https://github.com/weakky/graphql-boilerplate-lambda-sync","last_synced_at":"2025-08-12T01:06:25.517Z","repository":{"id":96187006,"uuid":"127210270","full_name":"Weakky/graphql-boilerplate-lambda-sync","owner":"Weakky","description":"A lambda function to synchronize graphql-boilerplates","archived":false,"fork":false,"pushed_at":"2018-03-28T23:39:33.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-29T06:11:13.352Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Weakky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-28T23:27:22.000Z","updated_at":"2018-05-18T11:34:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"afdc686b-f160-4f8d-aefe-39d53ee362a7","html_url":"https://github.com/Weakky/graphql-boilerplate-lambda-sync","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"e59181f224a193e8d3903c5c4e03ddd831c531ac"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Weakky/graphql-boilerplate-lambda-sync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Weakky%2Fgraphql-boilerplate-lambda-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Weakky%2Fgraphql-boilerplate-lambda-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Weakky%2Fgraphql-boilerplate-lambda-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Weakky%2Fgraphql-boilerplate-lambda-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Weakky","download_url":"https://codeload.github.com/Weakky/graphql-boilerplate-lambda-sync/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Weakky%2Fgraphql-boilerplate-lambda-sync/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269982057,"owners_count":24507301,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T17:20:27.569Z","updated_at":"2025-08-12T01:06:25.483Z","avatar_url":"https://github.com/Weakky.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\ntitle: AWS Serverless Github Webhook Listener example in NodeJS\ndescription: This service will listen to github webhooks fired by a given repository.\nlayout: Doc\n--\u003e\n# Serverless Github webhook listener\n\nThis service will listen to github webhooks fired by a given repository.\n\n## Use Cases\n\n* Custom github notifications\n* Automatically tagging github issues\n* Pinging slack on new Pull requests\n* Welcoming new stargazers\n* etc.\n\n## How it works\n\n```\n┌───────────────┐               ┌───────────┐\n│               │               │           │\n│  Github repo  │               │   Github  │\n│   activity    │────Trigger───▶│  Webhook  │\n│               │               │           │\n└───────────────┘               └───────────┘\n                                      │\n                     ┌────POST────────┘\n                     │\n          ┌──────────▼─────────┐\n          │ ┌────────────────┐ │\n          │ │  API Gateway   │ │\n          │ │    Endpoint    │ │\n          │ └────────────────┘ │\n          └─────────┬──────────┘\n                    │\n                    │\n         ┌──────────▼──────────┐\n         │ ┌────────────────┐  │\n         │ │                │  │\n         │ │     Lambda     │  │\n         │ │    Function    │  │\n         │ │                │  │\n         │ └────────────────┘  │\n         └─────────────────────┘\n                    │\n                    │\n                    ▼\n         ┌────────────────────┐\n         │                    │\n         │      Do stuff      │\n         │                    │\n         └────────────────────┘\n```\n\n## Setup\n\n1. Set your webhook secret token in `serverless.yml` by replacing `REPLACE-WITH-YOUR-SECRET-HERE` in the environment variables `GITHUB_WEBHOOK_SECRET`.\n\n  ```yml\n  provider:\n    name: aws\n    runtime: nodejs6.10\n    environment:\n      GITHUB_WEBHOOK_SECRET: REPLACE-WITH-YOUR-SECRET-HERE\n  ```\n\n2. Deploy the service\n\n```\nexport AWS_ACCESS_KEY_ID=__YOUR_AWS_ACCESS_KEY__\nexport AWS_SECRET_ACCESS_KEY=__YOUR_AWS_SECRET_KEY__\n```\n\n  ```yaml\n  serverless deploy\n  ```\n\n  After the deploy has finished you should see something like:\n  ```bash\n  Service Information\n  service: github-webhook-listener\n  stage: dev\n  region: us-east-1\n  api keys:\n    None\n  endpoints:\n    POST - https://abcdefg.execute-api.us-east-1.amazonaws.com/dev/webhook\n  functions:\n    github-webhook-.....github-webhook-listener-dev-githubWebhookListener\n  ```\n\n3. Configure your webhook in your github repository settings. [Setting up a Webhook](https://developer.github.com/webhooks/creating/#setting-up-a-webhook)\n\n  **(1.)** Plugin your API POST endpoint. (`https://abcdefg.execute-api.us-east-1.amazonaws.com/dev/webhook` in this example). Run `sls info` to grab your endpoint if you don't have it handy.\n\n  **(2.)** Plugin your secret from `GITHUB_WEBHOOK_SECRET` environment variable\n\n  **(3.)** Choose the types of events you want the github webhook to fire on\n\n  ![webhook-steps](https://cloud.githubusercontent.com/assets/532272/21461773/db7cecd2-c922-11e6-9362-6bbf4661fe14.jpg)\n\n\n4. Manually trigger/test the webhook from settings or do something in your github repo to trigger a webhook.\n\n  You can tail the logs of the lambda function with the below command to see it running.\n  ```bash\n  serverless logs -f githubWebhookListener -t\n  ```\n\n  You should see the event from github in the lambda functions logs.\n\n5. Use your imagination and do whatever you want with your new github webhook listener! 🎉\n\nLet us know if you come up with a cool use case for this service =)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweakky%2Fgraphql-boilerplate-lambda-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweakky%2Fgraphql-boilerplate-lambda-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweakky%2Fgraphql-boilerplate-lambda-sync/lists"}