Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: generate addons readme in pre-commit #190

Merged
merged 4 commits into from
Sep 6, 2023
Merged

Commits on Sep 5, 2023

  1. feat: generate addons readme in pre-commit

    Devs sometimes just update the `readme/*.rst` portions, relying in our nice bot that will convert that to a real `README.rst` + `index.html` after merge.
    
    When functional people go test PRs in runboat, the 1st thing they look at is the README. That's OK because there's where the docs should explain what the module is doing.
    
    These 2 situations are good in their own terms, but when you merge both, you get to a problem. You have to either:
    
    - Teach functional people to review the PR code, go to the `readme/` folder and understand the `.rst` syntax and the advanced github diff tooling.
    - Teach devs to remember always using the `oca-gen-addon-readme` before pushing the PR, so functionals can review the README in a more human-friendly fashion.
    
    None of these is a good solution. Both add manual and complex steps to the contribution workflow.
    
    Quoting from [OCA blog][1]:
    
    > The Board are working on these Major Projects for 2023:
    > Improve Contributor onboarding journey, leverage delegates
    > - Including Functional Consultants
    
    This PR goes along with those goals. By moving the readme generation into a pre-commit hook:
    
    1. The dev just needs to stage -> commit -> re-stage -> re-commit. Just like always.
    2. The functionals have a nicely rendered README available right from the Odoo UI. That's the UI a functional needs to know deeply (not Github's).
    
    @moduon
    
    [1]: https://odoo-community.org/blog/news-updates-1/oca-newsletter-1-2023-136
    yajo committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    35fb058 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2023

  1. feat: add --if-source-changed to addon readme generator

    Now that OCA/maintainer-tools#520 is fixed, it is safer to generate readmes in the hook.
    yajo committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    ab866cb View commit details
    Browse the repository at this point in the history
  2. ci: skip oca-gen-addon-readme

    This hook is meant to run only on dev machines. On CI we can skip it because the bot will regenerate the README if needed anyway.
    yajo committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    619b04f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    95c6096 View commit details
    Browse the repository at this point in the history