hyper-pm 0.1.3 → 0.1.5
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 +17 -8
- package/dist/index.cjs +687 -75
- package/dist/main.cjs +687 -75
- package/env.example +5 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -74,9 +74,9 @@ Uses global options only (no subcommand-specific flags).
|
|
|
74
74
|
| `work` | Start work in the primary clone | **Required:** `--id <id>`. **Optional:** `--branch <name>` (default `hyper-pm/<id>`; if that local branch already exists, appends `-2`, `-3`, … to the **whole** preferred name, e.g. `hyper-pm/ticket-1` → `hyper-pm/ticket-1-2`), `--from <ref>` (fork point; default: `refs/remotes/<remote>/HEAD` when present, else `main`, `master`, or `HEAD`). Creates and checks out the new branch, sets the ticket to `in_progress`, and appends the branch to linked branches. Rejects tickets in `done` or `cancelled`. Success JSON includes `branch` and, when a suffix was applied, `branchPreferred`. |
|
|
75
75
|
| `comment` | Append a ticket comment (local event log) | **Required:** `--id <id>`, `--body <text>` (non-empty after trim). Appends `TicketCommentAdded`; `ticket read --id` includes a `comments` array. |
|
|
76
76
|
| `delete` | Soft-delete a ticket | **Required:** `--id <id>` |
|
|
77
|
-
| `import-github` | Import GitHub issues as local tickets | **Optional:** `--dry-run` (list candidates and skips, no JSONL writes), `--story <id>` (attach every imported ticket to this story; must exist), `--state <s>` (`open`, `closed`, or `all`; default `all` — passed to GitHub’s issues list), `--issue <n>` (repeatable or comma-separated; only consider those numbers). Requires `issueMapping: "ticket"` in config. Skips pull requests, issues already linked to a ticket, and issues whose body contains a non-empty `hyper_pm_id` in the JSON fence (live ticket, deleted ticket, or broken reference). Maps title (strips `[hyper-pm]` prefix), description before the first fenced block, closed state → `done`, first assignee, non-reserved labels, and known planning fields from the fence. After a real import, run
|
|
77
|
+
| `import-github` | Import GitHub issues as local tickets | **Optional:** `--dry-run` (list candidates and skips, no JSONL writes), `--story <id>` (attach every imported ticket to this story; must exist), `--state <s>` (`open`, `closed`, or `all`; default `all` — passed to GitHub’s issues list), `--issue <n>` (repeatable or comma-separated; only consider those numbers). Requires `issueMapping: "ticket"` in config. Skips pull requests, issues already linked to a ticket, and issues whose body contains a non-empty `hyper_pm_id` in the JSON fence (live ticket, deleted ticket, or broken reference). Maps title (strips `[hyper-pm]` prefix), description before the first fenced block, closed state → `done`, first assignee, non-reserved labels, and known planning fields from the fence. After a real import, run **`sync --with-github`** once so outbound sync rewrites each GitHub body with the hyper-pm fence. |
|
|
78
78
|
|
|
79
|
-
Tickets store at most one assignee (GitHub login).
|
|
79
|
+
Tickets store at most one assignee (GitHub login). When you run **`sync --with-github`**, outbound updates set that user as the issue’s only assignee (extra assignees on the issue may be removed), and inbound reads the first assignee from the API when the issue has several. Outbound **creates** GitHub issues only for tickets that have a valid epic+story chain; unlinked tickets are skipped until you set `--story`. Tickets that **already** have a linked GitHub issue are still **updated** when unlinked (issue body drops parent ids until you link again).
|
|
80
80
|
|
|
81
81
|
### `repo`
|
|
82
82
|
|
|
@@ -89,15 +89,24 @@ Read-only helpers against the **checked-out repository** (not the hyper-pm data
|
|
|
89
89
|
|
|
90
90
|
### `sync`
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
**Default (no flags):** reconciles the **`hyper-pm-data`** branch over git: `git fetch` of the configured branch on `remote`, `git merge` of `refs/remotes/<remote>/<dataBranch>` when that ref exists (bounded **push retries** on likely non-fast-forward races), then **`git push`**. Does **not** call the GitHub Issues API and does **not** require `GITHUB_TOKEN` or `gh`. Runs even when `sync` is **`off`** in config. JSON includes `gitDataOnly: true` plus **`dataBranchFetch`**, **`dataBranchMerge`**, **`dataBranchPush`**, optional **`dataBranchPushDetail`**, and **`pushAttempts`**. A merge conflict aborts the merge and exits with a user error. Pass **`--skip-push`** to fetch/merge without pushing.
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
**`--with-github`:** additionally runs **GitHub Issues** sync when `sync` is **`outbound`** or **`full`** in config (not when `sync` is **`off`**). **Outbound** sets issue `labels` to `hyper-pm`, `ticket`, plus each ticket label (GitHub’s 50-character label limit applies), and embeds ticket planning in the fenced JSON after the description. **Inbound** (`sync: full`) compares the issue’s non-reserved labels and that fence to the projection and appends `GithubInboundUpdate` when anything differs. With `sync: full`, after inbound it may load linked PR timelines for **`in_progress`** tickets with `Refs` / `Closes` / `Fixes #<n>` in the body (`GithubPrActivity`). Requires **`GITHUB_TOKEN`** **or** `gh auth login`. After GitHub API work, **`hyper-pm` commits on the data branch** using `git -c user.name=… -c user.email=… commit` (same identity resolution as mutations). JSON then includes `githubSync: true` plus **`dataBranchPush`** / optional **`dataBranchPushDetail`** (same push semantics as the default path).
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
| ------------- | -------------------- | -------------------------------- |
|
|
98
|
-
| `--no-github` | Skip GitHub API sync | sync runs when enabled in config |
|
|
96
|
+
**`--skip-network`:** skips **all** sync network work (no git fetch/merge/push, no GitHub). JSON `{ "ok": true, "skipped": true }`. The legacy spelling **`--no-github`** is still accepted (it is normalized to **`--skip-network`** before parsing).
|
|
99
97
|
|
|
100
|
-
|
|
98
|
+
**`--git-data`:** legacy no-op; default behavior is already git-only. If passed, JSON may include `legacyGitDataFlag: true`.
|
|
99
|
+
|
|
100
|
+
For any path that pushes, a missing remote or push error **does not fail the command** for exit code: JSON still has `"ok":true` with **`dataBranchPush`** set to `pushed`, `skipped_no_remote`, `failed`, or (with **`--skip-push`**) `skipped_cli`. Push failures are also written to stderr as a single-line hint.
|
|
101
|
+
|
|
102
|
+
| Option | Description | Default |
|
|
103
|
+
| ---------------- | ------------------------------------------------------------------------ | --------------------------- |
|
|
104
|
+
| `--with-github` | Also run GitHub Issues sync (needs auth; `sync` not `off`) | `false` |
|
|
105
|
+
| `--skip-network` | Skip all sync network operations (git and GitHub); legacy: `--no-github` | `false` |
|
|
106
|
+
| `--git-data` | Legacy; same as default | `false` |
|
|
107
|
+
| `--skip-push` | Skip `git push` of the data branch after sync | `false` (push is attempted) |
|
|
108
|
+
|
|
109
|
+
For a successful push you need a configured remote and credentials that allow `git push` to that remote.
|
|
101
110
|
|
|
102
111
|
### `audit`
|
|
103
112
|
|