{"id":14064725,"url":"https://github.com/OCA/maintainer-tools","last_synced_at":"2025-07-29T18:34:00.473Z","repository":{"id":17990725,"uuid":"20999008","full_name":"OCA/maintainer-tools","owner":"OCA","description":"Odoo Maintainers Tools \u0026 conventions for OCA members which evaluate and maintain repositories.","archived":false,"fork":false,"pushed_at":"2024-10-21T09:09:34.000Z","size":1186,"stargazers_count":278,"open_issues_count":53,"forks_count":460,"subscribers_count":78,"default_branch":"master","last_synced_at":"2024-11-29T13:59:59.933Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OCA.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"OCA"}},"created_at":"2014-06-19T12:10:40.000Z","updated_at":"2024-11-21T10:12:05.000Z","dependencies_parsed_at":"2023-11-12T10:24:33.024Z","dependency_job_id":"3dcf8eb7-8414-4143-b8be-c0e60f323086","html_url":"https://github.com/OCA/maintainer-tools","commit_stats":{"total_commits":835,"total_committers":89,"mean_commits":9.382022471910112,"dds":0.6802395209580838,"last_synced_commit":"1070863d1298b1bf373a0e69458dd8a88ab91578"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCA%2Fmaintainer-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCA%2Fmaintainer-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCA%2Fmaintainer-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCA%2Fmaintainer-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OCA","download_url":"https://codeload.github.com/OCA/maintainer-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228040840,"owners_count":17860211,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-13T07:04:02.451Z","updated_at":"2025-07-29T18:34:00.460Z","avatar_url":"https://github.com/OCA.png","language":"Python","funding_links":["https://github.com/sponsors/OCA"],"categories":["Python"],"sub_categories":[],"readme":"[![CI](https://github.com/OCA/maintainer-tools/actions/workflows/ci.yml/badge.svg)](https://github.com/OCA/maintainer-tools/actions/workflows/ci.yml)\n[![Coverage Status](https://img.shields.io/coveralls/OCA/maintainer-tools.svg)](https://coveralls.io/r/OCA/maintainer-tools?branch=master)\n\n# OCA Maintainers Tools\n\n## Installation\n\n    $ git clone git@github.com:OCA/maintainer-tools.git\n    $ cd maintainer-tools\n    $ virtualenv env\n    $ . env/bin/activate\n    $ python setup.py install\n\nAlternatively if using pipx.\n\n    $ pipx install oca-maintainers-tools@git+https://github.com/OCA/maintainer-tools.git\n\n## OCA repositories tools\n\nThese tools are mostly for maintenance purpose only.\nThey are used by OCA maintainers to address common operations across all repos.\n\n**Prerequisite**\n\nGithub authentication uses a token, that must be previously created on Github, at\n[Settings \u003e Developer settings \u003e Personal access tokens](https://github.com/settings/tokens).\n\n\nSet and store the token to be used for Github auth using:\n\n    $ oca-github-login\n\nAlternatively, the token can be set on the GITHUB_TOKEN environment variable.\n\nAs a third alternative, if you have the [gh](https://cli.github.com/) client installed\nand have authenticated with `gh auth login`, maintainer tools will attempt to obtain the\ntoken from it using `gh auth token`.\n\n### Sync team users from community.odoo.com to GitHub teams\n\nGoal: members of the teams should never be added directly on GitHub.\nThey should be added on https://community.odoo.com. This script will\nsync all the teams from Odoo to GitHub.\n\nPrerequisites:\n\n* Your odoo user must have read access to the projects and users;\n* The partners on odoo must have their GitHub login set otherwise they won't\n  be added in the GitHub teams;\n* Your GitHub user must have owners rights on the OCA organization to be\n  able to add or remove members;\n* The odoo project must have the same name than the GitHub teams.\n\nRun the script in \"dry-run\" mode:\n\n    $ oca-copy-maintainers --dry-run\n\nApply the changes on GitHub:\n\n    $ oca-copy-maintainers\n\nThe first time it runs, it will ask your odoo's username and password.\nYou may store them using the `--store` option, but watch out: the password is stored in clear text.\n\n\n### Set labels on OCA repository on GitHub\n\nSet standardized labels to ease the issue workflow on all repositories with same colors.\nThis tools will also warn you what are the specific labels on some repository\n\n    $ oca-set-repo-labels\n\n\n### Clone all OCA repositories\n\nThe script `oca-clone-everything` can be used to clone all the OCA projects:\ncreate a fresh directory, use oca-github-login (or copy oca.cfg from a place\nwhere you've already logged in) and run oca-clone-everything.\n\nThe script will create a clone for all the OCA projects registered on\ngithub. For projects already cloned, it run `git fetch --all` to get the\nlatest versions.\n\nIf you pass the `--organization-remotes\n\u003ccomma-separated-list\u003e` option, the script will also add remotes for the listed\naccounts, and run `git fetch` to get the source code from these forks. For instance:\n\n    $ oca-clone-everything --organization-remotes yourlogin,otherlogin\n\nwill create two remotes, in addition to the default `origin`, called\n`yourlogin` and `otherlogin`, respectively referencing\n`git@github.com:yourlogin/projectname` and\n`git@github.com:otherlogin/projectname` and fetch these remotes, for all the\nOCA projects. It does not matter whether the forks exist on github or not, and\nyou can create them later.\n\nTIP to update branch in shell at once: `ls | xargs -I % git -C % pull origin branch_number`\n\n\n## Quality tools\n\nThese tools are meant to be used both by repo maintainers and contributors.\nYou can leverage them to give more quality to your modules and to respect OCA guidelines.\n\n\n### README generator\n\nTo provide high quality README for our modules we generate them automatically.\nThe sections of the final README are organized in fragments.\nThey must be put inside a `readme` folder respecting [this structure](./template/module/readme).\n\neg.\nTo generate the final README for the module `auth_keycloak`:\n\n    $ oca-gen-addon-readme --repo-name=server-auth --branch=10.0 --addon-dir=auth_keycloak\n\nThe result will be a fully PyPI compliant README.rst in the root of your module.\n\nYou may also use this script for your own repositories by specifying this\nadditional argument `--org-name=myorganisation`\n\n\n### Changelog generator using towncrier\n\nTo facilitate the generation of the changelog of addons, we have a\nsmall wrapper around [towncrier](https://pypi.org/project/towncrier/).\nFor example, this will update HISTORY.rst for `mis_builder` and `mis_builder_budget`\nwith the version found in their manifest:\n\n    $ oca-towncrier --repo=mis-builder --addon-dir=mis_builder --addon-dir=mis_builder_budget --commit\n\n\n### Icon generator\n\nTo provide an icon for our modules we generate them automatically.\n\nTo generate the icon for the module `auth_keycloak`:\n\n    $ oca-gen-addon-icon --addon-dir=auth_keycloak\n\nA custom icon can be added using the `--src-icon` argument:\n\n    $ oca-gen-addon-icon --addon-dir=auth_keycloak --src-icon=/path/to/custom/icon.png\n\n\n## Developers\n\nAs a developer, you want to launch the scripts without installing the\negg.\n\n    $ git clone git@github.com:OCA/maintainer-tools.git\n    $ cd maintainer-tools\n    $ virtualenv env\n    $ . env/bin/activate\n    $ pip install -e .\n\n**Run tests**\n\n    $ tox  # all tests for all python versions\n    $ tox -e py27  # python 2.7\n    $ tox -- -k readme -v  # run tests containing 'readme' in their name, verbose\n\n**Set the client token to use for Github* authentication*\n\n    $ python -m tools.github_login\n\n**Run a script**\n\n    $ python -m tools.copy_maintainers\n\nYou can use the `GITHUB_TOKEN` environment variable to specify the token\n\n    $ GITHUB_TOKEN=xxx python -m tools.copy_maintainers\n\n## Integration with `pre-commit`\n\nIn any addons repo, you can use these pre-commit hooks:\n\n```yaml\n# .pre-commit-config.yaml file\nrepos:\n  - repo: https://github.com/OCA/maintainer-tools\n    rev: master # This is just an example; you must use a tag/commit instead!\n    hooks:\n      # Use each script's `--help` to understand the args\n      - id: oca-gen-addon-readme\n        args:\n          - --addons-dir=.\n          - --org-name=OCA\n          - --repo-name=server-tools\n          - --branch=13.0\n\n      # This job could easily produce conflicts when it runs on every commit,\n      # so it's added as a manual job. If you automate it, beware.\n      # See https://pre-commit.com/#confining-hooks-to-run-at-certain-stages\n      - id: oca-gen-addons-table\n        stages: [manual]\n\n      - id: oca-gen-addon-icon\n        args:\n          - --addons-dir=.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOCA%2Fmaintainer-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOCA%2Fmaintainer-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOCA%2Fmaintainer-tools/lists"}