@leeguoo/zentao-mcp 0.5.1 → 0.5.4

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
@@ -4,10 +4,17 @@ ZenTao CLI for products + bugs.
4
4
 
5
5
  ## Installation
6
6
 
7
- Global install:
7
+ Global install (recommended):
8
8
 
9
9
  ```bash
10
- npm i -g @leeguoo/zentao-mcp
10
+ pnpm i -g @leeguoo/zentao-mcp
11
+ ```
12
+
13
+ If you don't have pnpm:
14
+
15
+ ```bash
16
+ npm i -g pnpm
17
+ pnpm i -g @leeguoo/zentao-mcp
11
18
  ```
12
19
 
13
20
  Or use without installing:
@@ -38,6 +45,12 @@ Environment variables:
38
45
 
39
46
  Tip: `ZENTAO_URL` should include the ZenTao base path (often `/zentao`).
40
47
 
48
+ Example:
49
+
50
+ - `https://zentao.example.com/zentao` (common)
51
+
52
+ If you see `404 Not Found` when logging in, your base path is likely missing `/zentao`.
53
+
41
54
  ## Commands
42
55
 
43
56
  List products:
@@ -113,14 +126,42 @@ zentao whoami
113
126
  zentao products list
114
127
  ```
115
128
 
129
+ Troubleshooting login:
130
+
131
+ - If `Token response parse failed: <html>...404 Not Found...`, try:
132
+ - `https://your-host/zentao` instead of `https://your-host/`
133
+
116
134
  ## Release (maintainers)
117
135
 
136
+ ### GitHub Actions (recommended)
137
+
138
+ This repo supports npm Trusted Publisher (OIDC) via GitHub Actions.
139
+
140
+ 1. Create a tag matching `package.json` version:
141
+
142
+ ```bash
143
+ git tag v0.5.1
144
+ git push origin v0.5.1
145
+ ```
146
+
147
+ 2. The workflow `.github/workflows/publish-npm.yml` will run tests and publish to npm.
148
+
149
+ In npm Trusted Publisher settings, set the workflow filename to `publish-npm.yml`.
150
+
151
+ ### Local release (fallback)
152
+
118
153
  Requires `git`, `npm`, and `gh`.
119
154
 
120
155
  ```bash
121
156
  zentao release patch --dry-run
122
157
  ```
123
158
 
159
+ If you are using GitHub Actions publishing, prefer tagging + pushing, or run local release with:
160
+
161
+ ```bash
162
+ zentao release patch --skip-publish
163
+ ```
164
+
124
165
  ## Local Development
125
166
 
126
167
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leeguoo/zentao-mcp",
3
- "version": "0.5.1",
3
+ "version": "0.5.4",
4
4
  "description": "ZenTao CLI for products + bugs",
5
5
  "keywords": [
6
6
  "zentao",
@@ -27,6 +27,14 @@
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "https://github.com/leeguooooo/zentao-mcp"
33
+ },
34
+ "bugs": {
35
+ "url": "https://github.com/leeguooooo/zentao-mcp/issues"
36
+ },
37
+ "homepage": "https://github.com/leeguooooo/zentao-mcp#readme",
30
38
  "scripts": {
31
39
  "start": "node src/index.js",
32
40
  "self-test": "node src/index.js self-test",
@@ -2,12 +2,25 @@
2
2
 
3
3
  This package provides a CLI for ZenTao REST API (products + bugs).
4
4
 
5
+ When instructing users, assume the primary workflow is:
6
+
7
+ 1) install with pnpm globally
8
+ 2) `zentao login` once
9
+ 3) run `zentao ...` commands without passing credentials each time
10
+
5
11
  ## Installation
6
12
 
7
- Global install:
13
+ Global install (recommended):
8
14
 
9
15
  ```bash
10
- npm i -g @leeguoo/zentao-mcp
16
+ pnpm i -g @leeguoo/zentao-mcp
17
+ ```
18
+
19
+ If pnpm is not installed:
20
+
21
+ ```bash
22
+ npm i -g pnpm
23
+ pnpm i -g @leeguoo/zentao-mcp
11
24
  ```
12
25
 
13
26
  Or use without installing:
@@ -20,6 +33,19 @@ This installs the `zentao` command (and keeps `zentao-mcp` as a compatibility al
20
33
 
21
34
  ## Authentication
22
35
 
36
+ Recommended: login once (stored locally):
37
+
38
+ ```bash
39
+ zentao login --zentao-url=https://zentao.example.com/zentao --zentao-account=leo --zentao-password=***
40
+ ```
41
+
42
+ This writes:
43
+
44
+ - `~/.config/zentao/config.toml` (or `$XDG_CONFIG_HOME/zentao/config.toml`)
45
+
46
+ IMPORTANT: `zentaoUrl` should usually include `/zentao`.
47
+ If login returns 404 HTML, your base path is likely missing `/zentao`.
48
+
23
49
  You can pass credentials via environment variables:
24
50
 
25
51
  ```bash
@@ -42,6 +68,8 @@ Or via CLI flags:
42
68
  zentao products list
43
69
  ```
44
70
 
71
+ By default, this prints a simple TSV table (key fields). To get full JSON:
72
+
45
73
  Full JSON output:
46
74
 
47
75
  ```bash
@@ -54,6 +82,8 @@ zentao products list --json
54
82
  zentao bugs list --product 1
55
83
  ```
56
84
 
85
+ By default, this prints a simple TSV table. To get full JSON:
86
+
57
87
  Full JSON output:
58
88
 
59
89
  ```bash
@@ -66,6 +96,8 @@ zentao bugs list --product 1 --json
66
96
  zentao bug get --id 123
67
97
  ```
68
98
 
99
+ By default, this prints a simple TSV (single row). To get full JSON:
100
+
69
101
  Full JSON output:
70
102
 
71
103
  ```bash
@@ -78,6 +110,12 @@ zentao bug get --id 123 --json
78
110
  zentao bugs mine --scope assigned --status active
79
111
  ```
80
112
 
113
+ By default, this prints a simple summary table. To include bug details:
114
+
115
+ ```bash
116
+ zentao bugs mine --status active --include-details
117
+ ```
118
+
81
119
  Full JSON output:
82
120
 
83
121
  ```bash
@@ -103,19 +141,9 @@ Use `--expected N` to make it CI-friendly (exit code 2 when mismatch):
103
141
  zentao self-test --expected 0
104
142
  ```
105
143
 
106
- ## Login / Whoami
107
-
108
- Save credentials locally:
109
-
110
- ```bash
111
- zentao login --zentao-url=https://zentao.example.com/zentao --zentao-account=leo --zentao-password=***
112
- ```
113
-
114
- Config file:
115
-
116
- - `~/.config/zentao/config.toml` (or `$XDG_CONFIG_HOME/zentao/config.toml`)
144
+ ## Whoami
117
145
 
118
- Then:
146
+ After login:
119
147
 
120
148
  ```bash
121
149
  zentao whoami
@@ -128,3 +156,12 @@ Requires `git`, `npm`, and `gh`.
128
156
  ```bash
129
157
  zentao release patch --dry-run
130
158
  ```
159
+
160
+ Recommended publishing flow is via GitHub Actions npm Trusted Publisher (OIDC):
161
+
162
+ 1) bump `package.json` version
163
+ 2) create a matching tag `vX.Y.Z`
164
+ 3) push the tag to GitHub
165
+ 4) workflow `publish-npm.yml` publishes to npm
166
+
167
+ If you use Actions publishing, prefer `zentao release patch --skip-publish` locally.