Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fdaciuk/github2twitter
https://github.com/fdaciuk/github2twitter
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/fdaciuk/github2twitter
- Owner: fdaciuk
- License: mit
- Created: 2016-09-16T01:20:45.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-09-09T12:57:55.000Z (about 2 years ago)
- Last Synced: 2024-04-09T21:52:06.198Z (7 months ago)
- Language: JavaScript
- Size: 121 KB
- Stars: 10
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub to Twitter
> Send informations from GitHub to Twitter
## Before run
**Create a webhook on GitHub:**
Choose a repository on GitHub that you want to read issues to post on Twitter. Enter on **Settings** and configure a new webhook.
To test webhook locally and set a URL on GitHub, we recomend you to use [ngrok](https://ngrok.com/)
**Create an app on Twitter:**
Create a new app on https://apps.twitter.com/, and configure to read and write.
**Environment Variables:**
Create a copy of the file `.env.example` called `.env`. Then, just configure some environment variables inside this file:
- `PORT`: Port to run the server. Default is `8080`
- `GITHUB_SECRET`: GitHub secret on webhook configuration
- `CONSUMER_KEY`: Twitter Consumer Key
- `CONSUMER_SECRET`: Twitter Consumer Secret
- `ACCESS_TOKEN_KEY`: Twitter Access Token Key
- `ACCESS_TOKEN_SECRET`: Twitter Access Token Secret## Default configurations
- `/api/webhook` is the route to configure on GitHub app
- `/api/tweet` is the route to configure as callback on Twitter app## Scripts
- `yarn dev`: Run local dev server
## Notes
It will just tweet on production environment. To force tweet on development environment, edit `index.js`, on line `59`, and pass `'production'` by parameter for `isProduction` function.
## Deploy
This repository is ready to run inside Heroku.
## License
[MIT License](LICENSE)