Jarsa fork of oca-port with GitHub and GitLab support
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oca_port_jarsa-1.0.0.tar.gz.
File metadata
- Download URL: oca_port_jarsa-1.0.0.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b7be03d01c1ca054cd8e0e995e46ae0d0c5f3d2c50b84efe0558331e2f1c8b9
|
|
| MD5 |
22864d3d210c5c5ed314185c9b4138d5
|
|
| BLAKE2b-256 |
aa4aad66122d9f2f851614e4107fdc8ea384f8c59384901beef717991598335e
|
Provenance
The following attestation bundles were made for oca_port_jarsa-1.0.0.tar.gz:
Publisher:
publish.yml on Jarsa/oca-port-jarsa
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oca_port_jarsa-1.0.0.tar.gz -
Subject digest:
4b7be03d01c1ca054cd8e0e995e46ae0d0c5f3d2c50b84efe0558331e2f1c8b9 - Sigstore transparency entry: 905253654
- Sigstore integration time:
-
Permalink:
Jarsa/oca-port-jarsa@419b69a629fcb0ebfa23e4884d4058c2d09d7771 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Jarsa
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@419b69a629fcb0ebfa23e4884d4058c2d09d7771 -
Trigger Event:
push
-
Statement type:
File details
Details for the file oca_port_jarsa-1.0.0-py3-none-any.whl.
File metadata
- Download URL: oca_port_jarsa-1.0.0-py3-none-any.whl
- Upload date:
- Size: 56.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b16ee3ce455463f80ee5627d4834b8173eddd98ddda199f13c6116253f65e7bb
|
|
| MD5 |
30b7239eb834dd32a56f4950b42556f1
|
|
| BLAKE2b-256 |
e8a9cc734e12131a81b7fd515cc2c5b6645498ea7cc0c770c36815b8e616190c
|
Provenance
The following attestation bundles were made for oca_port_jarsa-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on Jarsa/oca-port-jarsa
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oca_port_jarsa-1.0.0-py3-none-any.whl -
Subject digest:
b16ee3ce455463f80ee5627d4834b8173eddd98ddda199f13c6116253f65e7bb - Sigstore transparency entry: 905253719
- Sigstore integration time:
-
Permalink:
Jarsa/oca-port-jarsa@419b69a629fcb0ebfa23e4884d4058c2d09d7771 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Jarsa
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@419b69a629fcb0ebfa23e4884d4058c2d09d7771 -
Trigger Event:
push
-
Statement type: