Lee-W commented on PR #30970:
URL: https://github.com/apache/airflow/pull/30970#issuecomment-1533193797

   By default, [commitizen](https://github.com/commitizen-tools/commitizen) 
uses [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/). The 
commit messages look like `type(scope): message` (e.g., `feat(scheduler): cool 
feature`, `fix(triggerer): hot fix`)
   
   It maps these commits into different bumping. 
   
![圖片](https://user-images.githubusercontent.com/5144808/235951509-81830107-d613-4df4-9fa0-d2c9bee5f3c1.png)
   
    e.g., `feat(scope): great feature` will be mapped into a `MINOR` bumping.
   
   If a PR contains more than one commit, it uses the one that needs to bump to 
the highest level.
   
   ---
   
   If airflow currently has bumping rules in place, which involve specific 
commit message patterns (such as "airflow-feature: add a new feature to 
scheduler"), and version bumping is done based on a mapping (such as 
`{"airflow-breaking": MAJOR, "airflow-feature": MINOR}`), then automating the 
bumping process can be taken to the next level.
   
   It basically works like the following.
   
   ```python
   if "airflow-feature" in commit_msg:
       bump(MINOR)
   elif "airflow-fix" in commit_msg:
       bump(PATCH)
   elif "airflow-breakchange" in commit_msg:
       bump(MAJOR)
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to