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(plugin): add plugin, commit message questions, changelog template #1

Merged
merged 15 commits into from
Sep 10, 2024

Conversation

tomassebestik
Copy link
Member

@tomassebestik tomassebestik commented Sep 8, 2024

Description

This is commitizen plugin with Espressif standards already set

  • no need long and messy config in pyproject.toml for commitizen
  • unify way of nice looking changelog that fits for most Espressif projects
  • some customizations with cz_customize never worked anyway (order in changelog, types to changelog) - this is now possible
  • only package czespressif put in development dependecies, it will download commitziten automatically
  • very minimum setup in pyproject.toml is necessary, but quite a lot of options to customize

Features

  • reads options from target project "pyproject.toml"
  • changelog mapping dynamically from types
  • switch for disable emoji from target project "pyproject.toml"
  • configured bump_pattern and bump_map for changelog
  • add commit parser passing conventional-commit-linter rules and changelog hooks
  • switch for disable section "Unreleased" from target project "pyproject.toml"
  • "change_type_order" possible set from from target project "pyproject.toml"
  • add "cz info" (short info) and "cz example" (full example) to the CLI commands
  • ci: versions from scm_tools
  • ci: updated to support Python 3.9

Try it

In any repo with conventional commits pip install czespressif and add to pyproject.toml:

[tool.commitizen]
  name            = "czespressif"

Then try cz changelog to compare how current changelog was updated (it will not commit, just changes local file; be sure you have CHANGELOG.md staged).

Other commands updated by this plugin: cz commit, cz bump --dry-run, cz example, cz info

Related

Testing


Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

@tomassebestik tomassebestik self-assigned this Sep 8, 2024
Copy link

github-actions bot commented Sep 8, 2024

Warnings
⚠️ Please consider squashing your 15 commits (simplifying branch history).
Messages
📖 This PR seems to be quite large (total lines of code: 1208), you might consider splitting it into smaller PRs

👋 Hello tomassebestik, we appreciate your contribution to this project!


📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more.

Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- Resolve all warnings (⚠️ ) before requesting a review from human reviewers - they will appreciate it.
- Addressing info messages (📖) is strongly recommended; they're less critical but valuable.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against 7e5377f

…late

- reads options from target project "pyproject.toml"
- changelog mapping dynamically from types
- switch for disable emoji from target project "pyproject.toml"
- configured bump_pattern and bump_map for changelog
- add commit parser passing conventional-commit-linter rules and changelog hooks
- switch for disable section "Unreleased" from target project "pyproject.toml"
- "change_type_order" possible set from from target project "pyproject.toml"
- add "cz info" (short info) and "cz example" (full example) to the CLI commands
- add customizable changelog title, header and footer

- ci: versions from scm_tools
- ci: updated to support Python 3.9
Copy link
Member

@hfudev hfudev left a comment

Choose a reason for hiding this comment

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

Cool. LGTM

BREAKING CHANGE: This will trigger a major version bump
@tomassebestik tomassebestik merged commit b9009dc into master Sep 10, 2024
2 checks passed
@tomassebestik tomassebestik deleted the feat/add-plugin branch September 10, 2024 08:41
tomassebestik added a commit that referenced this pull request Sep 10, 2024
#1)

* feat(plugin): add plugin, commit message questions and changelog template

- reads options from target project "pyproject.toml"
- changelog mapping dynamically from types
- switch for disable emoji from target project "pyproject.toml"
- configured bump_pattern and bump_map for changelog
- add commit parser passing conventional-commit-linter rules and changelog hooks
- switch for disable section "Unreleased" from target project "pyproject.toml"
- "change_type_order" possible set from from target project "pyproject.toml"
- add "cz info" (short info) and "cz example" (full example) to the CLI commands
- add customizable changelog title, header and footer

- ci: versions from scm_tools
- ci: updated to support Python 3.9

* docs(readme): add basic usage and configuration

* ci(github-actions): replace publish-pypi workflow with PYPA version

* fix(changelog): update changelog builder to be compatible with mdformat linter

* fix(changelog): do not add changelog headers when "cz bump"

* ci: update .gitignore file, remove TODO.md

* fix(template): fixed Changelog template - displaying w/wo authors, commits

* fix(changelog): fix custom header,title,footer, update defaults

* docs(readme): update examples with comments

* feat: add pre-commit hook for autoupdate CHANGELOG

* change(bump): release 0.2.6 → 0.3.0 [skip-ci]

* ci(pre-commit): ignore hook "update-changelog" in CI

* change(bump): release 0.3.0 → 0.3.1 [skip-ci]

* docs(readme): update GitHub badges, add pypi and compatible python
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