{"id":19954217,"url":"https://github.com/code100x/bounty-hook","last_synced_at":"2025-10-04T21:35:28.775Z","repository":{"id":238627060,"uuid":"797043300","full_name":"code100x/bounty-hook","owner":"code100x","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-12T18:55:55.000Z","size":38,"stargazers_count":10,"open_issues_count":4,"forks_count":15,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-12T19:37:41.877Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/code100x.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":"2024-05-07T05:00:01.000Z","updated_at":"2024-05-12T18:33:56.000Z","dependencies_parsed_at":"2024-05-11T05:29:06.352Z","dependency_job_id":null,"html_url":"https://github.com/code100x/bounty-hook","commit_stats":null,"previous_names":["code100x/bounty-hook"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code100x%2Fbounty-hook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code100x%2Fbounty-hook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code100x%2Fbounty-hook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code100x%2Fbounty-hook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code100x","download_url":"https://codeload.github.com/code100x/bounty-hook/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224371027,"owners_count":17300130,"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","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-11-13T01:19:15.301Z","updated_at":"2025-10-04T21:35:23.735Z","avatar_url":"https://github.com/code100x.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bounty Hook\nA simple webhook handler from github. Whenever the admins in the env file wite `/bounty $xx` in any PR comment then this accepts the webhook from the github and add bounty ammount, user who created PR and more details in a notion database and makes a tweet from the authorized twitter account about which user has won the bounty.  \n## Steps to run locally\n\n- git clone\n- cp .examples.dev.vars .dev.vars\n  populate the necessary environment variables\n- Uncomment the KV Namespace for the twitter part\n\n```\nbun install\nbun run dev\n```\n\n- Use a tool like [ngrok](https://ngrok.com/) to expose your local host to internet\n- Add a webhook in your repo pointing to your ngrok_url/webhook\n- Add the ngrok_url/twitter-callback to the enviroment variable and the in the twitter developer app settings as the callback url for using twitter part\n\n## Webhook configuration\n\n![image](https://github.com/code100x/bounty-hook/assets/76874341/22cfc584-d832-4779-b98b-40a6f6239755)\n![image](https://github.com/code100x/bounty-hook/assets/76874341/3cf824e5-61bd-459c-bdca-d95a69f767e2)\n\n## Twitter configuration\n\n![image](https://github.com/shrutsureja/bounty-hook/assets/92169549/e13e8665-907e-47f4-afa3-0ee98c75bbad)\n![image](https://github.com/shrutsureja/bounty-hook/assets/92169549/7d420bcb-a040-4d6f-808a-a266fc017961)\n\n\n## Steps to deploy\n\n1. Generate the clientId and clientSecret in the twitter developer app with this settings \n- App Permissions as Read and Write\n- Type of app as Native App (public client)\n- Call backurl `cloudflare_url/twitter-callback`\n2. Also have the notion API keys.\n3. add the necessary enviroment variables in the `wrangler.toml` file and uncomment them\n4. run `bun run deploy` to deploy\n5. Create any 4 kv_namespace in the cloudflare account \n![image](https://github.com/code100x/bounty-hook/assets/92169549/056b32e8-966d-4424-9068-57488e7546a0)\n6. Go to the `cloudflare worker project \u003e settings \u003e variables \u003e kv namespace bindings` now make sure to add this 4 variable to different namespaces (KEEP THE SAME VARIABLE NAME) once done it will look like this and then hit deploy\n```\naccess_token\nrefresh_token\ncodeVerifier\nstate\n```\n![image](https://github.com/code100x/bounty-hook/assets/92169549/0c28b719-6288-4d1d-a023-4b7a15bc49c9)\n7. Now to setup twitter hit the URL `cloudflare_url/twitter-setup` and then authorise the twitter.\n8. Make sure you have added the `cloudflare_url/webhook` in the github webhooks and then you are good to go.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode100x%2Fbounty-hook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode100x%2Fbounty-hook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode100x%2Fbounty-hook/lists"}