The official π bot for Delta.
The X bot posts updates to @deltaml_org
with information from the GitHub API.
The bot uses the GitHub API to:
- Detect when a new contributor makes their first commit to the
master
branch of the delta repository. - Detect when a new release of the delta repository is published.
The bot uses the X API to:
- Post a message to
@deltaml_org
whenever a new contributor makes their first commit to themaster
branch of the delta repository. - Post a message to
@deltaml_org
whenever a new release of the delta repository is published.
- Clone the repository
- Set up environment variables:
GITHUB_TOKEN
: GitHub API tokenX_API_KEY
: X (Twitter) API keyX_API_SECRET
: X (Twitter) API secretX_ACCESS_TOKEN
: X (Twitter) access tokenX_ACCESS_SECRET
: X (Twitter) access token secretREPO_OWNER
: The owner of the GitHub repositoryREPO_NAME
: The name of the GitHub repository
- Go to your GitHub account settings
- Navigate to Developer settings > Personal access tokens
- Generate a new token (classic) with the
repo
andadmin:repo_hook
scopes
- Go to your GitHub repository settings
- Navigate to Webhooks > Add webhook
- Enter the webhook URL from the environment variable
WEBHOOK_PATH
- Select the events, "Push" and "Releases" you want to trigger the webhook
- Definition : Webhooks are HTTP callbacks that allow one application to send real-time data to another whenever a specific event occurs.
- Communication : They use a request-response model. When an event occurs, the source application makes an HTTP POST request to a predefined URL (the webhook endpoint) on the target application, sending data about the event.
- Use Case : Commonly used for event-driven architectures where you want to notify another service about events, such as GitHub sending a notification about a new commit or release.
- Example : When a new issue is created in a GitHub repository, GitHub can send a webhook notification to your application to inform it of the new issue.
Get these from the X Developer Portal (https://developer.twitter.com/en/portal/dashboard)
- Go to your X (Twitter) dashboard
- Navigate to your API keys
- Create a new API key
If anything is unclear, reach out in the Github Discussions here on GitHub.
The following contributors have either helped to start this project, have contributed code, are actively maintaining it (including documentation), or in other ways being awesome contributors to this project. We'd like to take a moment to recognize them.
The MIT License.