Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Connector
  3. Github Connector v 12.0
  4. Sales Conditions FAQ

Github Connector

by Odoo Community Association (OCA) , GRAP , Akretion , Tecnativa
Odoo
v 10.0 v 12.0 Third Party 477
Download for v 12.0 Deploy on Odoo.sh
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 2512
Technical Name github_connector
LicenseAGPL-3
Versions 10.0 12.0
You bought this module and need support? Click here!

Github Connector

Beta License: AGPL-3 OCA/interface-github Translate me on Weblate Try me on Runboat

This module allows you to:

  • Fetch into Odoo social information from Github (Organizations, Teams, Users)
  • Fetch into Odoo Code structure information from Github (Repositories, Branches)
  • Download source code from Github

Table of contents

  • Configuration
    • Technical Information
  • Usage
    • Initial upload from Github
    • Select branches to download
    • Team / members synchronization
    • Repositories synchronization
    • Fetching the source code
    • Download a private repository
    • Data creation in Github
    • Note
    • Reporting
  • Known issues / Roadmap
  • Bug Tracker
  • Credits
    • Authors
    • Contributors
    • Maintainers

Configuration

Once installed, you have to:

  1. Open your odoo.conf file and add extra settings to mention Github credentials, and the local path where the source code will be downloaded:

    • source_code_local_path = /workspace/source_code/

Note: you can define the route as environment variable using the key SOURCE_CODE_LOCAL_PATH

Note: make sure that Odoo process has read / write access on that folder

  • github_token = your_github_access_token

or

  • github_login = your_github_login
  • github_password = your_github_password

Note: if token and login/password are provided, the token will be used. The login/password auth will be deprecated by GitHub in the future.

  1. Go to ‘Settings’ / ‘Technical’ / ‘Parameters’ / ‘System Parameters’ and define the following values:

    1. github.max_try: number of call to the API before an error is raised. The more unstable/slow your connection, the higher should be this value
    2. git.partial_commit_during_analysis: Set to True if you want to commit the result of the analysis in the database after each repository analysis. We recommend to set to True when you perform the initial download (potentially with a lot of repositories) in order to reduce the size of the transaction
    https://raw.githubusercontent.com/github_connector/static/description/github_settings.png
  2. 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 synchronization.

Technical Information

This module provides 4 crons that you can enable:

  • Synchronize All Organizations and Teams (cron_update_organization)
  • Synchronize Branches List for All repositories (cron_update_branch_list)
  • Download Source Code for All Github Branches (cron_download_code)
  • Analyze Source Code for All Github Branches (cron_analyze_code)

Usage

Initial upload from Github

To fetch information from Github, you have to:

  1. go to ‘Github’ / ‘Settings’ / ‘Sync Object’

  2. Select the object type you want to synchronize and its Gthub name

    https://raw.githubusercontent.com/OCA/interface-github/12.0/github_connector/static/description/sync_organization.png
  3. Once done for your organization(s), go to ‘Github’ / ‘Github Commnunity’ / ‘Organizations’

    https://raw.githubusercontent.com/OCA/interface-github/12.0/github_connector/static/description/github_organization_kanban.png
  4. Optionally, once organization is created, you can create series for your projects. Go to ‘Github’ / ‘Organizations’ / click on your organization / ‘Organization Series’ Tabs

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

Select branches to download

This setting will prevent to download undesired branches, downloading only main branches (releases):

  1. In the ‘Settings’ tab, set repositories you don’t want to download (or repositories you want to download). If ‘Specific repositories’ is set, ‘Ignored Repositories’ value is ignored.

  2. In the ‘Settings’ tab, set the URL of the ‘External Services’ you use for Continuous Integration and Coverage.

    https://raw.githubusercontent.com/OCA/interface-github/12.0/github_connector/static/description/github_organization_external_services.png
  3. Once done, click on buttons ‘Syncs’, to synchronize repositories, teams and members. (This process can take a while depending of your size)

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

Team / members synchronization

You can synchronize members teams:

  1. Go to ‘Teams’ / tree view / ‘Actions’ / ‘Update from Github’.

    https://raw.githubusercontent.com/OCA/interface-github/12.0/github_connector/static/description/github_team_kanban.png
  2. In each team, you can see the members list and the role of the members

    https://raw.githubusercontent.com/OCA/interface-github/12.0/github_connector/static/description/github_team_partner_kanban.png
  3. In each team, you can see the repositories list but not the permissions of the team. (See ‘Known Issues’ Section)

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

Repositories synchronization

You can synchronize the branches of your repositories:

  1. Go to ‘Repositories’ / tree view / ‘Actions’ / ‘Update from Github’

    https://raw.githubusercontent.com/OCA/interface-github/12.0/github_connector/static/description/github_repository_kanban.png
  2. In each repository, you can see the main branches list and the size of code source.

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

Fetching the source code

Finally, you can download locally the source code of all your branches:

  1. Go to ‘Repository Branches’ / tree view / ‘Actions’ / ‘Download and Analyse Source Code’.

    https://raw.githubusercontent.com/OCA/interface-github/12.0/github_connector/static/description/wizard_download_analyze.png
  2. In the tree view you can update manually source code or refresh analysis.

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

Download a private repository

If you want to fetch the source code from a private repository, you need a token (instead of login/password) with the right scopes:

  1. Go to ‘Github Account’ / ‘Settings’ / ‘Developer settings’ / ‘Personal access tokens’ / ‘Generate new token’.

    https://raw.githubusercontent.com/OCA/interface-github/12.0/github_connector/static/description/generate_new_token.png
  2. In the ‘New personal access token’ you have to select ‘repo scope’.

    https://raw.githubusercontent.com/OCA/interface-github/12.0/github_connector/static/description/personal_access_token.png

Add one of these scopes to your token:

  • (no scope) : Grants read-only access to public information (includes public user profile info, public repository info, and gists).
    • repo : Grants full access to private and public repositories. See here why is this needed.

Secure storage:

  • For security, the git code (source_code_local_path) and the config file (odoo.conf) should be found in a secure storage where only the Odoo process has read and write capabilities.

Otherwise, the code and token (or login/password if you use those – don’t do it!) may be exposed.

Data creation in Github

You have the possibility to creates two items in Github directly from Odoo

  1. Teams:

    1. Go to ‘Settings’ / ‘Create Team in Github’.
    2. Set the information and click on Create in Github.
    3. Odoo will try to create the team. If access right and datas are correct, the creation will be done directly in Github
    4. Later on, a synchronization will be performed, to create the according team in the Odoo instance.
    https://raw.githubusercontent.com/OCA/interface-github/12.0/github_connector/static/description/wizard_create_team.png
  2. Repositories:

    1. Go to ‘Settings’ / ‘Create Team in Github’.
    2. Set the information and click on Create in Github.
    https://raw.githubusercontent.com/OCA/interface-github/12.0/github_connector/static/description/wizard_create_repository.png

Note

Analysis in this module is basic: for the time being, it just gives branches size.

Nevertheless, you can develop an extra Odoo Custom module to extend analysis function and get extra statistics, depending on your needs.

In that way, you can see the module github_connector_odoo, if your repositories contain Odoo modules.

Try me on Runbot

Reporting

This module provides several reports

Branches by Serie

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

Sizes by Serie

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

Known issues / Roadmap

  • For the time being, Github API doesn’t provide some informations that are available by the classic UI, that includes:

    1. team hierarchy: the field is present in the model github_team.parent_id, but unused.
  • Possible improvements:

    1. Create a new module github_connector_website, that could display teams / repositories / branches informations for non logged users.
    2. Analyze commits (author, quantity by series, etc…): this feature has been partially implemented in a V8.0 PR.
    3. Synchronize Pull Request, Issues, Comments: this feature has been partially implemented in a V8.0 PR.
  • Refactor the github connector:

    A python library called PyGitHub is available. It could be interesting to use it, instead of using custom code. However, this lib doesn’t provide good access to child object, generating for the time being, unnecessary API calls. For example, updating a repository should call before a call to the parent organization (The current module is so faster).

``sudo pip install PyGitHub``

Bug Tracker

Bugs are tracked on 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.

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

Credits

Authors

  • GRAP
  • Akretion
  • Tecnativa

Contributors

  • Sylvain LE GAL (https://twitter.com/legalsylvain)

  • Sébastien BEAU (sebastien.beau@akretion.com)

  • Benoît GUILLOT (benoit.guillot@akretion.com)

  • Enrique Martín (enriquemartin@digital5.es)

  • Tecnativa:

    • Pedro M. Baeza
    • Vicent Cubells
    • Carlos Roca
    • Víctor Martínez

Maintainers

This module is maintained by the OCA.

Odoo Community Association

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 project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
  • Ratings
  • Discuss
There are no ratings yet!
by
Diether Manalo
on 2/9/23, 10:45 PM

Unable to install module "github_connector" because an external dependency is not met: No module named git


Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with