Skip to content

Commit 34b72ce

Browse files
committed
feat: complete VS Code extension enhancement and fix packaging
🧩 VS Code Extension Enhancements: - Added Quick Commit and Validate Commit commands - Enhanced extension with comprehensive git utilities and commit validation - Fixed icon packaging issue with updated @vscode/vsce version - Added professional assets and proper icon resolution - Enhanced command implementations with proper error handling 🔧 Infrastructure Improvements: - Updated GitHub workflows and issue templates - Enhanced AI error handling and configuration management - Improved build scripts and version management - Added comprehensive error handling across all utilities ✅ Packaging Verified: - Successfully packages as commitweave-1.0.3.vsix (38.24 KB) - All 5 commands working: Create, AI, Quick Commit, Validate, Configure - Icon properly included and accessible at extension/assets/icon.png All files committed for stable 1.0.3 release.
1 parent 6309d55 commit 34b72ce

File tree

24 files changed

+4564
-734
lines changed

24 files changed

+4564
-734
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: 💬 Community Discussions
4+
url: https://github.com/GLINCKER/commitweave/discussions
5+
about: Ask questions, share ideas, and get community support
6+
- name: 📚 Documentation
7+
url: https://github.com/GLINCKER/commitweave/wiki
8+
about: Check out our comprehensive documentation and guides
9+
- name: 👨‍💻 Support Email
10+
url: mailto:support@glincker.com
11+
about: Direct support for urgent issues or private matters
12+
- name: 🚀 Feature Roadmap
13+
url: https://github.com/GLINCKER/commitweave/projects
14+
about: View our development roadmap and upcoming features

.github/workflows/ci.yml

Lines changed: 204 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,255 @@
1-
name: CI
1+
name: 🧶 CommitWeave CI
22

33
on:
44
push:
5-
branches: ["*"] # Run on all branches (including develop, feature branches)
5+
branches: [ main, develop, "feature/*" ]
66
pull_request:
7-
branches: [main] # Run on PRs to main
7+
branches: [ main, develop ]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
812

913
jobs:
10-
test:
14+
# Linting and Code Quality
15+
lint:
16+
name: 🔍 Lint & Code Quality
1117
runs-on: ubuntu-latest
1218

19+
steps:
20+
- name: 📥 Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: 📦 Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: '18'
27+
cache: 'npm'
28+
29+
- name: 🔧 Install dependencies
30+
run: npm ci
31+
32+
- name: 🔍 Run ESLint
33+
run: npm run lint
34+
continue-on-error: false
35+
36+
- name: 🎨 Check Prettier formatting
37+
run: npx prettier --check "src/**/*.{ts,js,json}" "bin/**/*.{ts,js}" "tests/**/*.{ts,js}"
38+
continue-on-error: false
39+
40+
- name: 🔬 TypeScript type checking
41+
run: npx tsc --noEmit
42+
43+
# Main CLI Testing
44+
test:
45+
name: 🧪 Test CLI (${{ matrix.os }}, Node ${{ matrix.node-version }})
46+
runs-on: ${{ matrix.os }}
47+
needs: lint
48+
1349
strategy:
1450
matrix:
51+
os: [ubuntu-latest, windows-latest, macos-latest]
1552
node-version: [18, 20, 22]
1653

1754
steps:
18-
- name: Checkout code
55+
- name: 📥 Checkout code
1956
uses: actions/checkout@v4
2057

21-
- name: Setup Node.js ${{ matrix.node-version }}
58+
- name: 📦 Setup Node.js ${{ matrix.node-version }}
2259
uses: actions/setup-node@v4
2360
with:
2461
node-version: ${{ matrix.node-version }}
2562
cache: 'npm'
2663

27-
- name: Install dependencies
64+
- name: 🔧 Install dependencies
2865
run: npm ci
2966

30-
- name: Run TypeScript check
31-
run: npx tsc --noEmit
32-
33-
- name: Build package
67+
- name: 🏗️ Build package
3468
run: npm run build
3569

36-
- name: Test package structure
37-
run: |
38-
ls -la dist/
39-
test -f dist/index.js
40-
test -f dist/index.d.ts
41-
test -f dist/bin.js
42-
test -x dist/bin.js
70+
- name: 🧪 Run tests
71+
run: npm test
4372

44-
- name: Run custom tests
73+
- name: ⚡ Performance benchmark
74+
run: npm run bench
75+
env:
76+
COMMITWEAVE_DEBUG_PERF: true
77+
78+
- name: 🔍 Test CLI functionality
4579
run: |
4680
npx tsx scripts/test-local.ts
4781
npx tsx scripts/test-cli-functions.ts
4882
49-
- name: Test package installation
83+
- name: 📦 Test package structure
5084
run: |
51-
npm pack --dry-run
52-
echo "Package structure verified"
85+
ls -la dist/
86+
test -f dist/index.js
87+
test -f dist/index.d.ts
88+
test -f dist/bin.js
89+
90+
- name: 🎯 Test package installation
91+
run: npm pack --dry-run
5392

54-
vscode-extension:
93+
# VS Code Extension Testing
94+
test-extension:
95+
name: 🧩 Test VS Code Extension
5596
runs-on: ubuntu-latest
97+
needs: lint
5698

5799
steps:
58-
- name: Checkout code
100+
- name: 📥 Checkout code
59101
uses: actions/checkout@v4
60102

61-
- name: Setup Node.js 20
103+
- name: 📦 Setup Node.js
62104
uses: actions/setup-node@v4
63105
with:
64-
node-version: 20
106+
node-version: '20'
65107
cache: 'npm'
66108

67-
- name: Install extension dependencies
68-
run: |
69-
cd vscode-extension
70-
npm ci
109+
- name: 🔧 Install main dependencies
110+
run: npm ci
71111

72-
- name: Build VS Code extension
73-
run: |
74-
cd vscode-extension
75-
npm run build
112+
- name: 🏗️ Build main project
113+
run: npm run build
76114

77-
- name: Lint extension code
78-
run: |
79-
cd vscode-extension
80-
npx tsc --noEmit
115+
- name: 📁 Install extension dependencies
116+
working-directory: ./vscode-extension
117+
run: npm ci
81118

82-
- name: Run extension tests
83-
run: |
84-
cd vscode-extension
85-
xvfb-run -a npm test
119+
- name: 🏗️ Build extension
120+
working-directory: ./vscode-extension
121+
run: npm run build
86122

87-
- name: Package VSIX
88-
run: |
89-
cd vscode-extension
90-
npx vsce package --no-yarn
123+
- name: 🔬 Lint extension code
124+
working-directory: ./vscode-extension
125+
run: npx tsc --noEmit
126+
127+
- name: 🧪 Run extension tests
128+
working-directory: ./vscode-extension
129+
run: xvfb-run -a npm test
130+
131+
- name: 📦 Package VSIX
132+
working-directory: ./vscode-extension
133+
run: npx vsce package --no-yarn
91134

92-
- name: Upload VSIX artifact
135+
- name: 📤 Upload VSIX artifact
93136
uses: actions/upload-artifact@v4
94137
with:
95-
name: commitweave-vscode-extension
138+
name: commitweave-vscode-extension-${{ github.sha }}
96139
path: vscode-extension/*.vsix
97-
retention-days: 30
140+
retention-days: 90
98141

99-
- name: Test VSIX structure
142+
- name: ✅ Test VSIX structure
143+
working-directory: ./vscode-extension
100144
run: |
101-
cd vscode-extension
102145
ls -la *.vsix
103-
echo "VSIX package created successfully"
146+
echo "✅ VSIX package created successfully"
147+
148+
# Security and Quality Checks
149+
security:
150+
name: 🔒 Security & Quality
151+
runs-on: ubuntu-latest
152+
needs: lint
153+
154+
steps:
155+
- name: 📥 Checkout code
156+
uses: actions/checkout@v4
157+
158+
- name: 📦 Setup Node.js
159+
uses: actions/setup-node@v4
160+
with:
161+
node-version: '18'
162+
cache: 'npm'
163+
164+
- name: 🔧 Install dependencies
165+
run: npm ci
166+
167+
- name: 🛡️ Run security audit
168+
run: npm audit --audit-level=moderate
169+
170+
- name: 🔍 Initialize CodeQL
171+
uses: github/codeql-action/init@v3
172+
with:
173+
languages: javascript
174+
175+
- name: 🏗️ Build for analysis
176+
run: npm run build
177+
178+
- name: 🛡️ Perform CodeQL Analysis
179+
uses: github/codeql-action/analyze@v3
180+
181+
# Build and Package
182+
build:
183+
name: 🏗️ Build & Package
184+
runs-on: ubuntu-latest
185+
needs: [test, test-extension, security]
186+
187+
steps:
188+
- name: 📥 Checkout code
189+
uses: actions/checkout@v4
190+
191+
- name: 📦 Setup Node.js
192+
uses: actions/setup-node@v4
193+
with:
194+
node-version: '18'
195+
cache: 'npm'
196+
197+
- name: 🔧 Install dependencies
198+
run: npm ci
199+
200+
- name: 🏗️ Build project
201+
run: npm run build
202+
203+
- name: 📦 Create npm package
204+
run: npm pack
205+
206+
- name: 📤 Upload CLI package
207+
uses: actions/upload-artifact@v4
208+
with:
209+
name: commitweave-cli-${{ github.sha }}
210+
path: '*.tgz'
211+
retention-days: 90
212+
213+
- name: 📊 Generate build report
214+
run: |
215+
echo "## 🎯 Build Summary" >> $GITHUB_STEP_SUMMARY
216+
echo "- **Node.js Version**: $(node --version)" >> $GITHUB_STEP_SUMMARY
217+
echo "- **npm Version**: $(npm --version)" >> $GITHUB_STEP_SUMMARY
218+
echo "- **Package Size**: $(ls -lh *.tgz | awk '{print $5}')" >> $GITHUB_STEP_SUMMARY
219+
echo "- **Commit**: ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
220+
echo "- **Build Status**: ✅ Success" >> $GITHUB_STEP_SUMMARY
221+
222+
# Summary Job
223+
ci-success:
224+
name: ✅ CI Complete
225+
runs-on: ubuntu-latest
226+
needs: [lint, test, test-extension, security, build]
227+
if: always()
228+
229+
steps:
230+
- name: 🎉 All checks passed
231+
if: ${{ needs.lint.result == 'success' && needs.test.result == 'success' && needs.test-extension.result == 'success' && needs.security.result == 'success' && needs.build.result == 'success' }}
232+
run: |
233+
echo "🎉 All CI checks passed successfully!"
234+
echo "## ✅ CI Results" >> $GITHUB_STEP_SUMMARY
235+
echo "- **Linting**: ✅ Passed" >> $GITHUB_STEP_SUMMARY
236+
echo "- **CLI Tests**: ✅ Passed (3 OS × 3 Node versions)" >> $GITHUB_STEP_SUMMARY
237+
echo "- **Extension Tests**: ✅ Passed" >> $GITHUB_STEP_SUMMARY
238+
echo "- **Security**: ✅ Passed" >> $GITHUB_STEP_SUMMARY
239+
echo "- **Build**: ✅ Passed" >> $GITHUB_STEP_SUMMARY
240+
echo "" >> $GITHUB_STEP_SUMMARY
241+
echo "🚀 Ready for release!" >> $GITHUB_STEP_SUMMARY
242+
243+
- name: ❌ Some checks failed
244+
if: ${{ needs.lint.result != 'success' || needs.test.result != 'success' || needs.test-extension.result != 'success' || needs.security.result != 'success' || needs.build.result != 'success' }}
245+
run: |
246+
echo "❌ Some CI checks failed!"
247+
echo "## ❌ CI Results" >> $GITHUB_STEP_SUMMARY
248+
echo "- **Linting**: ${{ needs.lint.result == 'success' && '✅ Passed' || '❌ Failed' }}" >> $GITHUB_STEP_SUMMARY
249+
echo "- **CLI Tests**: ${{ needs.test.result == 'success' && '✅ Passed' || '❌ Failed' }}" >> $GITHUB_STEP_SUMMARY
250+
echo "- **Extension Tests**: ${{ needs.test-extension.result == 'success' && '✅ Passed' || '❌ Failed' }}" >> $GITHUB_STEP_SUMMARY
251+
echo "- **Security**: ${{ needs.security.result == 'success' && '✅ Passed' || '❌ Failed' }}" >> $GITHUB_STEP_SUMMARY
252+
echo "- **Build**: ${{ needs.build.result == 'success' && '✅ Passed' || '❌ Failed' }}" >> $GITHUB_STEP_SUMMARY
253+
echo "" >> $GITHUB_STEP_SUMMARY
254+
echo "⚠️ Please fix failing checks before merging." >> $GITHUB_STEP_SUMMARY
255+
exit 1

0 commit comments

Comments
 (0)