{"id":20333955,"url":"https://github.com/braedon/github-tweeter","last_synced_at":"2025-10-16T06:34:40.793Z","repository":{"id":146707700,"uuid":"220018150","full_name":"braedon/github-tweeter","owner":"braedon","description":"A simple bot to announce Github releases on Twitter","archived":false,"fork":false,"pushed_at":"2023-05-23T00:12:39.000Z","size":14,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-14T16:06:24.622Z","etag":null,"topics":["github","github-release","twitter","twitter-bot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/braedon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-11-06T14:38:57.000Z","updated_at":"2020-09-09T04:24:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"6472f132-1e4a-4032-9eb7-5ae4db64fb78","html_url":"https://github.com/braedon/github-tweeter","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braedon%2Fgithub-tweeter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braedon%2Fgithub-tweeter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braedon%2Fgithub-tweeter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braedon%2Fgithub-tweeter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/braedon","download_url":"https://codeload.github.com/braedon/github-tweeter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241852158,"owners_count":20030969,"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":["github","github-release","twitter","twitter-bot"],"created_at":"2024-11-14T20:35:24.860Z","updated_at":"2025-10-16T06:34:35.729Z","avatar_url":"https://github.com/braedon.png","language":"Python","readme":"# Github Tweeter\n\nA simple bot that listens to `release` type event webhooks from Github, and tweets about `published` releases.\n\n[Source Code](https://github.com/braedon/github-tweeter) | [Docker Image](https://hub.docker.com/r/braedon/github-tweeter)\n\n## How To Deploy\n\n### 1. Twitter Setup\n\nTo allow Github Tweeter to tweet as you, you'll need to create a Twitter app. This requires a Twitter developer account - I'll leave that as an exercise for the reader. Once you have a developer account, go to https://developer.twitter.com/en/apps and `Create an app`. Fill in all the required fields appropriately - all optional fields can be left blank - and `Create` the app.\n\nOnce created, go to the `Keys and tokens` tab of the app settings. Generate an access token, and then take note of the `Access token \u0026 access token secret`, and `Consumer API keys`. You'll need them to configure Github Tweeter in the next step.\n\n### 2. Github Tweeter Deployment\n\nGithub Tweeter serves a REST endpoint at `/webhook` (on port `8080` by default), which needs to be deployed to a public URL (e.g. https://example.com/github-tweeter/webhook) on the hosting of your choice. This is the endpoint that Github will send event webhooks to.\n\nYou will need to configure Github Tweeter with the various keys and secrets from the Twitter app created in the previous step.\n\nIt also needs a shared secret that Github will use to sign the webhooks it sends. You can generate this however you like, but it should be long and random. Take note of it for the next step.\n\nGithub Tweeter can be run directly from source, though this isn't recommended for production deployments.\n\n```\n\u003e pip3 install -r requirements.txt\n\u003e python3 main.py -h\nUsage: main.py [OPTIONS]\n\nOptions:\n  --github-webhook-secret TEXT    Github webhook secret.  [required]\n  --twitter-consumer-key TEXT     Twitter consumer API key.  [required]\n  --twitter-consumer-secret TEXT  Twitter consumer API secret key.  [required]\n  --twitter-token-key TEXT        Twitter access token.  [required]\n  --twitter-token-secret TEXT     Twitter access token secret.  [required]\n  -p, --port INTEGER              Port to serve API on (default=8080).\n  -j, --json                      Log in json.\n  -v, --verbose                   Log debug messages.\n  -h, --help                      Show this message and exit.\n\u003e python3 main.py \\\n    --github-webhook-secret \u003cyour-github-webhook-secret\u003e \\\n    --twitter-consumer-key \u003cyour-twitter-consumer-key\u003e \\\n    --twitter-consumer-secret \u003cyour-twitter-consumer-secret\u003e \\\n    --twitter-token-key \u003cyour-twitter-token-key\u003e \\\n    --twitter-token-secret \u003cyour-twitter-token-secret\u003e\n```\n\nFor production deployments, using the provided [docker image](https://hub.docker.com/repository/docker/braedon/github-tweeter) is recommended, as is using environment variables to provide the various keys and secrets.\n\n```\n\u003e sudo docker run --rm --name github-tweeter \\\n    -e GITHUB_TWEETER_OPT_GITHUB_WEBHOOK_SECRET=\u003cyour-github-webhook-secret\u003e \\\n    -e GITHUB_TWEETER_OPT_TWITTER_CONSUMER_KEY=\u003cyour-twitter-consumer-key\u003e \\\n    -e GITHUB_TWEETER_OPT_TWITTER_CONSUMER_SECRET=\u003cyour-twitter-consumer-secret\u003e \\\n    -e GITHUB_TWEETER_OPT_TWITTER_TOKEN_KEY=\u003cyour-twitter-token-key\u003e \\\n    -e GITHUB_TWEETER_OPT_TWITTER_TOKEN_SECRET=\u003cyour-twitter-token-secret\u003e \\\n    braedon/github-tweeter:\u003cversion\u003e\n```\n\n### 3. Github Setup\n\nTo connect a Github repository, configure a webhook (`Settings` -\u003e `Webhooks` -\u003e `Add webhook`) with the following settings:\n\n- **Payload URL:** https://example.com/github-tweeter/webhook\n- **Content type:** `application/json`\n- **Secret:** The Github webhook secret you generated earlier.\n- **Which events would you like...:** Select `Let me select individual events.` and check `Releases`. Uncheck everything else.\n\nNote that when you initially add a webhook Github will send a `ping` type event. If you've already deployed Github Tweeter, it will log a warning that it has received an unknown event type - this is safe to ignore.\n\n### 4. Create a Release\n\nAssuming everything is setup correctly, the next time you create a release - a full Github release, not a git tag - Github Tweeter will post a tweet from your account announcing the release, and linking to the release on Github.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbraedon%2Fgithub-tweeter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbraedon%2Fgithub-tweeter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbraedon%2Fgithub-tweeter/lists"}