@logickernel/agileflow 0.14.0 → 0.14.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 CHANGED
@@ -165,12 +165,13 @@ After 1.0.0, AgileFlow continues automatic versioning with standard semantic ver
165
165
 
166
166
  AgileFlow analyzes commits since the last version tag to determine the appropriate version bump:
167
167
 
168
- | Commit Type | Example | 0.x.x | 1.0.0+ |
169
- |-------------|---------|-------|--------|
170
- | Breaking change | `feat!: redesign API` | **Minor** (0.1.0 → 0.2.0) | **Major** (1.0.0 → 2.0.0) |
171
- | Feature | `feat: add login` | **Minor** | **Minor** |
172
- | Fix | `fix: resolve crash` | **Patch** | **Patch** |
173
- | Everything else | `docs: update README` | No bump | No bump |
168
+ | Commit Type | Example | Changelog | 0.x.x | 1.0.0+ |
169
+ |-------------|---------|-----------|-------|--------|
170
+ | Breaking change | `feat!: redesign API` | Add entry | **Minor** (0.1.0 → 0.2.0) | **Major** (1.0.0 → 2.0.0) |
171
+ | Feature | `feat: add login` | Add entry | **Minor** | **Minor** |
172
+ | Fix | `fix: resolve crash` | Add entry | **Patch** | **Patch** |
173
+ | Chore | `chore: update dependencies` | **No** entry | No bump | No bump |
174
+ | Everything else | `docs: update README` | Add entry | No bump | No bump |
174
175
 
175
176
  ---
176
177
 
@@ -74,23 +74,21 @@ jobs:
74
74
  - name: Create version tag
75
75
  env:
76
76
  AGILEFLOW_TOKEN: ${{ secrets.AGILEFLOW_TOKEN }}
77
- run: npx @logickernel/agileflow github
77
+ run: agileflow github
78
78
  ```
79
79
 
80
80
  ### GitLab CI
81
81
 
82
82
  ```yaml
83
83
  agileflow:
84
- stage: version
85
- image: node:20-alpine
84
+ image: node:20
86
85
  script:
87
- - VERSION=$(npx @logickernel/agileflow gitlab --quiet)
88
- - echo "VERSION=$VERSION" >> version.env
89
- artifacts:
90
- reports:
91
- dotenv: version.env
92
- only:
93
- - main
86
+ - npm install -g @logickernel/agileflow
87
+ - agileflow gitlab
88
+ rules:
89
+ - if: '$CI_COMMIT_BRANCH == "main"'
90
+ tags:
91
+ - agileflow
94
92
  ```
95
93
 
96
94
  ---
@@ -39,10 +39,10 @@ flowchart TD
39
39
  A -- "no" --> B{Does it fix functionality?}
40
40
 
41
41
  B -- "yes" --> X[fix:]
42
- B -- "no" --> C{Is it work in progress?}
42
+ B -- "no" --> C{Is it worth an entry in the changelog?}
43
43
 
44
- C -- "yes" --> W[wip:]
45
- C -- "no" --> D[Choose best: docs, ci, style, chore, etc.]
44
+ C -- "yes" --> W[Choose best: docs, ci, style, etc.]
45
+ C -- "no" --> D[chore:]
46
46
 
47
47
  W --> E{Is it a breaking change?}
48
48
  F --> E
@@ -221,7 +221,17 @@ feat: add user authentication
221
221
  feat: added user authentication
222
222
  ```
223
223
 
224
- 5. Add Meaningful Scopes when applicable
224
+ 5. Use Chore for *work in progress*
225
+
226
+ ```bash
227
+ # ✅ Use chore so an entry is not added to the changelog
228
+ chore: add framework for form validation
229
+
230
+ # ❌ Used something else that will add a meaningless entry to the changelog
231
+ refactor: add framework for form validation
232
+ ```
233
+
234
+ 6. Add Meaningful Scopes when applicable
225
235
 
226
236
  ```bash
227
237
  # ✅ Helpful scope
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logickernel/agileflow",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "description": "Automatic semantic versioning and changelog generation based on conventional commits",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -24,6 +24,7 @@
24
24
  "versioning",
25
25
  "git",
26
26
  "ci-cd",
27
+ "github",
27
28
  "gitlab",
28
29
  "automation",
29
30
  "release-management"
package/src/git-push.js CHANGED
@@ -10,9 +10,10 @@ const os = require('os');
10
10
  * Uses native git commands - requires git credentials to be configured.
11
11
  * @param {string} tagName - The tag name (e.g., "v1.2.3")
12
12
  * @param {string} message - The tag message (changelog)
13
+ * @param {boolean} quiet - If true, suppress success message
13
14
  * @returns {Promise<void>}
14
15
  */
15
- async function pushTag(tagName, message) {
16
+ async function pushTag(tagName, message, quiet = false) {
16
17
  const safeTag = String(tagName).replace(/"/g, '\\"');
17
18
 
18
19
  // Write message to a temp file to avoid shell escaping issues with special characters
@@ -25,6 +26,10 @@ async function pushTag(tagName, message) {
25
26
 
26
27
  // Push to origin
27
28
  execSync(`git push origin "${safeTag}"`, { stdio: 'pipe' });
29
+
30
+ if (!quiet) {
31
+ console.log(`Tag ${tagName} created and pushed successfully.`);
32
+ }
28
33
  } finally {
29
34
  // Clean up temp file
30
35
  try {
@@ -122,9 +122,10 @@ function makeRequest({ method, path, accessToken, body }) {
122
122
  * Uses GITHUB_REPOSITORY and GITHUB_SHA from GitHub Actions environment.
123
123
  * @param {string} tagName - The tag name
124
124
  * @param {string} message - The tag message
125
+ * @param {boolean} quiet - If true, suppress success message
125
126
  * @returns {Promise<void>}
126
127
  */
127
- async function pushTag(tagName, message) {
128
+ async function pushTag(tagName, message, quiet = false) {
128
129
  const accessToken = process.env.AGILEFLOW_TOKEN;
129
130
  const repository = process.env.GITHUB_REPOSITORY;
130
131
  const commitSha = process.env.GITHUB_SHA;
@@ -148,6 +149,10 @@ async function pushTag(tagName, message) {
148
149
  }
149
150
 
150
151
  await createTagViaAPI(tagName, message || tagName, repository, accessToken, commitSha);
152
+
153
+ if (!quiet) {
154
+ console.log(`Tag ${tagName} created and pushed successfully.`);
155
+ }
151
156
  }
152
157
 
153
158
  module.exports = {
package/src/index.js CHANGED
@@ -125,11 +125,7 @@ async function handlePushCommand(pushType, options) {
125
125
  console.log(`\nCreating tag ${info.newVersion}...`);
126
126
  }
127
127
 
128
- await pushModule.pushTag(info.newVersion, tagMessage);
129
-
130
- if (!options.quiet) {
131
- console.log(`Tag ${info.newVersion} created and pushed successfully.`);
132
- }
128
+ await pushModule.pushTag(info.newVersion, tagMessage, options.quiet);
133
129
  }
134
130
 
135
131
  async function main() {