Control Odoo Task Status from Github
Update task status in Odoo based on Github PR status and labels.
Summary
Categories |
Webhooks
|
Tags |
Odoo
GitHub
|
Authors |
Cetmix OU
|
License | AGPL-3 |
Version | 1.0.0 |
Call sign | cx_webhook_github |
Website | https://cetmix.com |
Download
2 downloads
This YAML defines a GitHub → Odoo integration webhook in Cetmix Tower, authenticating via HMAC, listening to pull_request events, and updating Odoo project tasks (state, kanban status) based on PR state and labels.
It also incudes the Github webhook authenticator which can be used later to create any other GitHub automation flows.
It requires the following OCA modules:
- Project Task Pull Request - Links GitHub PRs to Odoo tasks
🔗 GitHub Repository - Project Task Pull Request State - Syncs PR status between GitHub and Odoo
🔗 GitHub Repository
The implementation flow is almost identical to the one described in this article: https://cetmix.com/blog/cetmix-blog-2/automate-odoo-task-workflows-with-github-events-8
Configuration
- Import the YAML snippet in your Cetmix Tower.
- Put the secret in the Webhook Secret secret.

- Adjust the code to match your task stage names and ids.

- Add a new webhook in the GitHub settings. In the repository, switch to the “Settings” tab, select “Webhooks” from the left menu and click “Add webhook” button. You can also setup the webhook for the entire Organisation in your Organisation settings.

- Copy the URL fro the GitHub settings from the webhook:

- Fill the following values in the fields below:
- Payload URL: the URL you copied on the previous step
- Content type: application/json
- Secret: the one you have configured in Cetmix Tower secrets
- Enable SSL verification: if your domain is using “https://” prefix then yes. Otherwise why are you not using it?
- Which events to trigger. That depends on your code. You can set “All events”, however it’s recommended to specify exact events, eg “Pull request” to avoid excessive calls.

Usage
- Create a new PR in your repository and copy its link into the “PR URI” field in the task.

- When you update the PR state the task stage will be updated automatically.


For additional information you can refer to the blog post mentioned above: https://cetmix.com/blog/cetmix-blog-2/automate-odoo-task-workflows-with-github-events-8
This package is distributed under the GNU Affero General Public License v3.0 (AGPL-3) or later license.