Skip to content

Commit

Permalink
[MIG] github_connector: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinafernandez-tecnativa committed Jan 8, 2024
1 parent 09b2390 commit 7cfb35e
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 50 deletions.
48 changes: 24 additions & 24 deletions github_connector/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Github Connector
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:172dac30ce966c778439018b298d96f8ec3a8ae3d5d15a5f5f761eb5ff410b7c
!! source digest: sha256:56dea043784c12d741418332f6f1cde1d15b97657b8bd436e293a7fc57329389
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand All @@ -17,13 +17,13 @@ Github Connector
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Finterface--github-lightgray.png?logo=github
:target: https://github.com/OCA/interface-github/tree/15.0/github_connector
:target: https://github.com/OCA/interface-github/tree/16.0/github_connector
:alt: OCA/interface-github
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/interface-github-15-0/interface-github-15-0-github_connector
:target: https://translation.odoo-community.org/projects/interface-github-16-0/interface-github-16-0-github_connector
: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/interface-github&target_branch=15.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/interface-github&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand Down Expand Up @@ -87,7 +87,7 @@ https://docs.github.com/en/rest/overview/other-authentication-methods#via-userna
download (potentially with a lot of repositories) in order to reduce the
size of the transaction

.. image:: https://raw.githubusercontent.com/OCA/interface-github/15.0/github_connector/static/description/github_settings.png
.. image:: https://raw.githubusercontent.com/OCA/interface-github/16.0/github_connector/static/description/github_settings.png

#. Go to your(s) user(s) form to add them in the new 'Connector Github Manager'
groups. The members of this group will have the possibility to run Github
Expand All @@ -114,18 +114,18 @@ To fetch information from Github, you have to:
#. go to 'Github' / 'Settings' / 'Sync Object'
#. Select the object type you want to synchronize and its Gthub name

.. image:: https://raw.githubusercontent.com/OCA/interface-github/15.0/github_connector/static/description/sync_organization.png
.. image:: https://raw.githubusercontent.com/OCA/interface-github/16.0/github_connector/static/description/sync_organization.png

#. Once done for your organization(s), go to 'Github' / 'Github Commnunity' /
'Organizations'

.. image:: https://raw.githubusercontent.com/OCA/interface-github/15.0/github_connector/static/description/github_organization_kanban.png
.. image:: https://raw.githubusercontent.com/OCA/interface-github/16.0/github_connector/static/description/github_organization_kanban.png

#. Optionally, once organization is created, you can create series for your
projects. Go to 'Github' / 'Organizations' / click on your organization /
'Organization Series' Tabs

.. image:: https://raw.githubusercontent.com/OCA/interface-github/15.0/github_connector/static/description/github_organization_series.png
.. image:: https://raw.githubusercontent.com/OCA/interface-github/16.0/github_connector/static/description/github_organization_series.png

Select branches to download
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -140,12 +140,12 @@ main branches (releases):
#. In the 'Settings' tab, set the URL of the 'External Services' you use
for Continuous Integration and Coverage.

.. image:: https://raw.githubusercontent.com/OCA/interface-github/15.0/github_connector/static/description/github_organization_external_services.png
.. image:: https://raw.githubusercontent.com/OCA/interface-github/16.0/github_connector/static/description/github_organization_external_services.png

#. Once done, click on buttons 'Syncs', to synchronize repositories, teams and
members. (This process can take a while depending of your size)

.. image:: https://raw.githubusercontent.com/OCA/interface-github/15.0/github_connector/static/description/github_organization_sync_buttons.png
.. image:: https://raw.githubusercontent.com/OCA/interface-github/16.0/github_connector/static/description/github_organization_sync_buttons.png

Team / members synchronization
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -154,16 +154,16 @@ You can synchronize members teams:

#. Go to 'Teams' / tree view / 'Actions' / 'Update from Github'.

.. image:: https://raw.githubusercontent.com/OCA/interface-github/15.0/github_connector/static/description/github_team_kanban.png
.. image:: https://raw.githubusercontent.com/OCA/interface-github/16.0/github_connector/static/description/github_team_kanban.png

#. In each team, you can see the members list and the role of the members

.. image:: https://raw.githubusercontent.com/OCA/interface-github/15.0/github_connector/static/description/github_team_partner_kanban.png
.. image:: https://raw.githubusercontent.com/OCA/interface-github/16.0/github_connector/static/description/github_team_partner_kanban.png

#. In each team, you can see the repositories list but not the permissions of the
team. (See 'Known Issues' Section)

.. image:: https://raw.githubusercontent.com/OCA/interface-github/15.0/github_connector/static/description/github_team_repository_kanban.png
.. image:: https://raw.githubusercontent.com/OCA/interface-github/16.0/github_connector/static/description/github_team_repository_kanban.png

Repositories synchronization
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -173,12 +173,12 @@ You can synchronize the branches of your repositories:
#. Go to 'Repositories' /
tree view / 'Actions' / 'Update from Github'

.. image:: https://raw.githubusercontent.com/OCA/interface-github/15.0/github_connector/static/description/github_repository_kanban.png
.. image:: https://raw.githubusercontent.com/OCA/interface-github/16.0/github_connector/static/description/github_repository_kanban.png

#. In each repository, you can see the main branches list and the size of code
source.

.. image:: https://raw.githubusercontent.com/OCA/interface-github/15.0/github_connector/static/description/github_repository_branch_kanban.png
.. image:: https://raw.githubusercontent.com/OCA/interface-github/16.0/github_connector/static/description/github_repository_branch_kanban.png

Fetching the source code
~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -187,11 +187,11 @@ Finally, you can download locally the source code of all your branches:

#. Go to 'Repository Branches' / tree view / 'Actions' / 'Download and Analyse Source Code'.

.. image:: https://raw.githubusercontent.com/OCA/interface-github/15.0/github_connector/static/description/wizard_download_analyze.png
.. image:: https://raw.githubusercontent.com/OCA/interface-github/16.0/github_connector/static/description/wizard_download_analyze.png

#. In the tree view you can update manually source code or refresh analysis.

.. image:: https://raw.githubusercontent.com/OCA/interface-github/15.0/github_connector/static/description/github_repository_branch_list.png
.. image:: https://raw.githubusercontent.com/OCA/interface-github/16.0/github_connector/static/description/github_repository_branch_list.png

Analysis source code
~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -232,14 +232,14 @@ You have the possibility to creates two items in Github directly from Odoo
#. Later on, a synchronization will be performed, to create the according
team in the Odoo instance.

.. image:: https://raw.githubusercontent.com/OCA/interface-github/15.0/github_connector/static/description/wizard_create_team.png
.. image:: https://raw.githubusercontent.com/OCA/interface-github/16.0/github_connector/static/description/wizard_create_team.png

#. Repositories:

#. Go to 'Settings' / 'Create Team in Github'.
#. Set the information and click on Create in Github.

.. image:: https://raw.githubusercontent.com/OCA/interface-github/15.0/github_connector/static/description/wizard_create_repository.png
.. image:: https://raw.githubusercontent.com/OCA/interface-github/16.0/github_connector/static/description/wizard_create_repository.png

Note
~~~~
Expand All @@ -261,15 +261,15 @@ This module provides several reports

**Branches by Serie**

.. image:: https://raw.githubusercontent.com/OCA/interface-github/15.0/github_connector/static/description/reporting_branches_by_serie.png
.. image:: https://raw.githubusercontent.com/OCA/interface-github/16.0/github_connector/static/description/reporting_branches_by_serie.png

**Sizes by Serie**

.. image:: https://raw.githubusercontent.com/OCA/interface-github/15.0/github_connector/static/description/reporting_sizes_by_serie.png
.. image:: https://raw.githubusercontent.com/OCA/interface-github/16.0/github_connector/static/description/reporting_sizes_by_serie.png

**Repository branch analysis rule**

.. image:: https://raw.githubusercontent.com/OCA/interface-github/15.0/github_connector/static/description/github_repository_branch_rule_info_report.png
.. image:: https://raw.githubusercontent.com/OCA/interface-github/16.0/github_connector/static/description/github_repository_branch_rule_info_report.png

Known issues / Roadmap
======================
Expand Down Expand Up @@ -305,7 +305,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/interface-github/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/interface-github/issues/new?body=module:%20github_connector%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/interface-github/issues/new?body=module:%20github_connector%0Aversion:%2016.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.

Expand Down Expand Up @@ -349,6 +349,6 @@ 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/interface-github <https://github.com/OCA/interface-github/tree/15.0/github_connector>`_ project on GitHub.
This module is part of the `OCA/interface-github <https://github.com/OCA/interface-github/tree/16.0/github_connector>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 2 additions & 1 deletion github_connector/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# @author: Sébastien BEAU <[email protected]>
# Copyright 2019 Tecnativa - Cristina Martin R.
# Copyright 2024 Tecnativa - Carolina Fernandez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Github Connector",
"summary": "Synchronize information from Github repositories",
"version": "15.0.2.0.1",
"version": "16.0.1.0.0",
"category": "Connector",
"license": "AGPL-3",
"author": "Odoo Community Association (OCA), GRAP, Akretion, Tecnativa",
Expand Down
7 changes: 4 additions & 3 deletions github_connector/models/github_repository_branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ class GithubRepository(models.Model):
)

# Init Section
def __init__(self, pool, cr):
source_path = self._get_source_path()
def __new__(cls, *args, **kwargs):
source_path = cls._get_source_path(cls)
if source_path and not os.path.exists(source_path):
try:
os.makedirs(source_path)
Expand All @@ -127,7 +127,8 @@ def __init__(self, pool, cr):
)
if source_path and source_path not in addons.__path__:
addons.__path__.append(source_path)
super().__init__(pool, cr)

return super(GithubRepository, cls).__new__(cls)

def _get_source_path(self):
return tools.config.get("source_code_local_path", "") or os.environ.get(
Expand Down
Loading

0 comments on commit 7cfb35e

Please sign in to comment.