Releasing Github Webhooks Extension
We're excited to announce GitHub Webhooks Extension, a new extension that allows you to trigger a workflow based on a event from a GitHub repositories directly in your January project.
With this extension, you can now:
- Automatically respond to events like push commits, pull requests, and issues.
- Easily set up and manage webhooks within your project.
- Connect your workflows with real-time updates from your GitHub repositories.
What can you do with this extension?
- Send notifications to your team when a new issue is created.
- Maintaining public issue-tracking boards while managing comminucation internally.
- Build community discussions boards that are powered by GitHub issues or GitHub discussions.
How does it work?
It uses Github Webhooks package to listen to events from a GitHub repository and broadcast them to the other parts of the project.
This package takes care of the low-level details of receiving and verifying webhook payloads from GitHub, and dispatching them to your code.
The setup looks similar to this:
The listener part:
A workflow that uses the extension would look like this:
How I can use it?
- Install the extension from within January.
- Create webhooks in the GitHub repository.
- Add the webhook secret as an environment variable in your project.
- The rest of details can be found in the documentation.
There are two parts to this extension:
- Triggers
- Policies
A simple example of a workflow that listens to a issues.labeled
event and creates a new record in a database:
Say, you only want to save the issue if it's labeled with bug
:
Get Involved
You can try it out today in the playground. We’re always happy to hear your feedback.
Looking to the future, January team is running a survey to gather info from the ecosystem to help shape the API development sphere. If you have a minute, please fill out the survey.
What's next?
- Support for more than one webhook per project.
- Listening to multiple events in a single workflow.
- Add Github octokit to the extension to interact with the GitHub API.