Skip to content

Commit 7c97f13

Browse files
authored
fix: resolve commitizen configuration issues in GitHub Actions (#28)
* fix: resolve commitizen configuration issues in GitHub Actions - Replace .cz.json with .cz.toml for Python commitizen compatibility - Update version to 1.1.0 to match latest tag - Add debugging information to workflow for better troubleshooting - Fix 'path argument must be string' error in commitizen The issue was that Python commitizen expects TOML format config, not JSON. This resolves the workflow failures where version bump detection was not working properly. * style: add missing newline at end of .cz.toml file Address PR feedback from Gemini Code Assist review. Follow best practice of ending configuration files with newline to prevent potential issues with command-line tools and VCS. * style: fix trailing whitespace in workflow file Remove trailing spaces from .github/workflows/publish.yml to satisfy pre-commit trailing-whitespace hook requirements.
1 parent 71f2e52 commit 7c97f13

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

.cz.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

.cz.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[tool.commitizen]
2+
name = "cz_conventional_commits"
3+
version = "1.1.0"
4+
tag_format = "v$major.$minor.$patch"

.github/workflows/publish.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
- name: Install dependencies
6363
run: |
6464
npm ci
65-
npm install -g commitizen cz-conventional-changelog
65+
pip install --upgrade commitizen
6666
6767
- name: Configure Git
6868
run: |
@@ -86,15 +86,26 @@ jobs:
8686
8787
# Try commitizen dry-run with improved error handling
8888
echo "🧪 Running commitizen dry-run..."
89+
echo "📋 Commitizen version:"
90+
cz version || echo "cz version failed"
91+
8992
if DRY_RUN_OUTPUT=$(cz bump --dry-run 2>&1); then
9093
echo "✅ Commitizen dry-run successful"
9194
echo "$DRY_RUN_OUTPUT"
9295
DRY_RUN_EXIT=0
9396
else
9497
DRY_RUN_EXIT=$?
9598
echo "⚠️ Commitizen dry-run failed with exit code: $DRY_RUN_EXIT" >&2
99+
echo "📋 Commitizen output:"
96100
DRY_RUN_OUTPUT=$(cz bump --dry-run 2>&1 || true)
97101
echo "$DRY_RUN_OUTPUT"
102+
103+
echo "🔍 Debugging info:"
104+
echo "Current directory: $(pwd)"
105+
echo "Config files:"
106+
ls -la .cz* 2>/dev/null || echo "No .cz config files found"
107+
echo "Git status:"
108+
git status --porcelain
98109
fi
99110
100111
# More robust version detection

0 commit comments

Comments
 (0)