Skip to content

feat: support generic GitHub orgs and per-repo branch override#12

Merged
trisdoan merged 5 commits intomainfrom
config_dev
Mar 3, 2026
Merged

feat: support generic GitHub orgs and per-repo branch override#12
trisdoan merged 5 commits intomainfrom
config_dev

Conversation

@nilshamerlinck
Copy link
Contributor

@nilshamerlinck nilshamerlinck commented Mar 2, 2026

Summary

  • Support arbitrary GitHub org keys in [repos] (previously only oca was recognized alongside odoo)
  • Add per-repo branch override syntax: ["repo-name", ["branch", ...]] — repos that don't follow Odoo version branches can be configured inline, without a separate section
  • Fix pull-repos display overflow when pulling many repos
  • Add assets/oca_contributor.toml as a comprehensive example config for OCA contributors
  • Enrich system package lists (Ubuntu and Arch) to cover all OCA module dependencies out of the box

Changes

feat: support generic GitHub orgs and per-repo branch override in config

  • RepoConfig: add extra="allow" + model_validator so arbitrary org keys in [repos] are kept and validated
  • Repo entries accept two forms:
    • "repo-name" — cloned at all configured versions
    • ["repo-name", ["branch", ...]] — cloned only at the specified branches
  • Add _iter_org_entries helper to expand entries into (repo_name, branch) pairs
  • Add InvalidRepoEntryError for malformed inline entries

fix: hide completed progress tasks to avoid terminal overflow

  • Tasks are added hidden and revealed only when they start (at most max_workers bars visible at a time)
  • On completion, the task bar is hidden and its final description is printed as a static line
  • A single X/N done summary row tracks overall progress

chore: add oca_contributor.toml example config

Exhaustive config for OCA contributors. Repos that don't follow Odoo version branches use the inline override syntax:

[repos]
oca = [
  "server-tools",                         # cloned at 18.0 and 19.0
  ["oca-port", ["main"]],                 # cloned at main only
  ["oca-custom", ["18.0"]],               # cloned at 18.0 only
  ["tier-validation", ["19.0"]],          # cloned at 19.0 only
  ["oca-ci", ["master"]],
  ["odoo-module-migrator", ["master"]],
]
camptocamp = ["odoo-cloud-platform"]      # cloned at 18.0 and 19.0

chore: enrich system package lists with missing dependencies

The system package lists (Ubuntu and Arch) now go beyond what Odoo itself requires. The goal is to pre-install all system-level dependencies needed to compile and run any OCA module out of the box — so that pip install never fails due to a missing C library, regardless of which OCA modules are being used.

Notable additions: libcups2-dev (pycups), libgeos-dev (shapely), libxmlsec1-dev + libxmlsec1-openssl (pysaml2), libzbar-dev (pyzbar), libcairo2 (cairosvg), poppler-utils (pdf2image), graphviz, ghostscript, gsfonts.

🤖 Generated with Claude Code

Remove the oca-specific block and treat it like any other GitHub org,
using the config key verbatim in the URL and clone path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nilshamerlinck nilshamerlinck force-pushed the config_dev branch 6 times, most recently from 9760409 to 6e5fecf Compare March 2, 2026 12:19
nilshamerlinck and others added 2 commits March 2, 2026 20:03
- RepoConfig: add extra="allow" so arbitrary org keys in [repos] are
  preserved; validate via model_validator
- Repo entries can be a plain string (uses all configured versions) or
  ["name", ["branch", ...]] (uses only those branches)
- Add _iter_org_entries helper to expand entries into (repo_name, branch)
  pairs; simplify _get_tasks accordingly
- Add InvalidRepoEntryError for malformed inline entries
- Update tests for new _get_tasks signature; add test for inline branch
  override syntax

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
With many repos, all progress bars were added upfront and the terminal
would overflow showing hundreds of 100% rows. Now tasks are hidden until
they start running (max_workers visible at a time), then printed as a
static line on completion. A single summary row shows X/N done.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Exhaustive config to contribute to OCA covering all OCA repositories.
Repos without Odoo version branches use inline branch override syntax:
["oca-port", ["main"]], ["oca-ci", ["master"]], etc.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nilshamerlinck nilshamerlinck changed the title feat: support generic GitHub orgs and add oca_contributor config feat: support generic GitHub orgs and per-repo branch override Mar 2, 2026
Add missing Ubuntu and Arch packages needed for common Odoo dependencies
(pycups, shapely, pysaml2, pyzbar, pdf2image, cairosvg) and general tools
(graphviz, ghostscript, fontconfig, poppler, cups).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nilshamerlinck nilshamerlinck marked this pull request as ready for review March 3, 2026 04:45
@nilshamerlinck nilshamerlinck requested a review from trisdoan March 3, 2026 04:45
Copy link
Collaborator

@trisdoan trisdoan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks anh, it works perfectly 👍
Tested on macOs, no need to update MacOs packages when install these extra libraries --extra-requirement="pycups,shapely,pysaml2,pyzbar,cairosvg, pdf2image"

@trisdoan trisdoan merged commit e8b47fe into main Mar 3, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants