@flydocs/cli 0.6.0-alpha.8 → 0.6.0-alpha.9
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/dist/cli.js +1 -1
- package/package.json +1 -1
- package/template/.claude/skills/flydocs-cloud/SKILL.md +1 -1
- package/template/.claude/skills/flydocs-cloud/scripts/assign.py +10 -4
- package/template/.claude/skills/flydocs-local/SKILL.md +1 -1
- package/template/.claude/skills/flydocs-local/scripts/assign.py +13 -4
- package/template/.claude/skills/flydocs-local/scripts/flydocs_api.py +5 -2
- package/template/.flydocs/config.json +1 -1
- package/template/.flydocs/version +1 -1
- package/template/manifest.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -15,7 +15,7 @@ var CLI_VERSION, CLI_NAME, PACKAGE_NAME, POSTHOG_API_KEY;
|
|
|
15
15
|
var init_constants = __esm({
|
|
16
16
|
"src/lib/constants.ts"() {
|
|
17
17
|
"use strict";
|
|
18
|
-
CLI_VERSION = "0.6.0-alpha.
|
|
18
|
+
CLI_VERSION = "0.6.0-alpha.9";
|
|
19
19
|
CLI_NAME = "flydocs";
|
|
20
20
|
PACKAGE_NAME = "@flydocs/cli";
|
|
21
21
|
POSTHOG_API_KEY = "phc_v1MSJTQDFkMS90CBh3mxIz3v8bYCCnKU6v1ir6bz0Xn";
|
package/package.json
CHANGED
|
@@ -35,7 +35,7 @@ All scripts: `python3 .claude/skills/flydocs-cloud/scripts/<script>`
|
|
|
35
35
|
| `comment.py` | `<ref> ["<comment>"] \| stdin` | `{success, commentId}` |
|
|
36
36
|
| `list_issues.py` | `[--status STATUS[,STATUS]] [--active] [--project ID] [--milestone ID] [--assignee STR] [--mine] [--limit N]` | `[{id, identifier, title, status, assignee, priority, dueDate, milestone, milestoneId, milestoneSortOrder, project, projectId}]` |
|
|
37
37
|
| `get_issue.py` | `<ref> [--fields basic\|full]` | `{id, identifier, title, description, status, assignee, priority, estimate, dueDate, milestone, milestoneId, project, projectId, comments[]}` |
|
|
38
|
-
| `assign.py` | `<ref> <assignee
|
|
38
|
+
| `assign.py` | `<ref> <assignee> \| --unassign` | `{success, issue, assignee}` |
|
|
39
39
|
| `update_description.py` | `<ref> --text "..." \| --file PATH \| stdin` | `{success, issue}` |
|
|
40
40
|
|
|
41
41
|
### Extended Scripts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
"""Assign an issue
|
|
2
|
+
"""Assign or unassign an issue via the FlyDocs Relay API."""
|
|
3
3
|
|
|
4
4
|
import sys
|
|
5
5
|
from pathlib import Path
|
|
@@ -7,10 +7,16 @@ from pathlib import Path
|
|
|
7
7
|
sys.path.insert(0, str(Path(__file__).parent))
|
|
8
8
|
from flydocs_api import get_client, output_json, fail
|
|
9
9
|
|
|
10
|
-
if len(sys.argv) <
|
|
11
|
-
fail("Usage: assign.py <ref> <assignee>")
|
|
10
|
+
if len(sys.argv) < 2:
|
|
11
|
+
fail("Usage: assign.py <ref> <assignee> | assign.py <ref> --unassign")
|
|
12
12
|
|
|
13
|
-
ref
|
|
13
|
+
ref = sys.argv[1]
|
|
14
|
+
unassign = "--unassign" in sys.argv
|
|
15
|
+
|
|
16
|
+
if not unassign and len(sys.argv) < 3:
|
|
17
|
+
fail("Usage: assign.py <ref> <assignee> | assign.py <ref> --unassign")
|
|
18
|
+
|
|
19
|
+
assignee = None if unassign else sys.argv[2]
|
|
14
20
|
client = get_client()
|
|
15
21
|
|
|
16
22
|
result = client.post(f"/issues/{ref}/assign", {"assignee": assignee})
|
|
@@ -37,7 +37,7 @@ All scripts: `python3 .claude/skills/flydocs-local/scripts/<script>`
|
|
|
37
37
|
| `comment.py` | `<ref> ["<comment>"] \| stdin` | `{success, commentId}` |
|
|
38
38
|
| `list_issues.py` | `[--status STATUS] [--active] [--assignee STR] [--mine] [--limit N]` | `[{id, identifier, title, status, assignee, priority}]` |
|
|
39
39
|
| `get_issue.py` | `<ref>` | `{id, identifier, title, description, status, assignee, priority, estimate, comments[]}` |
|
|
40
|
-
| `assign.py` | `<ref> <assignee
|
|
40
|
+
| `assign.py` | `<ref> <assignee> \| --unassign` | `{success, issue, assignee}` |
|
|
41
41
|
| `update_description.py` | `<ref> --text "..." \| --file PATH \| stdin` | `{success, issue}` |
|
|
42
42
|
| `status_summary.py` | `[--project ID]` | `{statuses: {STATUS: count}, total}` |
|
|
43
43
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
"""Assign an issue
|
|
2
|
+
"""Assign or unassign an issue."""
|
|
3
3
|
|
|
4
4
|
import json
|
|
5
5
|
import sys
|
|
@@ -8,12 +8,21 @@ from pathlib import Path
|
|
|
8
8
|
sys.path.insert(0, str(Path(__file__).parent))
|
|
9
9
|
from flydocs_api import assign_issue
|
|
10
10
|
|
|
11
|
-
if len(sys.argv) <
|
|
12
|
-
print("Usage: assign.py <ref> <assignee>", file=sys.stderr)
|
|
11
|
+
if len(sys.argv) < 2:
|
|
12
|
+
print("Usage: assign.py <ref> <assignee> | assign.py <ref> --unassign", file=sys.stderr)
|
|
13
13
|
sys.exit(1)
|
|
14
14
|
|
|
15
|
+
ref = sys.argv[1]
|
|
16
|
+
unassign = "--unassign" in sys.argv
|
|
17
|
+
|
|
18
|
+
if not unassign and len(sys.argv) < 3:
|
|
19
|
+
print("Usage: assign.py <ref> <assignee> | assign.py <ref> --unassign", file=sys.stderr)
|
|
20
|
+
sys.exit(1)
|
|
21
|
+
|
|
22
|
+
assignee = None if unassign else sys.argv[2]
|
|
23
|
+
|
|
15
24
|
try:
|
|
16
|
-
result = assign_issue(
|
|
25
|
+
result = assign_issue(ref, assignee)
|
|
17
26
|
print(json.dumps(result))
|
|
18
27
|
except Exception as e:
|
|
19
28
|
print(str(e), file=sys.stderr)
|
|
@@ -236,10 +236,13 @@ def get_issue(ref: str) -> dict:
|
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
|
|
239
|
-
def assign_issue(ref: str, assignee: str) -> dict:
|
|
239
|
+
def assign_issue(ref: str, assignee: str | None) -> dict:
|
|
240
240
|
filepath = _find_issue(ref)
|
|
241
241
|
data = _parse_issue(filepath)
|
|
242
|
-
|
|
242
|
+
if assignee is None:
|
|
243
|
+
data.pop("assignee", None)
|
|
244
|
+
else:
|
|
245
|
+
data["assignee"] = assignee
|
|
243
246
|
data["updated"] = datetime.now().strftime("%Y-%m-%d")
|
|
244
247
|
|
|
245
248
|
fm = {k: v for k, v in data.items() if k not in ("description", "comments", "_path")}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
0.6.0-alpha.
|
|
1
|
+
0.6.0-alpha.9
|
package/template/manifest.json
CHANGED