pm-github 0.1.0
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/CHANGELOG.md +7 -0
- package/README.md +41 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +160 -0
- package/dist/index.js.map +1 -0
- package/manifest.json +15 -0
- package/package.json +87 -0
package/CHANGELOG.md
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# pm-github
|
|
2
|
+
|
|
3
|
+
GitHub Issues importer for [pm-cli](https://github.com/unbraind/pm-cli).
|
|
4
|
+
|
|
5
|
+
Fetch issues from any public GitHub repo and create pm items. No authentication needed (uses unauthenticated API, 60 req/hr rate limit).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pm install github.com/unbraind/pm-github --global
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Commands
|
|
16
|
+
|
|
17
|
+
### `pm gh-issues import <owner/repo>`
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pm gh-issues import unbraind/pm-cli
|
|
21
|
+
pm gh-issues import unbraind/pm-cli --all
|
|
22
|
+
pm gh-issues import owner/repo --labels bug,enhancement
|
|
23
|
+
pm gh-issues import owner/repo --dry-run
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Flags**
|
|
27
|
+
|
|
28
|
+
| Flag | Type | Description |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| `--all` | boolean | Include closed issues (default: open only) |
|
|
31
|
+
| `--labels <labels>` | string | Comma-separated label filter |
|
|
32
|
+
| `--dry-run` | boolean | Preview without writing |
|
|
33
|
+
| `--type <type>` | string | Override pm item type (default: Issue) |
|
|
34
|
+
|
|
35
|
+
## License
|
|
36
|
+
|
|
37
|
+
MIT
|
|
38
|
+
|
|
39
|
+
## Release Automation
|
|
40
|
+
|
|
41
|
+
This package is release-ready for GitHub, npm, and Bun-compatible installs. CI runs type checking, build, production dependency audit, package packing, Bun install verification, and pm-changelog validation. The daily release workflow publishes only when commits exist after the latest release tag and uses pm-changelog to generate CHANGELOG.md and GitHub release notes.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;kBAqEgB,GAAG;;AAJnB,wBAqIG"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
// pm-github — GitHub Issues importer for pm-cli
|
|
2
|
+
import https from "node:https";
|
|
3
|
+
import { spawnSync } from "node:child_process";
|
|
4
|
+
const defineExtension = ((extension) => extension);
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
// Helpers
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
function fetchJSON(url) {
|
|
9
|
+
return new Promise((resolve, reject) => {
|
|
10
|
+
const req = https.get(url, {
|
|
11
|
+
headers: {
|
|
12
|
+
"User-Agent": "pm-github",
|
|
13
|
+
Accept: "application/vnd.github.v3+json",
|
|
14
|
+
},
|
|
15
|
+
}, (res) => {
|
|
16
|
+
if ((res.statusCode ?? 0) >= 300 && (res.statusCode ?? 0) < 400 && res.headers.location) {
|
|
17
|
+
fetchJSON(res.headers.location).then(resolve, reject);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (res.statusCode !== 200) {
|
|
21
|
+
res.resume();
|
|
22
|
+
reject(new Error(`GitHub API returned HTTP ${res.statusCode}`));
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const chunks = [];
|
|
26
|
+
res.on("data", (c) => chunks.push(c));
|
|
27
|
+
res.on("end", () => resolve(Buffer.concat(chunks).toString("utf-8")));
|
|
28
|
+
});
|
|
29
|
+
req.on("error", reject);
|
|
30
|
+
req.setTimeout(30000, () => { req.destroy(); reject(new Error("timeout")); });
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function mapState(state) {
|
|
34
|
+
return state === "closed" ? "closed" : "open";
|
|
35
|
+
}
|
|
36
|
+
// ---------------------------------------------------------------------------
|
|
37
|
+
// Extension
|
|
38
|
+
// ---------------------------------------------------------------------------
|
|
39
|
+
export default defineExtension({
|
|
40
|
+
name: "pm-github",
|
|
41
|
+
version: "0.1.0",
|
|
42
|
+
activate(api) {
|
|
43
|
+
// -----------------------------------------------------------------------
|
|
44
|
+
// Command: pm gh-issues import <owner/repo>
|
|
45
|
+
// -----------------------------------------------------------------------
|
|
46
|
+
api.registerCommand({
|
|
47
|
+
name: "gh-issues import",
|
|
48
|
+
description: "Fetch GitHub issues from a repo and create pm items. " +
|
|
49
|
+
"Skips pull requests by default. Uses unauthenticated API (rate-limited to 60 req/hr).",
|
|
50
|
+
intent: "import GitHub issues as pm items",
|
|
51
|
+
examples: [
|
|
52
|
+
"pm gh-issues import unbraind/pm-cli",
|
|
53
|
+
"pm gh-issues import unbraind/pm-cli --all",
|
|
54
|
+
"pm gh-issues import unbraind/pm-cli --labels bug,enhancement",
|
|
55
|
+
"pm gh-issues import owner/repo --dry-run",
|
|
56
|
+
],
|
|
57
|
+
flags: [
|
|
58
|
+
{ long: "--all", description: "Include closed issues (default: open only)" },
|
|
59
|
+
{ long: "--labels", value_name: "labels", description: "Comma-separated label filter" },
|
|
60
|
+
{ long: "--dry-run", description: "Preview without writing" },
|
|
61
|
+
{ long: "--type", value_name: "type", description: "Override pm item type (default: Issue)" },
|
|
62
|
+
],
|
|
63
|
+
async run(ctx) {
|
|
64
|
+
const repoArg = ctx.args[0];
|
|
65
|
+
if (!repoArg || !repoArg.includes("/")) {
|
|
66
|
+
console.error("Usage: pm gh-issues import <owner/repo> [--all] [--labels bug,enhancement]");
|
|
67
|
+
return { error: "Expected owner/repo argument" };
|
|
68
|
+
}
|
|
69
|
+
const includeAll = Boolean(ctx.options["all"]);
|
|
70
|
+
const labelsFilter = ctx.options["labels"];
|
|
71
|
+
const dryRun = Boolean(ctx.options["dry-run"]);
|
|
72
|
+
const itemType = ctx.options["type"] || "Issue";
|
|
73
|
+
const state = includeAll ? "all" : "open";
|
|
74
|
+
let url = `https://api.github.com/repos/${repoArg}/issues?state=${state}&per_page=100`;
|
|
75
|
+
if (labelsFilter) {
|
|
76
|
+
url += `&labels=${encodeURIComponent(labelsFilter)}`;
|
|
77
|
+
}
|
|
78
|
+
console.error(`Fetching issues from ${repoArg}…`);
|
|
79
|
+
let raw;
|
|
80
|
+
try {
|
|
81
|
+
raw = await fetchJSON(url);
|
|
82
|
+
}
|
|
83
|
+
catch (err) {
|
|
84
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
85
|
+
console.error(`Failed to fetch: ${msg}`);
|
|
86
|
+
return { error: msg };
|
|
87
|
+
}
|
|
88
|
+
let issues;
|
|
89
|
+
try {
|
|
90
|
+
issues = JSON.parse(raw);
|
|
91
|
+
}
|
|
92
|
+
catch {
|
|
93
|
+
console.error("Invalid JSON response from GitHub.");
|
|
94
|
+
return { error: "Invalid GitHub API response" };
|
|
95
|
+
}
|
|
96
|
+
// Filter out PRs
|
|
97
|
+
const filtered = issues.filter((i) => !i.pull_request);
|
|
98
|
+
if (filtered.length === 0) {
|
|
99
|
+
console.error("No issues found.");
|
|
100
|
+
return { imported: 0, skipped: 0 };
|
|
101
|
+
}
|
|
102
|
+
console.error(`Found ${filtered.length} issue(s).`);
|
|
103
|
+
let imported = 0;
|
|
104
|
+
let skipped = 0;
|
|
105
|
+
for (const issue of filtered) {
|
|
106
|
+
const title = issue.title.trim();
|
|
107
|
+
if (!title) {
|
|
108
|
+
skipped++;
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
const tags = issue.labels.map((l) => l.name);
|
|
112
|
+
const status = mapState(issue.state);
|
|
113
|
+
const body = issue.body || "";
|
|
114
|
+
const description = `GH #${issue.number}: ${issue.html_url}`;
|
|
115
|
+
const assignee = issue.assignee?.login;
|
|
116
|
+
const milestone = issue.milestone?.title;
|
|
117
|
+
if (dryRun) {
|
|
118
|
+
console.error(` [dry-run] #${issue.number} ${title} (${status}, ${tags.join(",")})`);
|
|
119
|
+
imported++;
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
try {
|
|
123
|
+
const spawnArgs = [
|
|
124
|
+
"--path", ctx.pm_root,
|
|
125
|
+
"create",
|
|
126
|
+
"--title", title,
|
|
127
|
+
"--type", itemType,
|
|
128
|
+
"--status", status,
|
|
129
|
+
"--description", description,
|
|
130
|
+
"--body", body,
|
|
131
|
+
"--tags", tags.join(","),
|
|
132
|
+
"--message", `Imported from GitHub #${issue.number}`,
|
|
133
|
+
];
|
|
134
|
+
if (assignee)
|
|
135
|
+
spawnArgs.push("--assignee", assignee);
|
|
136
|
+
if (milestone)
|
|
137
|
+
spawnArgs.push("--sprint", milestone);
|
|
138
|
+
const result = spawnSync("pm", spawnArgs, { encoding: "utf-8" });
|
|
139
|
+
if (result.status !== 0) {
|
|
140
|
+
throw new Error(result.stderr || "pm create failed");
|
|
141
|
+
}
|
|
142
|
+
imported++;
|
|
143
|
+
}
|
|
144
|
+
catch (err) {
|
|
145
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
146
|
+
console.error(`#${issue.number}: create failed — ${msg}`);
|
|
147
|
+
skipped++;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
if (dryRun) {
|
|
151
|
+
console.error(`[dry-run] Would import ${imported}, skip ${skipped}.`);
|
|
152
|
+
return { dryRun: true, wouldImport: imported, wouldSkip: skipped };
|
|
153
|
+
}
|
|
154
|
+
console.error(`Imported ${imported} issue(s), skipped ${skipped}.`);
|
|
155
|
+
return { imported, skipped };
|
|
156
|
+
},
|
|
157
|
+
});
|
|
158
|
+
},
|
|
159
|
+
});
|
|
160
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"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CAAC,MAAM,CAAC,MAAM,IAAI,kBAAkB,CAAC,CAAC;wBACvD,CAAC;wBACD,QAAQ,EAAE,CAAC;oBACb,CAAC;oBAAC,OAAO,GAAY,EAAE,CAAC;wBACtB,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;wBAC7D,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC,CAAC;wBAC1D,OAAO,EAAE,CAAC;oBACZ,CAAC;gBACH,CAAC;gBAED,IAAI,MAAM,EAAE,CAAC;oBACX,OAAO,CAAC,KAAK,CAAC,0BAA0B,QAAQ,UAAU,OAAO,GAAG,CAAC,CAAC;oBACtE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;gBACrE,CAAC;gBAED,OAAO,CAAC,KAAK,CAAC,YAAY,QAAQ,sBAAsB,OAAO,GAAG,CAAC,CAAC;gBACpE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;YAC/B,CAAC;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC"}
|
package/manifest.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pm-github",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "GitHub Issues importer. Fetches open (or all) issues from a GitHub repo and creates pm items.",
|
|
5
|
+
"author": "@unbraind",
|
|
6
|
+
"entry": "./dist/index.js",
|
|
7
|
+
"priority": 50,
|
|
8
|
+
"capabilities": [
|
|
9
|
+
"commands",
|
|
10
|
+
"schema"
|
|
11
|
+
],
|
|
12
|
+
"pm": {
|
|
13
|
+
"compatibility": "v2"
|
|
14
|
+
}
|
|
15
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pm-github",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "GitHub Issues importer extension for pm-cli",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/unbraind/pm-github.git"
|
|
8
|
+
},
|
|
9
|
+
"bugs": {
|
|
10
|
+
"url": "https://github.com/unbraind/pm-github/issues"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/unbraind/pm-github#readme",
|
|
13
|
+
"type": "module",
|
|
14
|
+
"main": "dist/index.js",
|
|
15
|
+
"types": "dist/index.d.ts",
|
|
16
|
+
"files": [
|
|
17
|
+
"dist/",
|
|
18
|
+
"manifest.json",
|
|
19
|
+
"README.md",
|
|
20
|
+
"CHANGELOG.md"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsc",
|
|
24
|
+
"prepack": "npm run build",
|
|
25
|
+
"typecheck": "tsc --noEmit",
|
|
26
|
+
"check": "npm run typecheck",
|
|
27
|
+
"audit:prod": "npm audit --omit=dev",
|
|
28
|
+
"pack:dry-run": "npm pack --dry-run",
|
|
29
|
+
"changelog": "pm-changelog --pm-root .agents/pm --mode prepend --output CHANGELOG.md --release-version-from-package --since-previous-tag --until-release-tag --item-url-base https://github.com/unbraind/pm-github/blob/main/.agents/pm",
|
|
30
|
+
"changelog:full": "pm-changelog --pm-root .agents/pm --mode replace --output CHANGELOG.md --all-release-tags --release-version-from-package --item-url-base https://github.com/unbraind/pm-github/blob/main/.agents/pm",
|
|
31
|
+
"changelog:check": "pm-changelog --pm-root .agents/pm --mode replace --output CHANGELOG.md --all-release-tags --release-version-from-package --item-url-base https://github.com/unbraind/pm-github/blob/main/.agents/pm --check",
|
|
32
|
+
"release:check": "npm run typecheck && npm run build && npm run audit:prod && npm run pack:dry-run && npm run changelog:check"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"@unbrained/pm-cli": ">=2026.5.24"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@unbrained/pm-cli": "^2026.5.24",
|
|
39
|
+
"typescript": "^6.0.3",
|
|
40
|
+
"pm-changelog": "^2026.5.25",
|
|
41
|
+
"@types/node": "^25.9.1"
|
|
42
|
+
},
|
|
43
|
+
"keywords": [
|
|
44
|
+
"github",
|
|
45
|
+
"importer",
|
|
46
|
+
"issues",
|
|
47
|
+
"pm-cli",
|
|
48
|
+
"pm-extension",
|
|
49
|
+
"pm-package"
|
|
50
|
+
],
|
|
51
|
+
"license": "MIT",
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": ">=20.0.0"
|
|
54
|
+
},
|
|
55
|
+
"author": "@unbraind",
|
|
56
|
+
"pm": {
|
|
57
|
+
"aliases": [
|
|
58
|
+
"github"
|
|
59
|
+
],
|
|
60
|
+
"extensions": [
|
|
61
|
+
"."
|
|
62
|
+
],
|
|
63
|
+
"catalog": {
|
|
64
|
+
"display_name": "GitHub Issues Importer",
|
|
65
|
+
"category": "sync",
|
|
66
|
+
"summary": "GitHub Issues importer extension for pm-cli",
|
|
67
|
+
"tags": [
|
|
68
|
+
"github",
|
|
69
|
+
"issues",
|
|
70
|
+
"import"
|
|
71
|
+
],
|
|
72
|
+
"links": {
|
|
73
|
+
"docs": "https://github.com/unbraind/pm-github#readme",
|
|
74
|
+
"npm": "https://www.npmjs.com/package/pm-github",
|
|
75
|
+
"repository": "https://github.com/unbraind/pm-github",
|
|
76
|
+
"report": "https://github.com/unbraind/pm-github/issues"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"docs": [
|
|
80
|
+
"README.md",
|
|
81
|
+
"CHANGELOG.md"
|
|
82
|
+
],
|
|
83
|
+
"examples": [
|
|
84
|
+
"README.md"
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
}
|