Skip to main content

Jarsa fork of oca-port with GitHub and GitLab support

Project description

Release

oca-port-jarsa

oca-port-jarsa is a Jarsa-maintained fork of the original oca-port tool.

It is designed for enterprise Odoo migrations using both GitHub and GitLab repositories, with automatic platform detection, GitLab Merge Request support and native integration with pre-commit-vauxoo.


Key Features

  • Automatic SCM detection (GitHub / GitLab) using remote URL
  • Native GitLab Merge Request lookup (gitlab.com and self-hosted)
  • Native GitHub Pull Request lookup
  • Automatic hook selection:
    • pre-commit for GitHub projects
    • pre-commit-vauxoo for GitLab projects
  • Automatic hook installation for GitLab using pre-commit-vauxoo --install
  • Multiple GitLab instances supported (per-domain tokens)
  • pipx-ready installation
  • CI/CD friendly
  • JSON output compatible with original oca-port

Platform Auto Detection

The platform is automatically detected using the target remote URL:

Remote URL contains Platform
github GitHub
gitlab GitLab
(no github keyword) GitLab (default for self-hosted)

Manual override is also available:

oca-port-jarsa --platform gitlab ...
oca-port-jarsa --platform github ...

Installation

Using pipx (recommended)

pipx install oca-port-jarsa

Development installation

git clone https://github.com/Jarsa/oca-port-jarsa.git
cd oca-port-jarsa
pipx install .

Authentication Setup

GitHub Token

Used only when operating on GitHub repositories.

export GITHUB_TOKEN=ghp_xxxxxxxxx

GitLab Tokens (multi-instance support)

oca-port-jarsa supports multiple GitLab instances using domain-based environment variables.

Define tokens in your shell:

export GITLAB_TOKEN_GITLAB_COM="xxxx"
export GITLAB_TOKEN_GIT_JARSA_COM="xxxx"
export GITLAB_TOKEN_GIT_VAUXOO_COM="xxxx"

Naming rule:

GITLAB_TOKEN_<DOMAIN>

Where:

https://git.jarsa.com  -> GITLAB_TOKEN_GIT_JARSA_COM
https://git.vauxoo.com -> GITLAB_TOKEN_GIT_VAUXOO_COM
https://gitlab.com     -> GITLAB_TOKEN_GITLAB_COM

Usage

Basic syntax

oca-port-jarsa <source> <target> <module_path> [options]

Example — Migration preview (dry run)

oca-port-jarsa origin/16.0 origin/18.0 stock_move_auto_assign --dry-run --verbose

Execute migration

oca-port-jarsa origin/16.0 origin/18.0 stock_move_auto_assign

Custom destination branch

oca-port-jarsa origin/16.0 origin/18.0 stock_move_auto_assign \
--destination jarsa-dev/18.0-mig-stock_move_auto_assign

Using subfolder modules

oca-port-jarsa origin/main origin/18.0-mig \
--source-version=16.0 \
--target-version=18.0 \
./addons/custom/MY_MODULE \
--destination jarsa-dev/18.0-mig-MY_MODULE

Hook Execution Behavior

GitHub projects

Uses the standard pre-commit workflow:

pre-commit install
pre-commit run

GitLab projects

Uses Vauxoo workflow:

pre-commit-vauxoo --install
pre-commit-vauxoo

Existing PR / MR Detection

GitHub

Automatically searches existing Pull Requests using GitHub API.

GitLab

Automatically searches open Merge Requests:

  • Target branch match
  • Module name match
  • Supports gitlab.com and self-hosted instances

Migration Mode

Exit codes:

Code Meaning
100 Addon can be migrated
110 PRs / commits available for porting

JSON Output API Mode

import json
import oca_port

app = oca_port.App(
    source="origin/16.0",
    target="origin/18.0",
    addon_path="stock_move_auto_assign",
    repo_path="/home/odoo/repos/stock-logistics-warehouse",
    output="json",
    fetch=True,
    github_token="<GITHUB_TOKEN>",
)

result = app.run()
data = json.loads(result)

print(data)

Release Flow

git tag v1.0.0
git push origin v1.0.0

Origin

Based on the original OCA tool: https://github.com/OCA/oca-port

Maintained by Jarsa Sistemas.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oca_port_jarsa-1.0.1.tar.gz (50.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oca_port_jarsa-1.0.1-py3-none-any.whl (56.4 kB view details)

Uploaded Python 3

File details

Details for the file oca_port_jarsa-1.0.1.tar.gz.

File metadata

  • Download URL: oca_port_jarsa-1.0.1.tar.gz
  • Upload date:
  • Size: 50.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for oca_port_jarsa-1.0.1.tar.gz
Algorithm Hash digest
SHA256 8507e704805d48b8d0dcd48f673f24a52dea0081647237ccc91e04dc90c8661d
MD5 2933c14841e38092c22c9b4811621e3a
BLAKE2b-256 529b184ce6c10b83d1f74024da15f5fe81b223405a69f19baad6dd219a223476

See more details on using hashes here.

Provenance

The following attestation bundles were made for oca_port_jarsa-1.0.1.tar.gz:

Publisher: publish.yml on Jarsa/oca-port-jarsa

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file oca_port_jarsa-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: oca_port_jarsa-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 56.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for oca_port_jarsa-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3fa2d91943b286d702fb0f29988497f23540f1ac2e8a808c9438e7bd200c36c8
MD5 f0a5dc561069ca65181ea6cc068a155e
BLAKE2b-256 441fe44e34763899a2a12d139385cef4ead405996538836e91e4396997c14feb

See more details on using hashes here.

Provenance

The following attestation bundles were made for oca_port_jarsa-1.0.1-py3-none-any.whl:

Publisher: publish.yml on Jarsa/oca-port-jarsa

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page