Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# generated from manifests external_dependencies
github3.py
markdown
2 changes: 2 additions & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
odoo-addon-vcp_management @ git+https://github.com/OCA/version-control-platform.git@refs/pull/11/head#subdirectory=vcp_management
odoo-addon-vcp_git @ git+https://github.com/OCA/version-control-platform.git@refs/pull/12/head#subdirectory=vcp_git
83 changes: 83 additions & 0 deletions vcp_github/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

==========
Vcp Github
==========

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:c11ed718a96213c61adaf41d94d05c5ae2965b6a676231d6d4fac3a6ebf3264b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fversion--control--platform-lightgray.png?logo=github
:target: https://github.com/OCA/version-control-platform/tree/19.0/vcp_github
:alt: OCA/version-control-platform
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/version-control-platform-19-0/version-control-platform-19-0-vcp_github
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/version-control-platform&target_branch=19.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module facilitates the integration between Github and Version
Control Platform.

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/version-control-platform/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/version-control-platform/issues/new?body=module:%20vcp_github%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Dixmit

Contributors
------------

- `Dixmit <https://www.dixmit.com>`__

- Enric Tobella

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/version-control-platform <https://github.com/OCA/version-control-platform/tree/19.0/vcp_github>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions vcp_github/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
23 changes: 23 additions & 0 deletions vcp_github/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2026 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Vcp Github",
"summary": """Integrate Version Control Platform with Github""",
"version": "19.0.1.0.0",
"license": "AGPL-3",
"author": "Dixmit,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/version-control-platform",
"depends": [
"vcp_git",
],
"external_dependencies": {
"python": ["github3.py", "markdown"],
},
"data": [
"data/data.xml",
],
"demo": [
"demo/demo_vcp_platform.xml",
],
}
12 changes: 12 additions & 0 deletions vcp_github/data/data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo noupdate="1">
<record id="vcp_github_host_type" model="vcp.host.type">
<field name="name">GitHub</field>
<field name="code">github</field>
<field name="code_kind">git</field>
</record>
<record id="vcp_github_host" model="vcp.host">
<field name="name">GitHub</field>
<field name="type_id" ref="vcp_github_host_type" />
</record>
</odoo>
9 changes: 9 additions & 0 deletions vcp_github/demo/demo_vcp_platform.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="vcp_platform_oca_github" model="vcp.platform">
<field name="name">OCA</field>
<field name="host_id" ref="vcp_github_host" />
<field name="fetch_repository_branch_pattern">^\d+\.\d+$</field>
<field name="scheduled_information_update" eval="False" />
</record>
</odoo>
62 changes: 62 additions & 0 deletions vcp_github/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * vcp_github
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2026-04-08 12:45+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.15.2\n"

#. module: vcp_github
#. odoo-python
#: code:addons/vcp_github/models/vcp_platform.py:0
msgid ""
"No github clients configured. Please enter at least a Github Personal Access"
" Token. You can check more information at "
"https://docs.github.com/en/authentication/keeping-your-account-and-data-"
"secure/managing-your-personal-access-tokens"
msgstr ""
"Nessun client GitHub configurato. Inserire almeno un token di accesso "
"personale di GitHub. Si possono trovare maggiori informazioni su https://"
"docs.github.com/en/authentication/keeping-your-account-and-data-secure/"
"managing-your-personal-access-tokens"

#. module: vcp_github
#. odoo-python
#: code:addons/vcp_github/models/vcp_host.py:0
msgid "Only one GitHub Host type is allowed."
msgstr "È consentito solo un tipo host GitHub."

#. module: vcp_github
#: model:ir.model,name:vcp_github.model_vcp_organization
msgid "Organization"
msgstr "Organizzazione"

#. module: vcp_github
#: model:ir.model,name:vcp_github.model_vcp_repository
msgid "Repository"
msgstr "Repository"

#. module: vcp_github
#: model:ir.model,name:vcp_github.model_vcp_user
msgid "User"
msgstr "Utente"

#. module: vcp_github
#: model:ir.model,name:vcp_github.model_vcp_host
msgid "VCP Host"
msgstr "Host VCP"

#. module: vcp_github
#: model:ir.model,name:vcp_github.model_vcp_platform
msgid "VCP Platform"
msgstr "Piattaforma VCP"
55 changes: 55 additions & 0 deletions vcp_github/i18n/vcp_github.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * vcp_github
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: vcp_github
#. odoo-python
#: code:addons/vcp_github/models/vcp_platform.py:0
msgid ""
"No github clients configured. Please enter at least a Github Personal Access"
" Token. You can check more information at "
"https://docs.github.com/en/authentication/keeping-your-account-and-data-"
"secure/managing-your-personal-access-tokens"
msgstr ""

#. module: vcp_github
#. odoo-python
#: code:addons/vcp_github/models/vcp_host.py:0
msgid "Only one GitHub Host type is allowed."
msgstr ""

#. module: vcp_github
#: model:ir.model,name:vcp_github.model_vcp_organization
msgid "Organization"
msgstr ""

#. module: vcp_github
#: model:ir.model,name:vcp_github.model_vcp_repository
msgid "Repository"
msgstr ""

#. module: vcp_github
#: model:ir.model,name:vcp_github.model_vcp_user
msgid "User"
msgstr ""

#. module: vcp_github
#: model:ir.model,name:vcp_github.model_vcp_host
msgid "VCP Host"
msgstr ""

#. module: vcp_github
#: model:ir.model,name:vcp_github.model_vcp_platform
msgid "VCP Platform"
msgstr ""
5 changes: 5 additions & 0 deletions vcp_github/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from . import vcp_host
from . import vcp_platform
from . import vcp_repository
from . import vcp_user
from . import vcp_organization
21 changes: 21 additions & 0 deletions vcp_github/models/vcp_host.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2026 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import api, models
from odoo.exceptions import ValidationError


class VcpHost(models.Model):
_inherit = "vcp.host"

@api.constrains("type_id")
def _check_kind_github(self):
for record in self.filtered(lambda r: r.type_id.code == "github"):
platforms = self.search(
[("id", "!=", record.id), ("type_id.code", "=", "github")],
limit=1,
)
if platforms:
raise ValidationError(
self.env._("Only one GitHub Host type is allowed.")
)
15 changes: 15 additions & 0 deletions vcp_github/models/vcp_organization.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2026 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).


from odoo import models


class VcpOrganization(models.Model):
_inherit = "vcp.organization"

def _get_contributor_url(self):
result = super()._get_contributor_url()
if not result and self.host_id.type_id.code == "github":
return f"https://github.com/{self.external_id}"
return result
Loading
Loading