Contributors mailing list archives
contributors@odoo-community.org
Browse archives
Re: [18.0] Project Task Git integration
by
Francesco Ballerini
Hi Janik, thank you so much for sharing! I took a look at the connector, and from what I can see, it allows to sync repositories in your local environment by providing terminal access directly within the Odoo interface, along with some useful shortcuts and pre-configured commands. It's an interesting approach, and I might draw some inspiration from it.
For this task in particular I was especially interested in automatizing commit and pull requests behaviour by using git webhooks, and today I succeded setting up an environment to debug and extend the PR posted by Alan. It took me a while since I had to find a way to test webhooks with a localhost (never did it before), I finally succeded with a pretty simple Ngrok tunneling configuration.
I take the opportunity to keep you update, at the moment my "roadmap" is:
with the module webhook_gitlab that Alan provided in https://github.com/OCA/project/pull/1390
1 - setting up a developement environment in order to be able to debug, test, analyze code, extend the module on the version it was designed for (17.0) -- Done
2 - extend "webhook_gitlab" module to incorporate desired behaviour, which is at least a sync of the commit history (and maybe pull requests) linked to a task providing a list with links to the task related commits.
I'll share some notes on this step: as a general idea a commit should automatically be linked to the project task (when "push event webhook" triggers) if the commit message contains the name of any "project.task" from the Odoo Project linked with the repo where the push event triggered.
E.g. I have Odoo Project named "Project X" linked to https://github.com/MyOrganization/ProjectX GitHub repo. When I push a commit into ProjectX GitHub repository I will notify Odoo server by setting a webhook that calls webhook processing controller . We should add a structured push processing method (at the moment only merging is processed I think) that compare every "project.task" name related to ProjectX and check if "project.task" name is found in the commit message. In that case the commit ID should be stored in a git.commit (new) model related to the project task and will be used to build a clickable url which is probably stored in a computed field. There should probably also be a commit resync button. -- TODO, doesn't seem too hard, but will require some time to be done.
3 - when the functionality will be working on 17.0 I will migrate it on the 18.0 version (which is the version I need to work with this feature). The migration should not be hard in this case since most of the code will be methods to process github webhook requests and simply store some data in models, there shouldn't be huge changes in the code -- TODO
I plan to proceed with these steps over the next few weeks. If you have any recommendations, please feel free to share them. I believe the hardest part for me will be writing tests, as I'm not very familiar with it. Thankfully, I think I’ll find substantial help in https://github.com/OCA/interface-github/tree/16.0/github_connector
Il giorno gio 12 dic 2024 alle ore 10:18 Janik von Rotz <notifications@odoo-community.org> ha scritto:
Hi Francesco, I have developed a module to manage git repositories: https://github.com/Mint-System/Odoo-Apps-Connector/tree/16.0/git_base And here are the docs: https://www.odoo-wiki.org/git-base.html I will eventually develop a "project_git" module that connects projects with git repos and supports creating feature branches from tasks. All Mint System modules live up to the OCA standards. Cheers, Janik On 12/6/24 6:48 PM, Francesco Ballerini wrote: > Hi, > > we're looking for an Odoo 18 project task git integration. > > Specifically we need the feature that allows linking PR and commits to > the task by branch name/commit name containing the name of the task, > basically like Atlassian/Jira git integration. > > If you have any open source resource to provide as example we we might > try to migrate it to version 18.0. > > Thanks > > --Francesco Ballerini > > _______________________________________________ > Mailing-List: https://odoo-community.org/groups/contributors-15 > Post to: mailto:contributors@odoo-community.org > Unsubscribe: https://odoo-community.org/groups?unsubscribe > -- We are hiring: https://www.mint-system.ch/jobs Send application to: jobs@mint-system.ch CTO Mint System GmbH Tel: +41 44 244 7222_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
Reference
-
[18.0] Project Task Git integration
byFrancesco Ballerini-
Re: [18.0] Project Task Git integration
byNUMIGI Solutions Inc., Quentin Lavallée-Bourdeau -
Re: [18.0] Project Task Git integration
byMint System GmbH, Janik von Rotz -
Re: [18.0] Project Task Git integration
byJarsa Sistemas, S.A. de C.V., Jesús Alan Ramos Rodriguez -
Re: [18.0] Project Task Git integration
byJarsa Sistemas, S.A. de C.V., Jesús Alan Ramos Rodriguez -
Re: [18.0] Project Task Git integration
by "Ivan Sokolov via Cetmix OÜ" <team@cetmix.com> - 06/12/2024 21:57:17 - 0