@brunyee-studio/onus-cli 2.29.0 → 2.30.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brunyee-studio/onus-cli",
3
- "version": "2.29.0",
3
+ "version": "2.30.0",
4
4
  "description": "Official CLI and TypeScript SDK for Onus issue tracking platform",
5
5
  "keywords": [
6
6
  "agent",
@@ -145,24 +145,34 @@ onus dsn create --team ONUS --label ci # prints the full secret exactly once
145
145
  ## Pull requests and issues
146
146
 
147
147
  Linking a PR to an issue means **the issue is auto-closed when the PR merges** —
148
- there is no "related" link type. How links are created:
149
-
150
- - **Auto-linking is GitHub-style.** The integration scans the PR title, body,
151
- and branch name for `KEY-123` refs introduced by a closing keyword —
152
- `Fixes` / `Closes` / `Resolves` (case-insensitive, optional colon, comma/
153
- `and` lists). A plain prose mention of an issue ID does NOT link and never
154
- auto-closes, so avoid writing bare issue IDs in PR text: use the issue's
155
- name or its Onus URL instead.
156
- - **Manual linking is deliberate.** `onus issue link-pr` creates a bot link
157
- that survives body edits and closes on merge — use it when the PR fully
158
- resolves an issue but its text has no closing keyword.
159
- - **Only link PRs that actually fix/close the issue.** If a PR merely touches
160
- related code, discusses the issue, or implements part of it without completing
161
- it, do NOT link it (no keyword in the PR text, no `link-pr`). Use a relation
162
- (`onus issue relation add … --type related`) or a comment mention instead.
163
- - Never guess or assume: before linking, verify the PR's changes fully resolve
164
- the issue (e.g. you implemented the fix in that PR, or the PR description
165
- says "Fixes ONUS-42").
148
+ there is no "related" link type.
149
+
150
+ **Always link manually with `onus issue link-pr`. Never rely on the fix
151
+ keyword.** The integration also scans the PR title, body, and branch name for
152
+ `KEY-123` refs introduced by a closing keyword (`Fixes` / `Closes` /
153
+ `Resolves` — case-insensitive, optional colon, comma/`and` lists), but agents
154
+ must never depend on that scan and must never write a closing keyword before
155
+ an Onus issue ref in PR text or a branch name. Reference issues in PR text by
156
+ name or their Onus URL, never as bare issue IDs.
157
+
158
+ Required PR flow, in order:
159
+
160
+ 1. **Create the PR** (push the branch, open the PR with `gh`).
161
+ 2. **Determine whether the PR closes the issue.** It closes the issue only if
162
+ the PR fully resolves it — you implemented the whole fix in that PR. A PR
163
+ that merely touches related code, discusses the issue, or implements part
164
+ of it without completing it does not close it.
165
+ 3. **Link it.** If (and only if) step 2 says yes, run:
166
+
167
+ ```bash
168
+ onus issue link-pr <ref> --repo owner/repo --pr <number> --json
169
+ ```
170
+
171
+ The bot link survives PR-body edits and closes the issue on merge. If the
172
+ PR does not close the issue, leave it unlinked — use a relation
173
+ (`onus issue relation add … --type related`) or a comment mention instead.
174
+
175
+ - Never guess or assume: link only issues you know the PR fully resolves.
166
176
  - Link at most once per PR per issue; don't spam links across partially-related
167
177
  issues.
168
178