Skip to content

Commit e5805b6

Browse files
Merge branch 'master' into feature/custom-validation
2 parents be8d7a9 + 6a2c806 commit e5805b6

File tree

145 files changed

+6842
-3576
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+6842
-3576
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 🛠 Bug report
22
description: Create a report to help us improve
33
title: Good bug title tells us about precise symptom, not about the root cause.
4-
labels: [bug]
4+
labels: ['type: bug']
55
body:
66
- type: textarea
77
id: description
@@ -48,14 +48,22 @@ body:
4848
attributes:
4949
label: Environment
5050
description: |
51-
For older commitizen versions, please include the output of the following commands manually
52-
placeholder: |
53-
- commitizen version: `cz version`
54-
- python version: `python --version`
55-
- operating system: `python3 -c "import platform; print(platform.system())"`
51+
Please use the following command to retrieve environment information
5652
5753
```bash
5854
cz version --report
5955
```
56+
57+
If `cz version --report` is not available, please run the following commands to retrieve your environment information:
58+
59+
```bash
60+
echo "Commitizen Version: $(cz version)"
61+
echo "Python Version: $(python3 -c 'import sys; print(sys.version)')"
62+
echo "Operating System: $(python3 -c 'import platform; print(platform.system())')"
63+
```
64+
placeholder: |
65+
Commitizen Version: 4.0.0
66+
Python Version: 3.13.3 (main, Apr 8 2025, 13:54:08) [Clang 16.0.0 (clang-1600.0.26.6)]
67+
Operating System: Darwin
6068
validations:
6169
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
blank_issues_enabled: false
44
contact_links:
55
- name: Security Contact
6+
url: https://github.com/woile
67
about: Please report security vulnerabilities to santiwilly@gmail.com

.github/ISSUE_TEMPLATE/documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 📖 Documentation
22
description: Suggest an improvement for the documentation of this project
33
title: Content to be added or fixed
4-
labels: [documentation]
4+
labels: ['type: documentation']
55
body:
66
- type: checkboxes
77
id: type

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 🚀 Feature request
22
description: Suggest an idea for this project
33
title: "<One feature request per issue>"
4-
labels: [feature]
4+
labels: ['type: feature']
55
body:
66
- type: textarea
77
id: description
@@ -26,6 +26,6 @@ body:
2626
- type: textarea
2727
id: related-issue
2828
attributes:
29-
label: Additional context
29+
label: Related issues
3030
description: |
3131
If applicable, add link to existing issue also help us know better.

.github/pull_request_template.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,31 @@ Please fill in the following content to let us know better about this change.
99

1010
## Checklist
1111

12+
- [ ] I have read the [contributing guidelines](https://commitizen-tools.github.io/commitizen/contributing/)
13+
14+
### Code Changes
15+
1216
- [ ] Add test cases to all the changes you introduce
13-
- [ ] Run `./scripts/format` and `./scripts/test` locally to ensure this change passes linter check and test
14-
- [ ] Test the changes on the local machine manually
17+
- [ ] Run `poetry all` locally to ensure this change passes linter check and tests
18+
- [ ] Manually test the changes:
19+
- [ ] Verify the feature/bug fix works as expected in real-world scenarios
20+
- [ ] Test edge cases and error conditions
21+
- [ ] Ensure backward compatibility is maintained
22+
- [ ] Document any manual testing steps performed
1523
- [ ] Update the documentation for the changes
1624

17-
## Expected behavior
25+
### Documentation Changes
26+
27+
- [ ] Run `poetry doc` locally to ensure the documentation pages renders correctly
28+
- [ ] Check and fix any broken links (internal or external) in the documentation
29+
30+
> When running `poetry doc`, any broken internal documentation links will be reported in the console output like this:
31+
>
32+
> ```text
33+
> INFO - Doc file 'config.md' contains a link 'commands/bump.md#-post_bump_hooks', but the doc 'commands/bump.md' does not contain an anchor '#-post_bump_hooks'.
34+
> ```
35+
36+
## Expected Behavior
1837
<!-- A clear and concise description of what you expected to happen -->
1938
2039
@@ -25,5 +44,5 @@ Please fill in the following content to let us know better about this change.
2544
3. ... -->
2645
2746
28-
## Additional context
47+
## Additional Context
2948
<!-- Add any other RELATED ISSUE, context or screenshots about the pull request here. -->

.github/workflows/bumpversion.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
name: "Bump version and create changelog with commitizen"
1313
steps:
1414
- name: Check out
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v5
1616
with:
1717
fetch-depth: 0
1818
token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"

.github/workflows/docspublish.yml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,28 @@ on:
44
push:
55
branches:
66
- master
7+
workflow_dispatch:
78

89
jobs:
910
update-cli-screenshots:
1011
runs-on: ubuntu-latest
1112
steps:
12-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v5
1314
with:
1415
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
1516
fetch-depth: 0
1617
- name: Set up Python
17-
uses: actions/setup-python@v5
18+
uses: actions/setup-python@v6
1819
with:
1920
python-version: "3.x"
2021
- name: Install dependencies
2122
run: |
22-
python -m pip install -U pip poetry
23+
python -m pip install -U pip poetry poethepoet
2324
poetry --version
24-
poetry install
25+
poetry install --only main,script
2526
- name: Update CLI screenshots
2627
run: |
27-
poetry run python scripts/gen_cli_help_screenshots.py
28+
poetry doc:screenshots
2829
- name: Commit and push updated CLI screenshots
2930
run: |
3031
git config --global user.name "github-actions[bot]"
@@ -42,35 +43,35 @@ jobs:
4243
runs-on: ubuntu-latest
4344
needs: update-cli-screenshots
4445
steps:
45-
- uses: actions/checkout@v4
46+
- uses: actions/checkout@v5
4647
with:
4748
token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
4849
fetch-depth: 0
4950
- name: Pull latest changes
5051
run: |
5152
git pull origin master
5253
- name: Set up Python
53-
uses: actions/setup-python@v5
54+
uses: actions/setup-python@v6
5455
with:
5556
python-version: "3.x"
5657
- name: Install dependencies
5758
run: |
58-
python -m pip install -U mkdocs mkdocs-material
59-
- name: Build docs
60-
env:
61-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62-
run: |
63-
python -m mkdocs build
59+
python -m pip install -U pip poetry poethepoet
60+
poetry --version
61+
poetry install --no-root --only documentation
6462
- name: Generate Sponsors 💖
6563
uses: JamesIves/github-sponsors-readme-action@v1
6664
with:
6765
token: ${{ secrets.PERSONAL_ACCESS_TOKEN_FOR_ORG }}
6866
file: "docs/README.md"
69-
- name: Push doc to Github Page
70-
uses: peaceiris/actions-gh-pages@v4
67+
organization: true
68+
- name: Build docs
69+
env:
70+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71+
run: |
72+
poetry doc:build
73+
- name: Deploy 🚀
74+
uses: JamesIves/github-pages-deploy-action@v4
7175
with:
72-
personal_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
73-
publish_branch: gh-pages
74-
publish_dir: ./site
75-
user_name: "github-actions[bot]"
76-
user_email: "github-actions[bot]@users.noreply.github.com"
76+
folder: ./site # The folder the action should deploy.
77+
branch: gh-pages

.github/workflows/homebrewpublish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v5
1616
- name: Set up Python
17-
uses: actions/setup-python@v5
17+
uses: actions/setup-python@v6
1818
with:
1919
python-version: "3.x"
2020
- name: Install dependencies
@@ -24,7 +24,7 @@ jobs:
2424
run: |
2525
echo "project_version=$(cz version --project)" >> $GITHUB_ENV
2626
- name: Update Homebrew formula
27-
uses: dawidd6/action-homebrew-bump-formula@v4
27+
uses: dawidd6/action-homebrew-bump-formula@v5
2828
with:
2929
token: ${{secrets.PERSONAL_ACCESS_TOKEN}}
3030
formula: commitizen

.github/workflows/label_issues.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,35 @@ jobs:
1212
issues: write
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/github-script@v7
15+
- uses: actions/github-script@v8
1616
with:
1717
script: |
18-
github.rest.issues.addLabels({
18+
const issue = await github.rest.issues.get({
1919
issue_number: context.issue.number,
2020
owner: context.repo.owner,
2121
repo: context.repo.repo,
22-
labels: ['issue-status: needs-triage']
23-
})
22+
});
23+
24+
const body = issue.data.body || '';
25+
26+
const osLabels = new Set(); // Use a Set to avoid duplicates
27+
28+
// Parse the "Environment" section, output of `cz version --report`
29+
if (body.includes('Operating System: Darwin')) {
30+
osLabels.add('os: macOS');
31+
}
32+
33+
if (body.includes('Operating System: Linux')) {
34+
osLabels.add('os: Linux');
35+
}
36+
37+
if (body.includes('Operating System: Windows')) {
38+
osLabels.add('os: Windows');
39+
}
40+
41+
await github.rest.issues.addLabels({
42+
issue_number: context.issue.number,
43+
owner: context.repo.owner,
44+
repo: context.repo.repo,
45+
labels: ['issue-status: needs-triage', ...osLabels],
46+
});

.github/workflows/label_pr.yml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,39 @@ jobs:
99
pull-requests: write
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v4
12+
- uses: actions/checkout@v5
1313
with:
1414
sparse-checkout: |
1515
.github/labeler.yml
1616
sparse-checkout-cone-mode: false
17-
- uses: actions/labeler@v5
17+
- uses: actions/labeler@v6
1818
with:
1919
configuration-path: .github/labeler.yml
20+
- name: Label based on PR title
21+
uses: actions/github-script@v8
22+
with:
23+
script: |
24+
const title = context.payload.pull_request.title.toLowerCase();
25+
const labels = [];
26+
27+
if (title.includes("fix") || title.includes("bug")) {
28+
labels.push("type: bug");
29+
}
30+
if (title.includes("feat")) {
31+
labels.push("type: feature");
32+
}
33+
if (title.includes("doc")) {
34+
labels.push("type: documentation");
35+
}
36+
if (title.includes("refactor")) {
37+
labels.push("type: refactor");
38+
}
39+
40+
if (labels.length > 0) {
41+
await github.rest.issues.addLabels({
42+
owner: context.repo.owner,
43+
repo: context.repo.repo,
44+
issue_number: context.payload.pull_request.number,
45+
labels
46+
});
47+
}

0 commit comments

Comments
 (0)