@logickernel/agileflow 0.16.1 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -127
- package/docs/guides/github-actions.md +110 -0
- package/docs/guides/gitlab-ci.md +128 -0
- package/docs/guides/other-ci.md +93 -0
- package/docs/index.md +58 -0
- package/docs/reference/cli.md +124 -0
- package/docs/reference/conventional-commits.md +133 -0
- package/docs/start-here/getting-started.md +83 -0
- package/package.json +1 -1
- package/src/git-push.js +2 -4
- package/src/github-push.js +2 -4
- package/src/gitlab-push.js +3 -5
- package/src/index.js +20 -43
- package/src/utils.js +56 -3
- package/docs/README.md +0 -60
- package/docs/best-practices.md +0 -306
- package/docs/branching-strategy.md +0 -347
- package/docs/cli-reference.md +0 -301
- package/docs/configuration.md +0 -217
- package/docs/conventional-commits.md +0 -252
- package/docs/getting-started.md +0 -231
- package/docs/installation.md +0 -300
- package/docs/migration-guide.md +0 -303
- package/docs/release-management.md +0 -309
- package/docs/troubleshooting.md +0 -367
- package/docs/version-centric-cicd.md +0 -289
|
@@ -1,309 +0,0 @@
|
|
|
1
|
-
# Release Management
|
|
2
|
-
|
|
3
|
-
AgileFlow automates version generation with a decoupled architecture that creates version tags, which then trigger your release pipelines.
|
|
4
|
-
|
|
5
|
-
## Architecture
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
Merge to main ──▶ AgileFlow ──▶ Tag v1.2.3 ──▶ Your build/deploy
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
1. **AgileFlow creates the version tag** — Triggered on merge to main
|
|
12
|
-
2. **Your pipelines handle the release** — Triggered by tag creation
|
|
13
|
-
|
|
14
|
-
This separation keeps versioning independent from build and deployment.
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## How Version Generation Works
|
|
19
|
-
|
|
20
|
-
### Semantic Versioning
|
|
21
|
-
|
|
22
|
-
AgileFlow follows [Semantic Versioning](https://semver.org/):
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
MAJOR.MINOR.PATCH
|
|
26
|
-
│ │ └── Bug fixes, refactors
|
|
27
|
-
│ └──────── New features
|
|
28
|
-
└────────────── Breaking changes
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### Automatic Version Calculation
|
|
32
|
-
|
|
33
|
-
| Commit Type | Example | 0.x.x | 1.0.0+ |
|
|
34
|
-
|-------------|---------|-------|--------|
|
|
35
|
-
| Breaking change | `feat!: redesign API` | **Minor** (0.1.0 → 0.2.0) | **Major** (1.0.0 → 2.0.0) |
|
|
36
|
-
| Feature | `feat: add login` | **Minor** | **Minor** |
|
|
37
|
-
| Fix | `fix: resolve crash` | **Patch** | **Patch** |
|
|
38
|
-
| Everything else | `docs: update README` | No bump | No bump |
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## Release Process
|
|
43
|
-
|
|
44
|
-
### 1. Development
|
|
45
|
-
|
|
46
|
-
Work on feature branches:
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
git checkout -b feat/user-auth
|
|
50
|
-
git commit -m "feat: implement login flow"
|
|
51
|
-
git push origin feat/user-auth
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### 2. Merge
|
|
55
|
-
|
|
56
|
-
Create and merge a pull/merge request to main.
|
|
57
|
-
|
|
58
|
-
### 3. Version Creation (Automatic)
|
|
59
|
-
|
|
60
|
-
AgileFlow runs and creates a tag:
|
|
61
|
-
- Analyzes commits since last version
|
|
62
|
-
- Calculates next version
|
|
63
|
-
- Creates annotated tag with release notes
|
|
64
|
-
|
|
65
|
-
### 4. Release (Your Pipelines)
|
|
66
|
-
|
|
67
|
-
Tag creation triggers your release workflow:
|
|
68
|
-
- Build artifacts tagged with version
|
|
69
|
-
- Deploy to environments
|
|
70
|
-
- Run tests
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## Release Workflows
|
|
75
|
-
|
|
76
|
-
### GitHub Actions
|
|
77
|
-
|
|
78
|
-
**Release workflow** (`.github/workflows/release.yml`):
|
|
79
|
-
```yaml
|
|
80
|
-
name: Release
|
|
81
|
-
on:
|
|
82
|
-
push:
|
|
83
|
-
tags:
|
|
84
|
-
- 'v*'
|
|
85
|
-
|
|
86
|
-
jobs:
|
|
87
|
-
build:
|
|
88
|
-
runs-on: ubuntu-latest
|
|
89
|
-
steps:
|
|
90
|
-
- uses: actions/checkout@v4
|
|
91
|
-
|
|
92
|
-
- name: Get version
|
|
93
|
-
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
|
94
|
-
|
|
95
|
-
- name: Build
|
|
96
|
-
run: docker build -t myapp:$VERSION .
|
|
97
|
-
|
|
98
|
-
deploy-staging:
|
|
99
|
-
needs: build
|
|
100
|
-
runs-on: ubuntu-latest
|
|
101
|
-
environment: staging
|
|
102
|
-
steps:
|
|
103
|
-
- run: kubectl set image deployment/myapp myapp=myapp:$VERSION
|
|
104
|
-
|
|
105
|
-
deploy-production:
|
|
106
|
-
needs: build
|
|
107
|
-
runs-on: ubuntu-latest
|
|
108
|
-
environment: production
|
|
109
|
-
steps:
|
|
110
|
-
- run: kubectl set image deployment/myapp myapp=myapp:$VERSION
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
### GitLab CI
|
|
114
|
-
|
|
115
|
-
```yaml
|
|
116
|
-
build:
|
|
117
|
-
stage: build
|
|
118
|
-
script:
|
|
119
|
-
- docker build -t myapp:$CI_COMMIT_TAG .
|
|
120
|
-
rules:
|
|
121
|
-
- if: '$CI_COMMIT_TAG =~ /^v/'
|
|
122
|
-
|
|
123
|
-
deploy-staging:
|
|
124
|
-
stage: deploy
|
|
125
|
-
script:
|
|
126
|
-
- kubectl set image deployment/myapp myapp=myapp:$CI_COMMIT_TAG
|
|
127
|
-
environment: staging
|
|
128
|
-
rules:
|
|
129
|
-
- if: '$CI_COMMIT_TAG =~ /^v/'
|
|
130
|
-
|
|
131
|
-
deploy-production:
|
|
132
|
-
stage: deploy
|
|
133
|
-
script:
|
|
134
|
-
- kubectl set image deployment/myapp myapp=myapp:$CI_COMMIT_TAG
|
|
135
|
-
environment: production
|
|
136
|
-
when: manual
|
|
137
|
-
rules:
|
|
138
|
-
- if: '$CI_COMMIT_TAG =~ /^v/'
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
---
|
|
142
|
-
|
|
143
|
-
## Release Notes
|
|
144
|
-
|
|
145
|
-
AgileFlow generates structured release notes from conventional commits:
|
|
146
|
-
|
|
147
|
-
```
|
|
148
|
-
v1.2.4
|
|
149
|
-
|
|
150
|
-
### Features
|
|
151
|
-
- auth: add OAuth2 login flow
|
|
152
|
-
|
|
153
|
-
### Bug fixes
|
|
154
|
-
- api: handle null user ID
|
|
155
|
-
|
|
156
|
-
### Performance
|
|
157
|
-
- cache: implement Redis pooling
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### View Release Notes
|
|
161
|
-
|
|
162
|
-
```bash
|
|
163
|
-
git tag -l -n99 v1.2.4
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
## Initial Development (0.x.x)
|
|
169
|
-
|
|
170
|
-
New projects start at v0.0.0:
|
|
171
|
-
|
|
172
|
-
- Features → Minor bump (0.0.0 → 0.1.0)
|
|
173
|
-
- Fixes → Patch bump (0.0.0 → 0.0.1)
|
|
174
|
-
- Breaking changes → Minor bump (0.0.0 → 0.1.0)
|
|
175
|
-
|
|
176
|
-
---
|
|
177
|
-
|
|
178
|
-
## First Stable Release
|
|
179
|
-
|
|
180
|
-
Version 1.0.0 represents first stable release. Create manually:
|
|
181
|
-
|
|
182
|
-
```bash
|
|
183
|
-
git tag -a v1.0.0 -m "First stable release"
|
|
184
|
-
git push origin v1.0.0
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
This will trigger your release workflow.
|
|
188
|
-
|
|
189
|
-
---
|
|
190
|
-
|
|
191
|
-
## Viewing Releases
|
|
192
|
-
|
|
193
|
-
```bash
|
|
194
|
-
# List versions
|
|
195
|
-
git tag --sort=-version:refname
|
|
196
|
-
|
|
197
|
-
# View specific version
|
|
198
|
-
git show v1.2.3
|
|
199
|
-
|
|
200
|
-
# Compare versions
|
|
201
|
-
git log v1.2.2..v1.2.3 --oneline
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
---
|
|
205
|
-
|
|
206
|
-
## Rollbacks
|
|
207
|
-
|
|
208
|
-
### Simple Rollback
|
|
209
|
-
|
|
210
|
-
Redeploy a previous version:
|
|
211
|
-
|
|
212
|
-
```bash
|
|
213
|
-
kubectl set image deployment/myapp myapp=myapp:v1.2.2
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
### Automated Rollback Job
|
|
217
|
-
|
|
218
|
-
**GitHub Actions:**
|
|
219
|
-
```yaml
|
|
220
|
-
rollback:
|
|
221
|
-
runs-on: ubuntu-latest
|
|
222
|
-
steps:
|
|
223
|
-
- uses: actions/checkout@v4
|
|
224
|
-
with:
|
|
225
|
-
fetch-depth: 0
|
|
226
|
-
- run: |
|
|
227
|
-
PREVIOUS=$(git describe --tags --abbrev=0 HEAD^)
|
|
228
|
-
kubectl set image deployment/myapp myapp=myapp:$PREVIOUS
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
**GitLab CI:**
|
|
232
|
-
```yaml
|
|
233
|
-
rollback:
|
|
234
|
-
script:
|
|
235
|
-
- PREVIOUS=$(git describe --tags --abbrev=0 HEAD^)
|
|
236
|
-
- kubectl set image deployment/myapp myapp=myapp:$PREVIOUS
|
|
237
|
-
when: manual
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
---
|
|
241
|
-
|
|
242
|
-
## Release Strategies
|
|
243
|
-
|
|
244
|
-
### Continuous Delivery
|
|
245
|
-
|
|
246
|
-
Auto-deploy to staging, manual to production:
|
|
247
|
-
|
|
248
|
-
```yaml
|
|
249
|
-
deploy-staging:
|
|
250
|
-
# Runs automatically on tag
|
|
251
|
-
|
|
252
|
-
deploy-production:
|
|
253
|
-
when: manual
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
### Version-Based Gates
|
|
257
|
-
|
|
258
|
-
Only deploy certain version types:
|
|
259
|
-
|
|
260
|
-
```yaml
|
|
261
|
-
deploy-production:
|
|
262
|
-
rules:
|
|
263
|
-
# Only minor/major versions
|
|
264
|
-
- if: '$CI_COMMIT_TAG =~ /^v\d+\.\d+\.0$/'
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
---
|
|
268
|
-
|
|
269
|
-
## Release Communication
|
|
270
|
-
|
|
271
|
-
### Notifications
|
|
272
|
-
|
|
273
|
-
```yaml
|
|
274
|
-
notify:
|
|
275
|
-
script:
|
|
276
|
-
- |
|
|
277
|
-
curl -X POST "$SLACK_WEBHOOK" \
|
|
278
|
-
-d "{\"text\": \"Released $CI_COMMIT_TAG\"}"
|
|
279
|
-
rules:
|
|
280
|
-
- if: '$CI_COMMIT_TAG =~ /^v/'
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
### GitHub Releases
|
|
284
|
-
|
|
285
|
-
```yaml
|
|
286
|
-
- uses: softprops/action-gh-release@v1
|
|
287
|
-
with:
|
|
288
|
-
tag_name: ${{ github.ref_name }}
|
|
289
|
-
generate_release_notes: true
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
---
|
|
293
|
-
|
|
294
|
-
## Best Practices
|
|
295
|
-
|
|
296
|
-
1. **Use conventional commits** — For accurate versioning
|
|
297
|
-
2. **Keep releases small** — Easier to debug and rollback
|
|
298
|
-
3. **Test in staging first** — Before production
|
|
299
|
-
4. **Document breaking changes** — Clear for users
|
|
300
|
-
5. **Plan rollbacks** — Have procedures ready
|
|
301
|
-
|
|
302
|
-
---
|
|
303
|
-
|
|
304
|
-
## Related Documentation
|
|
305
|
-
|
|
306
|
-
- [Getting Started](./getting-started.md) — Quick start
|
|
307
|
-
- [Conventional Commits](./conventional-commits.md) — Commit format
|
|
308
|
-
- [Version-Centric CI/CD](./version-centric-cicd.md) — Methodology
|
|
309
|
-
- [Best Practices](./best-practices.md) — Recommendations
|
package/docs/troubleshooting.md
DELETED
|
@@ -1,367 +0,0 @@
|
|
|
1
|
-
# Troubleshooting Guide
|
|
2
|
-
|
|
3
|
-
This guide helps you resolve common issues when using AgileFlow.
|
|
4
|
-
|
|
5
|
-
## Quick Diagnosis
|
|
6
|
-
|
|
7
|
-
### Check Your Setup
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
# Verify git repository
|
|
11
|
-
git status
|
|
12
|
-
|
|
13
|
-
# Check existing version tags
|
|
14
|
-
git tag --sort=-version:refname | head -5
|
|
15
|
-
|
|
16
|
-
# Preview next version
|
|
17
|
-
npx @logickernel/agileflow
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
### Common Symptoms
|
|
21
|
-
|
|
22
|
-
| Symptom | Likely Cause | Section |
|
|
23
|
-
|---------|--------------|---------|
|
|
24
|
-
| No tag created | Token permissions | [Authentication](#authentication-errors) |
|
|
25
|
-
| Wrong version | Commit format | [Version Generation](#version-generation-issues) |
|
|
26
|
-
| Tag created but no build | Release workflow config | [Release Workflow](#release-workflow-issues) |
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## Authentication Errors
|
|
31
|
-
|
|
32
|
-
### GitHub: "Resource not accessible by integration"
|
|
33
|
-
|
|
34
|
-
**Cause:** Token lacks required permissions.
|
|
35
|
-
|
|
36
|
-
**Solution:**
|
|
37
|
-
1. Create a Fine-grained Personal Access Token
|
|
38
|
-
2. Grant `Contents: Read and write` permission
|
|
39
|
-
3. Ensure repository is in token scope
|
|
40
|
-
4. Update `AGILEFLOW_TOKEN` secret
|
|
41
|
-
|
|
42
|
-
### GitHub: "Bad credentials"
|
|
43
|
-
|
|
44
|
-
**Cause:** Token invalid or expired.
|
|
45
|
-
|
|
46
|
-
**Solution:**
|
|
47
|
-
1. Check token hasn't expired
|
|
48
|
-
2. Regenerate token
|
|
49
|
-
3. Update secret
|
|
50
|
-
|
|
51
|
-
### GitLab: "403 Forbidden"
|
|
52
|
-
|
|
53
|
-
**Cause:** Token lacks permissions.
|
|
54
|
-
|
|
55
|
-
**Solution:**
|
|
56
|
-
1. Verify `api` scope
|
|
57
|
-
2. Ensure `Maintainer` role
|
|
58
|
-
3. Check token not expired
|
|
59
|
-
4. For protected branches, ensure variable is protected
|
|
60
|
-
|
|
61
|
-
### GitLab: "401 Unauthorized"
|
|
62
|
-
|
|
63
|
-
**Cause:** Invalid or missing token.
|
|
64
|
-
|
|
65
|
-
**Solution:**
|
|
66
|
-
1. Verify `AGILEFLOW_TOKEN` variable exists
|
|
67
|
-
2. Check variable protection settings
|
|
68
|
-
3. Regenerate if needed
|
|
69
|
-
|
|
70
|
-
---
|
|
71
|
-
|
|
72
|
-
## Version Generation Issues
|
|
73
|
-
|
|
74
|
-
### No Tag Created
|
|
75
|
-
|
|
76
|
-
**Possible causes:**
|
|
77
|
-
|
|
78
|
-
1. **No conventional commits**
|
|
79
|
-
```bash
|
|
80
|
-
# Check recent commits
|
|
81
|
-
git log --oneline -10
|
|
82
|
-
|
|
83
|
-
# Should see: feat:, fix:, perf:, etc.
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
2. **All commits are docs/chore/style**
|
|
87
|
-
```bash
|
|
88
|
-
# These don't trigger bumps:
|
|
89
|
-
docs: update README
|
|
90
|
-
chore: update deps
|
|
91
|
-
style: format code
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
3. **Not on main branch**
|
|
95
|
-
```bash
|
|
96
|
-
git branch --show-current
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
**Solution:** Include bump-triggering commits (`feat`, `fix`, `perf`, etc.).
|
|
100
|
-
|
|
101
|
-
### Wrong Version Calculated
|
|
102
|
-
|
|
103
|
-
**Possible causes:**
|
|
104
|
-
|
|
105
|
-
1. **Breaking change not marked**
|
|
106
|
-
```bash
|
|
107
|
-
# Wrong
|
|
108
|
-
feat: remove old API
|
|
109
|
-
|
|
110
|
-
# Correct
|
|
111
|
-
feat!: remove old API
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
2. **Wrong commit type**
|
|
115
|
-
```bash
|
|
116
|
-
# Wrong
|
|
117
|
-
fix: add new login feature
|
|
118
|
-
|
|
119
|
-
# Correct
|
|
120
|
-
feat: add new login feature
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### Commits Not Recognized
|
|
124
|
-
|
|
125
|
-
**Common mistakes:**
|
|
126
|
-
|
|
127
|
-
```bash
|
|
128
|
-
# Wrong — missing colon
|
|
129
|
-
feat add new feature
|
|
130
|
-
|
|
131
|
-
# Wrong — wrong separator
|
|
132
|
-
feat - add new feature
|
|
133
|
-
|
|
134
|
-
# Wrong — capitalized
|
|
135
|
-
Feat: add new feature
|
|
136
|
-
|
|
137
|
-
# Correct
|
|
138
|
-
feat: add new feature
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
---
|
|
142
|
-
|
|
143
|
-
## Release Workflow Issues
|
|
144
|
-
|
|
145
|
-
### Tag Created but Build Didn't Run
|
|
146
|
-
|
|
147
|
-
**Cause:** Release workflow not triggered by tags.
|
|
148
|
-
|
|
149
|
-
**GitHub Actions — Check workflow trigger:**
|
|
150
|
-
```yaml
|
|
151
|
-
# ✅ Correct
|
|
152
|
-
on:
|
|
153
|
-
push:
|
|
154
|
-
tags:
|
|
155
|
-
- 'v*'
|
|
156
|
-
|
|
157
|
-
# ❌ Wrong — only triggers on branch push
|
|
158
|
-
on:
|
|
159
|
-
push:
|
|
160
|
-
branches: [main]
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
**GitLab CI — Check rules:**
|
|
164
|
-
```yaml
|
|
165
|
-
# ✅ Correct
|
|
166
|
-
build:
|
|
167
|
-
rules:
|
|
168
|
-
- if: '$CI_COMMIT_TAG =~ /^v/'
|
|
169
|
-
|
|
170
|
-
# ❌ Wrong — only runs on main branch
|
|
171
|
-
build:
|
|
172
|
-
rules:
|
|
173
|
-
- if: '$CI_COMMIT_BRANCH == "main"'
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
### Version Not Available in Release Workflow
|
|
177
|
-
|
|
178
|
-
**GitHub Actions:**
|
|
179
|
-
```yaml
|
|
180
|
-
# Extract version from tag
|
|
181
|
-
- name: Get version
|
|
182
|
-
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
|
183
|
-
|
|
184
|
-
- name: Use version
|
|
185
|
-
run: docker build -t myapp:$VERSION .
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
**GitLab CI:**
|
|
189
|
-
```yaml
|
|
190
|
-
# Use CI_COMMIT_TAG directly
|
|
191
|
-
build:
|
|
192
|
-
script:
|
|
193
|
-
- docker build -t myapp:$CI_COMMIT_TAG .
|
|
194
|
-
rules:
|
|
195
|
-
- if: '$CI_COMMIT_TAG =~ /^v/'
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
---
|
|
199
|
-
|
|
200
|
-
## Git Repository Errors
|
|
201
|
-
|
|
202
|
-
### "Not a git repository"
|
|
203
|
-
|
|
204
|
-
**Cause:** Running outside git repository.
|
|
205
|
-
|
|
206
|
-
**Solution:**
|
|
207
|
-
```bash
|
|
208
|
-
ls -la .git # Verify .git exists
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
### "Detached HEAD state"
|
|
212
|
-
|
|
213
|
-
**GitHub Actions:**
|
|
214
|
-
```yaml
|
|
215
|
-
- uses: actions/checkout@v4
|
|
216
|
-
with:
|
|
217
|
-
fetch-depth: 0
|
|
218
|
-
ref: main # Checkout branch
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
**GitLab CI:**
|
|
222
|
-
```yaml
|
|
223
|
-
agileflow:
|
|
224
|
-
script:
|
|
225
|
-
- git checkout $CI_COMMIT_REF_NAME
|
|
226
|
-
- npx @logickernel/agileflow gitlab
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
### Shallow Clone Issues
|
|
230
|
-
|
|
231
|
-
**Cause:** Commit history not available.
|
|
232
|
-
|
|
233
|
-
**GitHub Actions:**
|
|
234
|
-
```yaml
|
|
235
|
-
- uses: actions/checkout@v4
|
|
236
|
-
with:
|
|
237
|
-
fetch-depth: 0 # Fetch all history
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
**GitLab CI:**
|
|
241
|
-
```yaml
|
|
242
|
-
variables:
|
|
243
|
-
GIT_DEPTH: 0
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
---
|
|
247
|
-
|
|
248
|
-
## Pipeline Issues
|
|
249
|
-
|
|
250
|
-
### Versioning Job Fails
|
|
251
|
-
|
|
252
|
-
**Debug steps:**
|
|
253
|
-
|
|
254
|
-
1. **Check logs** for error messages
|
|
255
|
-
2. **Verify token** is set:
|
|
256
|
-
```yaml
|
|
257
|
-
- run: echo "Token set: ${{ secrets.AGILEFLOW_TOKEN != '' }}"
|
|
258
|
-
```
|
|
259
|
-
3. **Check git state**:
|
|
260
|
-
```yaml
|
|
261
|
-
- run: |
|
|
262
|
-
git log --oneline -5
|
|
263
|
-
git tag --sort=-version:refname | head -3
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
### Both Workflows Running on Same Push
|
|
267
|
-
|
|
268
|
-
**Cause:** Main push triggers versioning, tag push triggers release — correct behavior!
|
|
269
|
-
|
|
270
|
-
This is expected:
|
|
271
|
-
1. Push to main → Versioning workflow → Creates tag
|
|
272
|
-
2. Tag push → Release workflow → Builds
|
|
273
|
-
|
|
274
|
-
---
|
|
275
|
-
|
|
276
|
-
## Debug Commands
|
|
277
|
-
|
|
278
|
-
### Verify AgileFlow
|
|
279
|
-
|
|
280
|
-
```bash
|
|
281
|
-
# Check version
|
|
282
|
-
npx @logickernel/agileflow --version
|
|
283
|
-
|
|
284
|
-
# Preview (no tag creation)
|
|
285
|
-
npx @logickernel/agileflow
|
|
286
|
-
|
|
287
|
-
# Quiet mode
|
|
288
|
-
npx @logickernel/agileflow --quiet
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
### Check Git State
|
|
292
|
-
|
|
293
|
-
```bash
|
|
294
|
-
# Recent tags
|
|
295
|
-
git tag --sort=-version:refname | head -5
|
|
296
|
-
|
|
297
|
-
# Recent commits
|
|
298
|
-
git log --oneline -10
|
|
299
|
-
|
|
300
|
-
# Current branch
|
|
301
|
-
git branch --show-current
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
### Test Tokens
|
|
305
|
-
|
|
306
|
-
**GitLab:**
|
|
307
|
-
```bash
|
|
308
|
-
curl --header "PRIVATE-TOKEN: $AGILEFLOW_TOKEN" \
|
|
309
|
-
"https://gitlab.com/api/v4/projects"
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
**GitHub:**
|
|
313
|
-
```bash
|
|
314
|
-
curl -H "Authorization: token $AGILEFLOW_TOKEN" \
|
|
315
|
-
"https://api.github.com/user"
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
---
|
|
319
|
-
|
|
320
|
-
## Common Patterns
|
|
321
|
-
|
|
322
|
-
### Complete Debug Workflow
|
|
323
|
-
|
|
324
|
-
**GitHub Actions:**
|
|
325
|
-
```yaml
|
|
326
|
-
- name: Debug
|
|
327
|
-
run: |
|
|
328
|
-
echo "Node: $(node --version)"
|
|
329
|
-
echo "Git: $(git --version)"
|
|
330
|
-
echo "Branch: $(git branch --show-current)"
|
|
331
|
-
echo "Tags: $(git tag --sort=-version:refname | head -3)"
|
|
332
|
-
echo "Commits:"
|
|
333
|
-
git log --oneline -5
|
|
334
|
-
npx @logickernel/agileflow || echo "Exit: $?"
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
**GitLab CI:**
|
|
338
|
-
```yaml
|
|
339
|
-
debug:
|
|
340
|
-
script:
|
|
341
|
-
- node --version
|
|
342
|
-
- git --version
|
|
343
|
-
- git branch --show-current
|
|
344
|
-
- git tag --sort=-version:refname | head -3
|
|
345
|
-
- git log --oneline -5
|
|
346
|
-
- npx @logickernel/agileflow || echo "Exit: $?"
|
|
347
|
-
```
|
|
348
|
-
|
|
349
|
-
---
|
|
350
|
-
|
|
351
|
-
## Getting Help
|
|
352
|
-
|
|
353
|
-
If still stuck:
|
|
354
|
-
|
|
355
|
-
1. **Check error messages** — Usually descriptive
|
|
356
|
-
2. **Verify configuration** — Tokens, workflow triggers
|
|
357
|
-
3. **Test locally** — `npx @logickernel/agileflow`
|
|
358
|
-
4. **Open an issue** — Include logs and config
|
|
359
|
-
|
|
360
|
-
---
|
|
361
|
-
|
|
362
|
-
## Related Documentation
|
|
363
|
-
|
|
364
|
-
- [Installation Guide](./installation.md) — Setup
|
|
365
|
-
- [Configuration](./configuration.md) — Variables
|
|
366
|
-
- [CLI Reference](./cli-reference.md) — Commands
|
|
367
|
-
- [Conventional Commits](./conventional-commits.md) — Commit format
|