Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

Commit

g1t work: the workspace's work items in the CLI

g1t issue is gone: g1t work list, view, new, comment, edit, close, reopen, link and unlink work on the current repository's workspace or --workspace, and print {site}/{workspace}/-/work/{n}. work view is the whole work context (was work context), work status the claims and sessions here (was work list), and --item replaces --issue on pr create, session start, touch, list and attach and work events. The CLI is 0.4.0, as the Claude Code plugin's hooks ask.

G1T-Session:
ses_01m566353xebrscb7pf471bnn1
syntaqxcommitted Parent85864e4Browse files
24 files+2016−16620/24 viewed
+1−1
13961396
13971397 [[package]]
13981398 name = "g1t"
1399−version = "0.3.7"
1399+version = "0.4.0"
14001400 dependencies = [
14011401 "anstyle-query",
14021402 "base64 0.22.1",
+231−198
243243
244244 Calls [`detach_fork`](/reference/api/repositories/detach-fork/).
245245
246−## g1t issue
247−
248−Issues: list, view, create, comment, close, reopen, edit.
249−
250−### g1t issue list
251−
252−List issues.
253−
254−```text
255−g1t issue list [OPTIONS]
256−```
257−
258−| Argument or flag | |
259−| --- | --- |
260−| `-s, --state <STATE>` | One of `open`, `closed`, `all`. Default: `open`. |
261−| `-l, --label <LABEL>` | Only issues with this label. |
262−| `-m, --milestone <MILESTONE>` | Only issues in the milestone of this number. |
263−| `-a, --assignee <ASSIGNEE>` | Only issues assigned to this person (@me for you). |
264−| `-A, --author <AUTHOR>` | Only issues opened by this person (@me for you). |
265−| `-L, --limit <LIMIT>` | Default: `20`. |
266−
267−Calls [`list_issues`](/reference/api/issues/list-issues/).
268−
269−### g1t issue view
270−
271−Show an issue, with its comments.
272−
273−```text
274−g1t issue view [OPTIONS] <NUMBER>
275−```
276−
277−| Argument or flag | |
278−| --- | --- |
279−| `<NUMBER>` | The issue's number. |
280−| `-c, --comments` | Show its comments too. |
281−| `-w, --web` | Open it in the browser. |
282−
283−Calls [`get_issue`](/reference/api/issues/get-issue/).
284−
285−### g1t issue create
286−
287−Open an issue.
288−
289−```text
290−g1t issue create [OPTIONS]
291−```
292−
293−| Argument or flag | |
294−| --- | --- |
295−| `-t, --title <TITLE>` | |
296−| `-b, --body <BODY>` | The text. Markdown. |
297−| `-F, --body-file <FILE>` | Read the text from a file, or - for stdin. |
298−| `--attach <FILE>` | An image to show after the text (PNG, JPEG, GIF or WebP, at most 10 MB): uploaded, and its Markdown added. Repeat for more. |
299−| `-l, --label <LABEL>` | A label; repeat for more. |
300−| `-a, --assignee <ASSIGNEE>` | Someone to assign; repeat for more (@me for you). |
301−| `-m, --milestone <MILESTONE>` | A milestone's number. |
302−| `-w, --web` | Open the new-issue page in the browser instead. |
303−
304−Calls [`create_issue`](/reference/api/issues/create-issue/), [`update_issue`](/reference/api/issues/update-issue/), [`upload_attachment`](/reference/api/issues/upload-attachment/).
305−
306−### g1t issue comment
307−
308−Comment on an issue.
309−
310−```text
311−g1t issue comment [OPTIONS] [NUMBER]
312−```
313−
314−| Argument or flag | |
315−| --- | --- |
316−| `[NUMBER]` | The number; for a pull request, the current branch's when left out. |
317−| `-b, --body <BODY>` | The text. Markdown. |
318−| `-F, --body-file <FILE>` | Read the text from a file, or - for stdin. |
319−| `--attach <FILE>` | An image to show after the text (PNG, JPEG, GIF or WebP, at most 10 MB): uploaded, and its Markdown added. Repeat for more. |
320−
321−Calls [`add_comment`](/reference/api/issues/add-comment/), [`upload_attachment`](/reference/api/issues/upload-attachment/).
322−
323−### g1t issue close
324−
325−Close an issue.
326−
327−```text
328−g1t issue close [OPTIONS] <NUMBER>
329−```
330−
331−| Argument or flag | |
332−| --- | --- |
333−| `<NUMBER>` | |
334−| `-r, --reason <REASON>` | One of `completed`, `not_planned`. |
335−| `-c, --comment <COMMENT>` | Leave a comment as it closes. |
336−| `--commit <COMMIT>` | The commit on the default branch that closed it: its message names the issue after a closing keyword (Fixes #12). Its full hash. |
337−
338−Calls [`close_issue`](/reference/api/issues/close-issue/), [`add_comment`](/reference/api/issues/add-comment/).
339−
340−### g1t issue reopen
341−
342−Reopen an issue.
343−
344−```text
345−g1t issue reopen [OPTIONS] <NUMBER>
346−```
347−
348−| Argument or flag | |
349−| --- | --- |
350−| `<NUMBER>` | |
351−| `-c, --comment <COMMENT>` | Leave a comment as it reopens. |
352−
353−Calls [`reopen_issue`](/reference/api/issues/reopen-issue/), [`add_comment`](/reference/api/issues/add-comment/).
354−
355−### g1t issue edit
356−
357−Change an issue's title, body, labels, assignees or milestone.
358−
359−```text
360−g1t issue edit [OPTIONS] <NUMBER>
361−```
362−
363−| Argument or flag | |
364−| --- | --- |
365−| `<NUMBER>` | |
366−| `-t, --title <TITLE>` | |
367−| `-b, --body <BODY>` | The text. Markdown. |
368−| `-F, --body-file <FILE>` | Read the text from a file, or - for stdin. |
369−| `--add-label <LABEL>` | |
370−| `--remove-label <LABEL>` | |
371−| `--add-assignee <LOGIN>` | |
372−| `--remove-assignee <LOGIN>` | |
373−| `-m, --milestone <MILESTONE>` | A milestone's number. |
374−| `--remove-milestone` | Take it out of its milestone. |
375−
376−Calls [`update_issue`](/reference/api/issues/update-issue/), [`get_issue`](/reference/api/issues/get-issue/).
377−
378246 ## g1t pr
379247
380248 Pull requests: list, view, create, check out, diff, checks, review, merge.
416284
417285 ### g1t pr create
418286
419−Open a pull request from a branch, or start one for an issue.
287+Open a pull request from a branch, or start one for a work item.
420288
421289 ```text
422290 g1t pr create [OPTIONS]
430298 | `--attach <FILE>` | An image to show after the text (PNG, JPEG, GIF or WebP, at most 10 MB): uploaded, and its Markdown added. Repeat for more. |
431299 | `-B, --base <BASE>` | The branch to merge into; the default branch when left out. |
432300 | `-H, --head <HEAD>` | The branch with the changes; the current one when left out. |
433−| `-i, --issue <ISSUE>` | The issue it is for. Without a branch, starts a draft in a working copy of its own. |
301+| `-i, --item <ITEM>` | The work item it is for, by its number in the workspace. Without a branch, starts a draft in a working copy of its own. |
434302 | `-f, --fill` | Take the title and body from the branch's commits. |
435303 | `-d, --draft` | Open it as a draft. |
436304 | `--no-push` | Do not push the branch first. |
437305 | `--head-repo <OWNER/NAME>` | The fork, OWNER/NAME, that holds the branch. In a clone of your fork (origin) whose upstream is the repository, origin when left out. |
438306
439−Calls [`create_pull_request`](/reference/api/pull-requests/create-pull-request/), [`get_repo`](/reference/api/repositories/get-repo/), [`convert_pull_request_to_draft`](/reference/api/pull-requests/convert-pull-request-to-draft/), [`upload_attachment`](/reference/api/issues/upload-attachment/).
307+Calls [`create_pull_request`](/reference/api/pull-requests/create-pull-request/), [`get_repo`](/reference/api/repositories/get-repo/), [`convert_pull_request_to_draft`](/reference/api/pull-requests/convert-pull-request-to-draft/), [`upload_attachment`](/reference/api/work-items/upload-attachment/).
440308
441309 ### g1t pr checkout
442310
504372 | `-b, --body <BODY>` | The text. Markdown. |
505373 | `-F, --body-file <FILE>` | Read the text from a file, or - for stdin. |
506374
507−Calls [`review_pull_request`](/reference/api/pull-requests/review-pull-request/), [`add_comment`](/reference/api/issues/add-comment/).
375+Calls [`review_pull_request`](/reference/api/pull-requests/review-pull-request/), [`add_comment`](/reference/api/pull-requests/add-comment/).
508376
509377 ### g1t pr merge
510378
526394 | `-F, --body-file <FILE>` | Read the text from a file, or - for stdin. |
527395 | `--auto` | Merge on its own once its checks, reviews and rules allow. |
528396 | `--disable-auto` | Turn its auto-merge off. |
529−| `--keep-issue-open` | Leave the issue it is for open. |
397+| `--keep-item-open` | Do not land the work item it is for: it is only part of the work. |
530398 | `--admin` | Merge past failing required checks and rules (needs the Admin role). |
531399 | `-d, --delete-branch` | Delete its branch once merged, and the local branch. The repository's setting when left out. |
532400 | `--keep-branch` | Keep its branch, whatever the repository's setting. |
564432 | `--attach <FILE>` | An image to show after the summary (PNG, JPEG, GIF or WebP, at most 10 MB): uploaded, and its Markdown added. Repeat for more. |
565433 | `--undo` | Turn it back into a draft. |
566434
567−Calls [`mark_pull_request_ready`](/reference/api/pull-requests/mark-pull-request-ready/), [`convert_pull_request_to_draft`](/reference/api/pull-requests/convert-pull-request-to-draft/), [`upload_attachment`](/reference/api/issues/upload-attachment/).
435+Calls [`mark_pull_request_ready`](/reference/api/pull-requests/mark-pull-request-ready/), [`convert_pull_request_to_draft`](/reference/api/pull-requests/convert-pull-request-to-draft/), [`upload_attachment`](/reference/api/work-items/upload-attachment/).
568436
569437 ### g1t pr comment
570438
576444
577445 | Argument or flag | |
578446 | --- | --- |
579−| `[NUMBER]` | The number; for a pull request, the current branch's when left out. |
447+| `[NUMBER]` | The pull request's number; the current branch's when left out. |
580448 | `-b, --body <BODY>` | The text. Markdown. |
581449 | `-F, --body-file <FILE>` | Read the text from a file, or - for stdin. |
582450 | `--attach <FILE>` | An image to show after the text (PNG, JPEG, GIF or WebP, at most 10 MB): uploaded, and its Markdown added. Repeat for more. |
583451
584−Calls [`add_comment`](/reference/api/issues/add-comment/), [`upload_attachment`](/reference/api/issues/upload-attachment/).
452+Calls [`add_comment`](/reference/api/pull-requests/add-comment/), [`upload_attachment`](/reference/api/work-items/upload-attachment/).
585453
586454 ### g1t pr close
587455
1021889
1022890 ## g1t status
1023891
1024−What needs you: your pull requests, reviews asked of you, your issues, failing checks, and your sessions and claims here.
892+What needs you: your pull requests, reviews asked of you, failing checks, and your sessions and claims here.
1025893
1026894 ```text
1027895 g1t status [OPTIONS]
1028896 ```
1029897
1030−Calls [`search`](/reference/api/search/search/), [`list_notifications`](/reference/api/notifications/list-notifications/), [`get_pull_request`](/reference/api/pull-requests/get-pull-request/), [`list_sessions`](/reference/api/sessions/list-sessions/), [`list_claims`](/reference/api/claims-and-work/list-claims/).
898+Calls [`search`](/reference/api/search/search/), [`list_notifications`](/reference/api/notifications/list-notifications/), [`get_pull_request`](/reference/api/pull-requests/get-pull-request/), [`list_sessions`](/reference/api/sessions/list-sessions/), [`list_claims`](/reference/api/work-items/list-claims/).
1031899
1032900 ## g1t session
1033901
1043911
1044912 | Argument or flag | |
1045913 | --- | --- |
1046−| `-i, --issue <ISSUE>` | The issue it works on. |
914+| `-i, --item <ITEM>` | The work item it works on, by its number in the workspace. |
1047915 | `-p, --pull <PULL>` | The pull request it works on. |
1048916 | `--harness <HARNESS>` | The harness running it. One of `claude_code`, `codex`, `cursor`, `copilot`, `other`. Default: `other`. |
1049917 | `--harness-session-id <ID>` | The harness's own id for the run, which makes starting again return the same session. |
1092960
1093961 ### g1t session attach
1094962
1095−Attach the current session to an issue, a pull request or a branch, or give it a title.
963+Attach the current session to a work item, a pull request or a branch, or give it a title.
1096964
1097965 ```text
1098−g1t session attach [OPTIONS] <--issue <ISSUE>|--pull <PULL>|--branch <BRANCH>|--head-commit <SHA>|--title <TITLE>>
966+g1t session attach [OPTIONS] <--item <ITEM>|--pull <PULL>|--branch <BRANCH>|--head-commit <SHA>|--title <TITLE>>
1099967 ```
1100968
1101969 | Argument or flag | |
1102970 | --- | --- |
1103−| `-i, --issue <ISSUE>` | |
971+| `-i, --item <ITEM>` | A work item, by its number in the workspace. |
1104972 | `-p, --pull <PULL>` | |
1105973 | `-b, --branch <BRANCH>` | |
1106974 | `--head-commit <SHA>` | The commit it pushed last. |
11341002 | Argument or flag | |
11351003 | --- | --- |
11361004 | `-s, --state <STATE>` | Only sessions in this state. One of `active`, `idle`, `ended`. |
1137−| `-i, --issue <ISSUE>` | |
1005+| `-i, --item <ITEM>` | Only sessions on this work item. |
11381006 | `-p, --pull <PULL>` | |
11391007 | `-L, --limit <LIMIT>` | Default: `20`. |
11401008 | `--path <PATH>` | Only sessions that touched this file, or any under it when it ends in /. |
11941062
11951063 ### g1t session touch
11961064
1197−Say what the current session touched: files, commits, branches, pull requests, issues.
1065+Say what the current session touched: files, commits, branches, pull requests, work items.
11981066
11991067 ```text
1200−g1t session touch [OPTIONS] <--file <FILE>|--commit <COMMIT>|--branch <BRANCH>|--pull <PULL>|--issue <ISSUE>>
1068+g1t session touch [OPTIONS] <--file <FILE>|--commit <COMMIT>|--branch <BRANCH>|--pull <PULL>|--item <ITEM>>
12011069 ```
12021070
12031071 | Argument or flag | |
12061074 | `--commit <COMMIT>` | A commit it made. |
12071075 | `--branch <BRANCH>` | A branch it pushed. |
12081076 | `--pull <PULL>` | A pull request it opened. |
1209−| `--issue <ISSUE>` | An issue it named. |
1077+| `--item <ITEM>` | A work item it named, by its number in the workspace. |
12101078
12111079 ```text
12121080 Each is kept once. A file another active session touched too (a sibling subagent's included)
1213−is an overlap.detected event for both. Pull requests and issues tie the session to them.
1081+is an overlap.detected event for both. Pull requests and work items tie the session to them.
12141082 ```
12151083
12161084 Calls [`record_session_entries`](/reference/api/sessions/record-session-entries/).
12171085
12181086 ## g1t work
12191087
1220−Coordinate work on issues: context, claims, hand-offs, dependencies, events.
1088+Work items: list, view, open, edit, link, close; claims, hand-offs, dependencies, events.
12211089
1222−### g1t work context
1090+### g1t work list
12231091
1224−Everything about an issue's work: claims, sessions, pull requests, dependencies, decisions.
1092+List the workspace's work items; with --repo, those linked to that repository.
12251093
12261094 ```text
1227−g1t work context [OPTIONS] <NUMBER>
1095+g1t work list [OPTIONS]
12281096 ```
12291097
12301098 | Argument or flag | |
12311099 | --- | --- |
1232−| `<NUMBER>` | The issue's number. |
1100+| `-s, --state <STATE>` | One of `open`, `closed`, `all`. Default: `open`. |
1101+| `-l, --label <LABEL>` | Only work items with this label. |
1102+| `-m, --milestone <MILESTONE>` | Only work items in the workspace milestone of this number. |
1103+| `-a, --assignee <ASSIGNEE>` | Only work items assigned to this person (@me for you). |
1104+| `-A, --author <AUTHOR>` | Only work items opened by this person (@me for you). |
1105+| `--role <ROLE>` | With --repo: only those linked to it this way. One of `origin`, `target`, `touched`. |
1106+| `-L, --limit <LIMIT>` | Default: `20`. |
12331107
1234−Calls [`get_work`](/reference/api/claims-and-work/get-work/).
1108+Calls [`list_work_items`](/reference/api/work-items/list-work-items/).
12351109
1110+### g1t work view
1111+
1112+Show a work item with everything about its work: repositories and what landed, claims, sessions, pull requests, what it waits on, decisions.
1113+
1114+```text
1115+g1t work view [OPTIONS] <NUMBER>
1116+```
1117+
1118+| Argument or flag | |
1119+| --- | --- |
1120+| `<NUMBER>` | The work item's number. |
1121+| `-c, --comments` | Show its comments too. |
1122+| `-w, --web` | Open it in the browser. |
1123+
1124+Calls [`get_work`](/reference/api/work-items/get-work/), [`get_work_item`](/reference/api/work-items/get-work-item/).
1125+
1126+### g1t work new
1127+
1128+Open a work item, with the current repository as its origin.
1129+
1130+```text
1131+g1t work new [OPTIONS]
1132+```
1133+
1134+| Argument or flag | |
1135+| --- | --- |
1136+| `-t, --title <TITLE>` | |
1137+| `-b, --body <BODY>` | The text. Markdown. |
1138+| `-F, --body-file <FILE>` | Read the text from a file, or - for stdin. |
1139+| `--attach <FILE>` | An image to show after the text (PNG, JPEG, GIF or WebP, at most 10 MB): uploaded, and its Markdown added. Repeat for more. |
1140+| `--target <OWNER/NAME>` | A repository of the workspace where the work is meant to land, OWNER/NAME; repeat for more. |
1141+| `-l, --label <LABEL>` | A label; repeat for more. |
1142+| `-a, --assignee <ASSIGNEE>` | Someone to assign; repeat for more (@me for you). |
1143+| `-m, --milestone <MILESTONE>` | A workspace milestone's number. |
1144+| `-w, --web` | Open the new work item page in the browser instead. |
1145+
1146+```text
1147+In a repository, the work item is filed from it (its origin). With --workspace and no
1148+repository of that workspace here, it is filed in the workspace alone. --target names a repository
1149+where the work is meant to land; repeat it for more.
1150+Examples:
1151+ g1t work new --title "Sign-in times out on slow networks" --body "..."
1152+ g1t work new --title "Rename the flag" --target acme/api --target acme/docs
1153+```
1154+
1155+Calls [`open_work_item`](/reference/api/work-items/open-work-item/), [`update_work_item`](/reference/api/work-items/update-work-item/), [`upload_attachment`](/reference/api/work-items/upload-attachment/).
1156+
1157+### g1t work comment
1158+
1159+Comment on a work item.
1160+
1161+```text
1162+g1t work comment [OPTIONS] <NUMBER>
1163+```
1164+
1165+| Argument or flag | |
1166+| --- | --- |
1167+| `<NUMBER>` | The work item's number. |
1168+| `-b, --body <BODY>` | The text. Markdown. |
1169+| `-F, --body-file <FILE>` | Read the text from a file, or - for stdin. |
1170+| `--attach <FILE>` | An image to show after the text (PNG, JPEG, GIF or WebP, at most 10 MB): uploaded, and its Markdown added. Repeat for more. |
1171+
1172+Calls [`add_work_item_comment`](/reference/api/work-items/add-work-item-comment/), [`upload_attachment`](/reference/api/work-items/upload-attachment/).
1173+
1174+### g1t work edit
1175+
1176+Change a work item's title, body, labels, assignees or milestone.
1177+
1178+```text
1179+g1t work edit [OPTIONS] <NUMBER>
1180+```
1181+
1182+| Argument or flag | |
1183+| --- | --- |
1184+| `<NUMBER>` | |
1185+| `-t, --title <TITLE>` | |
1186+| `-b, --body <BODY>` | The text. Markdown. |
1187+| `-F, --body-file <FILE>` | Read the text from a file, or - for stdin. |
1188+| `--add-label <LABEL>` | |
1189+| `--remove-label <LABEL>` | |
1190+| `--add-assignee <LOGIN>` | |
1191+| `--remove-assignee <LOGIN>` | |
1192+| `-m, --milestone <MILESTONE>` | A workspace milestone's number. |
1193+| `--remove-milestone` | Take it out of its milestone. |
1194+
1195+Calls [`update_work_item`](/reference/api/work-items/update-work-item/), [`get_work_item`](/reference/api/work-items/get-work-item/).
1196+
1197+### g1t work close
1198+
1199+Close a work item.
1200+
1201+```text
1202+g1t work close [OPTIONS] <NUMBER>
1203+```
1204+
1205+| Argument or flag | |
1206+| --- | --- |
1207+| `<NUMBER>` | |
1208+| `-r, --reason <REASON>` | One of `completed`, `not_planned`. |
1209+| `-c, --comment <COMMENT>` | Leave a comment as it closes. |
1210+| `--commit <COMMIT>` | The commit on the repository's default branch that did it: its message names the work item after a closing keyword (Fixes #12). Its full hash. It lands there; the work item closes when nothing else is left to land. |
1211+
1212+Calls [`close_work_item`](/reference/api/work-items/close-work-item/), [`add_work_item_comment`](/reference/api/work-items/add-work-item-comment/).
1213+
1214+### g1t work reopen
1215+
1216+Reopen a work item.
1217+
1218+```text
1219+g1t work reopen [OPTIONS] <NUMBER>
1220+```
1221+
1222+| Argument or flag | |
1223+| --- | --- |
1224+| `<NUMBER>` | |
1225+| `-c, --comment <COMMENT>` | Leave a comment as it reopens. |
1226+
1227+Calls [`reopen_work_item`](/reference/api/work-items/reopen-work-item/), [`add_work_item_comment`](/reference/api/work-items/add-work-item-comment/).
1228+
1229+### g1t work link
1230+
1231+Link a repository to a work item: where the work must land (target), or touched.
1232+
1233+```text
1234+g1t work link [OPTIONS] <NUMBER>
1235+```
1236+
1237+| Argument or flag | |
1238+| --- | --- |
1239+| `<NUMBER>` | The work item's number. |
1240+| `--role <ROLE>` | How the repository is linked. One of `target`, `touched`. Default: `target`. |
1241+
1242+```text
1243+The repository is the current one, or --repo OWNER/NAME. A work item with targets closes once it
1244+has landed in every one.
1245+Examples:
1246+ g1t work link 12 --repo acme/api
1247+ g1t work link 12 --role touched
1248+```
1249+
1250+Calls [`link_work_item`](/reference/api/work-items/link-work-item/).
1251+
1252+### g1t work unlink
1253+
1254+Unlink a repository from a work item (never its origin).
1255+
1256+```text
1257+g1t work unlink [OPTIONS] <NUMBER>
1258+```
1259+
1260+| Argument or flag | |
1261+| --- | --- |
1262+| `<NUMBER>` | The work item's number. |
1263+
1264+Calls [`unlink_work_item`](/reference/api/work-items/unlink-work-item/).
1265+
12361266 ### g1t work claim
12371267
1238−Claim an issue: say you are working on it. Others are told, never stopped.
1268+Claim a work item: say you are working on it. Others are told, never stopped.
12391269
12401270 ```text
12411271 g1t work claim [OPTIONS] <NUMBER|--title <TITLE>>
12431273
12441274 | Argument or flag | |
12451275 | --- | --- |
1246−| `[NUMBER]` | The issue's number. |
1247−| `--title <TITLE>` | Open a new issue with this title and claim it; the current session is attached to it. |
1248−| `--body <BODY>` | The new issue's description. |
1276+| `[NUMBER]` | The work item's number. |
1277+| `--title <TITLE>` | Open a new work item with this title and claim it; the current session is attached to it. |
1278+| `--body <BODY>` | The new work item's description. |
12491279 | `-n, --note <NOTE>` | What you are doing about it. |
12501280 | `--ttl <DURATION>` | How long the claim lasts unless renewed: 30m, 2h (at most 4h). |
12511281
12521282 ```text
1253−With --title instead of a number, a new issue is opened and claimed in one step, and the
1254−current session is attached to it: for work that became a change others should know about.
1283+With --title instead of a number, a new work item is opened (filed from the current repository)
1284+and claimed in one step, and the current session is attached to it: for work that became a change
1285+others should know about.
12551286 Examples:
12561287 g1t work claim 12 --note "Rewriting the retry loop"
12571288 g1t work claim --title "Preview builds time out on large repositories"
12581289 ```
12591290
1260−Calls [`claim_issue`](/reference/api/claims-and-work/claim-issue/), [`claim_new_issue`](/reference/api/claims-and-work/claim-new-issue/).
1291+Calls [`claim_work_item`](/reference/api/work-items/claim-work-item/), [`claim_new_work_item`](/reference/api/work-items/claim-new-work-item/).
12611292
12621293 ### g1t work release
12631294
1264−Release your claim on an issue.
1295+Release your claim on a work item.
12651296
12661297 ```text
12671298 g1t work release [OPTIONS] <NUMBER>
12721303 | `<NUMBER>` | |
12731304 | `-r, --reason <REASON>` | Why: done, blocked, abandoned... |
12741305
1275−Calls [`release_claim`](/reference/api/claims-and-work/release-claim/).
1306+Calls [`release_claim`](/reference/api/work-items/release-claim/).
12761307
12771308 ### g1t work handoff
12781309
1279−Hand an issue over to someone else, or to anyone.
1310+Hand a work item over to someone else, or to anyone.
12801311
12811312 ```text
12821313 g1t work handoff [OPTIONS] --note <NOTE> <NUMBER>
12881319 | `--to <LOGIN>` | Who takes it over; anyone when left out. |
12891320 | `-n, --note <NOTE>` | Where it stands and what is left, for whoever takes it. |
12901321
1291−Calls [`hand_off_issue`](/reference/api/claims-and-work/hand-off-issue/).
1322+Calls [`hand_off_work_item`](/reference/api/work-items/hand-off-work-item/).
12921323
1293−### g1t work list
1324+### g1t work status
12941325
12951326 Active claims and sessions in the repository.
12961327
12971328 ```text
1298−g1t work list [OPTIONS]
1329+g1t work status [OPTIONS]
12991330 ```
13001331
1301−Calls [`list_claims`](/reference/api/claims-and-work/list-claims/), [`list_sessions`](/reference/api/sessions/list-sessions/).
1332+Calls [`list_claims`](/reference/api/work-items/list-claims/), [`list_sessions`](/reference/api/sessions/list-sessions/).
13021333
13031334 ### g1t work block
13041335
1305−Say an issue waits on others: it is blocked by them.
1336+Say a work item waits on others: it is blocked by them.
13061337
13071338 ```text
13081339 g1t work block [OPTIONS] --by <NUMBER> <NUMBER>
13101341
13111342 | Argument or flag | |
13121343 | --- | --- |
1313−| `<NUMBER>` | The issue that waits. |
1314−| `--by <NUMBER>` | The issue it waits on; repeat for more. |
1344+| `<NUMBER>` | The work item that waits. |
1345+| `--by <NUMBER>` | The work item it waits on; repeat for more. |
13151346
1316−Calls [`get_issue`](/reference/api/issues/get-issue/), [`update_issue`](/reference/api/issues/update-issue/).
1347+Calls [`get_work_item`](/reference/api/work-items/get-work-item/), [`update_work_item`](/reference/api/work-items/update-work-item/).
13171348
13181349 ### g1t work unblock
13191350
1320−Say an issue no longer waits on others.
1351+Say a work item no longer waits on others.
13211352
13221353 ```text
13231354 g1t work unblock [OPTIONS] --by <NUMBER> <NUMBER>
13251356
13261357 | Argument or flag | |
13271358 | --- | --- |
1328−| `<NUMBER>` | The issue that waits. |
1329−| `--by <NUMBER>` | The issue it waits on; repeat for more. |
1359+| `<NUMBER>` | The work item that waits. |
1360+| `--by <NUMBER>` | The work item it waits on; repeat for more. |
13301361
1331−Calls [`get_issue`](/reference/api/issues/get-issue/), [`update_issue`](/reference/api/issues/update-issue/).
1362+Calls [`get_work_item`](/reference/api/work-items/get-work-item/), [`update_work_item`](/reference/api/work-items/update-work-item/).
13321363
13331364 ### g1t work events
13341365
13421373 | --- | --- |
13431374 | `-f, --follow` | Keep printing events as they happen, until stopped. |
13441375 | `-t, --type <TYPE>` | Only events of this type; repeat for more. |
1345−| `-i, --issue <NUMBER>` | Only events about this issue or pull request; repeat for more. |
1376+| `-i, --item <NUMBER>` | Only events about this work item or pull request; repeat for more. |
13461377 | `-s, --since <SINCE>` | Only events since then: 15m, 2h, 1d, or a time like 2026-10-12T09:00:00Z. |
13471378 | `--after <EVENT_ID>` | Start after this event id, as a follow that stopped would resume. |
13481379 | `-L, --limit <LIMIT>` | How many past events to show first. Default: `20`. |
13491380
13501381 ```text
13511382 Examples:
1352− g1t work events --follow --issue 12
1383+ g1t work events --follow --item 12
13531384 g1t work events --follow --type integration.failed --type overlap.detected --json
13541385 With --json, each event is one JSON object on a line of its own.
13551386 ```
13581389
13591390 ### g1t work dispatch
13601391
1361−Start work on an issue in a session on your own Claude, or print the Claude Code command for it.
1392+Start work on a work item in a session on your own Claude, or print the Claude Code command for it.
13621393
13631394 ```text
13641395 g1t work dispatch [OPTIONS] <NUMBER|--title <TITLE>>
13661397
13671398 | Argument or flag | |
13681399 | --- | --- |
1369−| `[NUMBER]` | The issue's number. |
1370−| `--title <TITLE>` | Open a new issue with this title and work on it. |
1371−| `--body <BODY>` | The new issue's description. |
1372−| `-i, --instruction <INSTRUCTION>` | What to do beyond what the issue says. |
1400+| `[NUMBER]` | The work item's number. |
1401+| `--title <TITLE>` | Open a new work item with this title and work on it. |
1402+| `--body <BODY>` | The new work item's description. |
1403+| `-i, --instruction <INSTRUCTION>` | What to do beyond what the work item says. |
13731404 | `-m, --mode <MODE>` | What kind of work. One of `plan`, `implement`, `review`. |
13741405 | `--handoff` | Print the Claude Code command to run yourself; start nothing. |
13751406 | `--managed` | Start it on the workspace's Anthropic account, or fail. |
13771408 ```text
13781409 With the workspace's Anthropic AI provider, a Claude Managed Agents session starts on that
13791410 account and is recorded on g1t; otherwise (or with --handoff) this prints a `claude` command
1380−to run with g1t's plugin, whose session attaches to the issue as it starts.
1411+to run with g1t's plugin, whose session attaches to the work item as it starts.
13811412 Examples:
13821413 g1t work dispatch 12
13831414 g1t work dispatch 12 --mode plan --instruction "Keep the old flag"
13881419
13891420 ## g1t why
13901421
1391−Why a file or line is as it is: its commit, pull request, issue, decisions and sessions.
1422+Why a file or line is as it is: its commit, pull request, work item, decisions and sessions.
13921423
13931424 ```text
13941425 g1t why [OPTIONS] <TARGET>
14031434
14041435 ## g1t attach
14051436
1406−Upload images, such as a screenshot, to show in an issue, a pull request or a comment; prints their Markdown.
1437+Upload images, such as a screenshot, to show in a work item, a pull request or a comment; prints their Markdown.
14071438
14081439 ```text
14091440 g1t attach [OPTIONS] <FILE>...
14171448 Prints each image's Markdown, ![name](url), to paste into a description or a comment; --json prints
14181449 { id, name, url, markdown, content_type, size } (a list for several files). The image is served from
14191450 g1t's usercontent address, and anyone given that address can see it, even from a private repository.
1420−--attach FILE on g1t issue create, g1t issue comment, g1t pr create, g1t pr comment and g1t pr ready
1451+--attach FILE on g1t work new, g1t work comment, g1t pr create, g1t pr comment and g1t pr ready
14211452 uploads and adds the Markdown for you:
14221453 g1t attach preview.png
14231454 g1t pr comment --body 'The preview, after the fix:' --attach preview.png
14241455 ```
14251456
1426−Calls [`upload_attachment`](/reference/api/issues/upload-attachment/).
1457+Calls [`upload_attachment`](/reference/api/work-items/upload-attachment/).
14271458
14281459 ## g1t api
14291460
14481479 | `--silent` | Print nothing on success. |
14491480
14501481 ```text
1451−ENDPOINT is an operation's name (list_issues) or a path (/repos/{owner}/{name}/issues).
1482+ENDPOINT is an operation's name (list_work_items) or a path (/workspaces/{workspace}/work).
14521483 {owner}, {name}, {repo} and {workspace} are filled in from the current repository,
14531484 and an operation's other path parameters from -f/-F fields of the same name.
14541485
14551486 Examples:
1456− g1t api list_issues -f state=closed
1487+ g1t api list_work_items -f state=closed
14571488 g1t api /user --jq .username
1458− g1t api create_issue -f title='Broken link' -f labels[]=docs
1489+ g1t api open_work_item -f title='Broken link' -f labels[]=docs
14591490 g1t api list_workflow_runs --paginate --jq '.[].conclusion'
1460− g1t api --list issue
1491+ g1t api --list work
14611492 ```
14621493
14631494 ## g1t browse
14641495
1465−Open the repository, an issue or a pull request in the browser.
1496+Open the repository, a work item or a pull request in the browser.
14661497
14671498 ```text
14681499 g1t browse [OPTIONS] [TARGET]
14701501
14711502 | Argument or flag | |
14721503 | --- | --- |
1473−| `[TARGET]` | An issue or pull request number, a file path (path:line), or a commit. |
1504+| `[TARGET]` | A work item or pull request number, a file path (path:line), or a commit. |
14741505 | `-b, --branch <BRANCH>` | The branch to show files on. |
14751506 | `-s, --settings` | |
1476−| `--issues` | |
1507+| `--work` | The repository's work items: the workspace's Work list, filtered to it. |
14771508 | `--pulls` | |
14781509 | `--actions` | |
14791510 | `-n, --no-browser` | Print the address instead of opening it. |
14801511
1512+Calls [`resolve_ref`](/reference/api/work-items/resolve-ref/).
1513+
14811514 ## g1t alias
14821515
14831516 Shortcuts for commands you type often.
+2−2
11 [package]
22 name = "g1t"
3−version = "0.3.7"
3+version = "0.4.0"
44 edition.workspace = true
55 license.workspace = true
66 repository.workspace = true
7−description = "The g1t command line: repositories, issues, pull requests, workflow runs, deployments, secrets and logs on g1t, from a terminal or an agent's shell."
7+description = "The g1t command line: repositories, work items, pull requests, workflow runs, deployments, secrets and logs on g1t, from a terminal or an agent's shell."
88
99 [[bin]]
1010 name = "g1t"
+289−193
88 pub const AFTER_HELP: &str = "\
99 Examples:
1010 g1t auth login
11− g1t issue list --label bug
11+ g1t work list --label bug
1212 g1t pr create --fill
1313 g1t pr checks --watch --fail-fast
1414 g1t run logs --failed
1515 g1t workflow run release.yml -f channel=stable
16− g1t api list_issues --jq '.[].title'
16+ g1t api list_work_items --jq '.[].title'
1717
1818 Environment:
1919 G1T_TOKEN A token to use instead of the stored one
8383 /// Repositories: view, clone, create, list, fork, sync.
8484 #[command(subcommand)]
8585 Repo(RepoCommand),
86− /// Issues: list, view, create, comment, close, reopen, edit.
87− #[command(subcommand)]
88− Issue(IssueCommand),
8986 /// Pull requests: list, view, create, check out, diff, checks, review, merge.
9087 #[command(subcommand)]
9188 Pr(PrCommand),
106103 Deploy(DeployCommand),
107104 /// A project's logs and errors.
108105 Logs(LogsArgs),
109− /// What needs you: your pull requests, reviews asked of you, your issues, failing checks, and your sessions and claims here.
106+ /// What needs you: your pull requests, reviews asked of you, failing checks, and your sessions and claims here.
110107 Status(StatusArgs),
111108 /// Sessions: one run of an agent's harness, recorded as it works.
112109 #[command(subcommand)]
113110 Session(SessionCommand),
114− /// Coordinate work on issues: context, claims, hand-offs, dependencies, events.
115− #[command(subcommand)]
116− Work(WorkCommand),
117− /// Why a file or line is as it is: its commit, pull request, issue, decisions and sessions.
111+ /// Work items: list, view, open, edit, link, close; claims, hand-offs, dependencies, events.
112+ Work(WorkArgs),
113+ /// Why a file or line is as it is: its commit, pull request, work item, decisions and sessions.
118114 Why(WhyArgs),
119− /// Upload images, such as a screenshot, to show in an issue, a pull request or a comment; prints their Markdown.
115+ /// Upload images, such as a screenshot, to show in a work item, a pull request or a comment; prints their Markdown.
120116 Attach(AttachArgs),
121117 /// Call any API operation or path, with your token.
122118 Api(ApiArgs),
123− /// Open the repository, an issue or a pull request in the browser.
119+ /// Open the repository, a work item or a pull request in the browser.
124120 Browse(BrowseArgs),
125121 /// Shortcuts for commands you type often.
126122 #[command(subcommand)]
336332 pub limit: usize,
337333 }
338334
339−// --- issue ------------------------------------------------------------
340−
341−#[derive(Debug, Subcommand)]
342−pub enum IssueCommand {
343− /// List issues.
344− List(IssueListArgs),
345− /// Show an issue, with its comments.
346− View(IssueViewArgs),
347− /// Open an issue.
348− Create(IssueCreateArgs),
349− /// Comment on an issue.
350− Comment(CommentArgs),
351− /// Close an issue.
352− Close(IssueCloseArgs),
353− /// Reopen an issue.
354− Reopen(ReopenArgs),
355− /// Change an issue's title, body, labels, assignees or milestone.
356− Edit(IssueEditArgs),
357−}
358−
359−#[derive(Clone, Copy, Debug, PartialEq, Eq, ValueEnum)]
360−pub enum IssueState {
361− Open,
362− Closed,
363− All,
364−}
365−
366−#[derive(Debug, Args)]
367−pub struct IssueListArgs {
368− #[arg(short, long, value_enum, default_value_t = IssueState::Open)]
369− pub state: IssueState,
370− /// Only issues with this label.
371− #[arg(short, long)]
372− pub label: Option<String>,
373− /// Only issues in the milestone of this number.
374− #[arg(short, long)]
375− pub milestone: Option<u64>,
376− /// Only issues assigned to this person (@me for you).
377− #[arg(short, long)]
378− pub assignee: Option<String>,
379− /// Only issues opened by this person (@me for you).
380− #[arg(short = 'A', long)]
381− pub author: Option<String>,
382− #[arg(short = 'L', long, default_value_t = 20)]
383− pub limit: usize,
384−}
385−
386−#[derive(Debug, Args)]
387−pub struct IssueViewArgs {
388− /// The issue's number.
389− pub number: u64,
390− /// Show its comments too.
391− #[arg(short, long)]
392− pub comments: bool,
393− /// Open it in the browser.
394− #[arg(short, long)]
395− pub web: bool,
396−}
335+// --- shared -----------------------------------------------------------
397336
398337 #[derive(Debug, Args)]
399338 pub struct BodyArgs {
403342 /// Read the text from a file, or - for stdin.
404343 #[arg(short = 'F', long, value_name = "FILE")]
405344 pub body_file: Option<String>,
406−}
407−
408−#[derive(Debug, Args)]
409−pub struct IssueCreateArgs {
410− #[arg(short, long)]
411− pub title: Option<String>,
412− #[command(flatten)]
413− pub body: BodyArgs,
414− /// An image to show after the text (PNG, JPEG, GIF or WebP, at most 10 MB): uploaded, and its Markdown added. Repeat for more.
415− #[arg(long, value_name = "FILE")]
416− pub attach: Vec<PathBuf>,
417− /// A label; repeat for more.
418− #[arg(short, long)]
419− pub label: Vec<String>,
420− /// Someone to assign; repeat for more (@me for you).
421− #[arg(short, long)]
422− pub assignee: Vec<String>,
423− /// A milestone's number.
424− #[arg(short, long)]
425− pub milestone: Option<u64>,
426− /// Open the new-issue page in the browser instead.
427− #[arg(short, long)]
428− pub web: bool,
429345 }
430346
431347 #[derive(Debug, Args)]
432348 pub struct CommentArgs {
433− /// The number; for a pull request, the current branch's when left out.
349+ /// The pull request's number; the current branch's when left out.
434350 pub number: Option<u64>,
435351 #[command(flatten)]
436352 pub body: BodyArgs,
437353 /// An image to show after the text (PNG, JPEG, GIF or WebP, at most 10 MB): uploaded, and its Markdown added. Repeat for more.
438354 #[arg(long, value_name = "FILE")]
439355 pub attach: Vec<PathBuf>,
440−}
441−
442−#[derive(Clone, Copy, Debug, PartialEq, Eq, ValueEnum)]
443−pub enum CloseReason {
444− Completed,
445− // Spelled as the API spells it.
446− #[value(name = "not_planned", alias = "not-planned")]
447− NotPlanned,
448356 }
449357
450358 #[derive(Debug, Args)]
451−pub struct IssueCloseArgs {
452− pub number: u64,
453− #[arg(short, long, value_enum)]
454− pub reason: Option<CloseReason>,
455− /// Leave a comment as it closes.
456− #[arg(short, long)]
457− pub comment: Option<String>,
458− /// The commit on the default branch that closed it: its message names
459− /// the issue after a closing keyword (Fixes #12). Its full hash.
460− #[arg(long)]
461− pub commit: Option<String>,
462−}
463−
464−#[derive(Debug, Args)]
465359 pub struct ReopenArgs {
466360 pub number: u64,
467361 /// Leave a comment as it reopens.
468362 #[arg(short, long)]
469363 pub comment: Option<String>,
470−}
471−
472−#[derive(Debug, Args)]
473−pub struct IssueEditArgs {
474− pub number: u64,
475− #[arg(short, long)]
476− pub title: Option<String>,
477− #[command(flatten)]
478− pub body: BodyArgs,
479− #[arg(long, value_name = "LABEL")]
480− pub add_label: Vec<String>,
481− #[arg(long, value_name = "LABEL")]
482− pub remove_label: Vec<String>,
483− #[arg(long, value_name = "LOGIN")]
484− pub add_assignee: Vec<String>,
485− #[arg(long, value_name = "LOGIN")]
486− pub remove_assignee: Vec<String>,
487− /// A milestone's number.
488− #[arg(short, long)]
489− pub milestone: Option<u64>,
490− /// Take it out of its milestone.
491− #[arg(long, conflicts_with = "milestone")]
492− pub remove_milestone: bool,
493364 }
494365
495366 // --- pr ---------------------------------------------------------------
500371 List(PrListArgs),
501372 /// Show a pull request.
502373 View(PrViewArgs),
503− /// Open a pull request from a branch, or start one for an issue.
374+ /// Open a pull request from a branch, or start one for a work item.
504375 Create(PrCreateArgs),
505376 /// Check a pull request's changes out locally.
506377 Checkout(PrCheckoutArgs),
582453 /// The branch with the changes; the current one when left out.
583454 #[arg(short = 'H', long)]
584455 pub head: Option<String>,
585− /// The issue it is for. Without a branch, starts a draft in a working copy of its own.
456+ /// The work item it is for, by its number in the workspace. Without a branch, starts a draft
457+ /// in a working copy of its own.
586458 #[arg(short, long)]
587− pub issue: Option<u64>,
459+ pub item: Option<u64>,
588460 /// Take the title and body from the branch's commits.
589461 #[arg(short, long)]
590462 pub fill: bool,
674546 #[command(flatten)]
675547 pub body: BodyArgs,
676548 /// Merge on its own once its checks, reviews and rules allow.
677− #[arg(long, conflicts_with_all = ["disable_auto", "keep_issue_open", "admin", "delete_branch", "keep_branch", "match_head_commit"])]
549+ #[arg(long, conflicts_with_all = ["disable_auto", "keep_item_open", "admin", "delete_branch", "keep_branch", "match_head_commit"])]
678550 pub auto: bool,
679551 /// Turn its auto-merge off.
680− #[arg(long, conflicts_with_all = ["method", "subject", "body", "body_file", "keep_issue_open", "admin", "delete_branch", "keep_branch", "match_head_commit"])]
552+ #[arg(long, conflicts_with_all = ["method", "subject", "body", "body_file", "keep_item_open", "admin", "delete_branch", "keep_branch", "match_head_commit"])]
681553 pub disable_auto: bool,
682− /// Leave the issue it is for open.
554+ /// Do not land the work item it is for: it is only part of the work.
683555 #[arg(long)]
684− pub keep_issue_open: bool,
556+ pub keep_item_open: bool,
685557 /// Merge past failing required checks and rules (needs the Admin role).
686558 #[arg(long)]
687559 pub admin: bool,
11421014 Heartbeat,
11431015 /// Record a note, prompt or message in the current session.
11441016 Log(SessionLogArgs),
1145− /// Attach the current session to an issue, a pull request or a branch, or give it a title.
1017+ /// Attach the current session to a work item, a pull request or a branch, or give it a title.
11461018 Attach(SessionAttachArgs),
11471019 /// End the current session.
11481020 End(SessionEndArgs),
11581030 Updates(SessionViewArgs),
11591031 /// Record your decision, then acknowledge exact coordination update IDs.
11601032 Acknowledge(SessionAcknowledgeArgs),
1161− /// Say what the current session touched: files, commits, branches, pull requests, issues.
1033+ /// Say what the current session touched: files, commits, branches, pull requests, work items.
11621034 #[command(after_help = "\nEach is kept once. A file another active session touched too (a sibling subagent's included)
1163−is an overlap.detected event for both. Pull requests and issues tie the session to them.")]
1035+is an overlap.detected event for both. Pull requests and work items tie the session to them.")]
11641036 Touch(SessionTouchArgs),
11651037 }
11661038
11671039 #[derive(Debug, Args)]
1168−#[command(group(clap::ArgGroup::new("what").required(true).multiple(true).args(["file", "commit", "branch", "pull", "issue"])))]
1040+#[command(group(clap::ArgGroup::new("what").required(true).multiple(true).args(["file", "commit", "branch", "pull", "item"])))]
11691041 pub struct SessionTouchArgs {
11701042 /// A file it wrote, from the repository's root. Repeat for more.
11711043 #[arg(long)]
11791051 /// A pull request it opened.
11801052 #[arg(long)]
11811053 pub pull: Vec<u64>,
1182− /// An issue it named.
1054+ /// A work item it named, by its number in the workspace.
11831055 #[arg(long)]
1184− pub issue: Vec<u64>,
1056+ pub item: Vec<u64>,
11851057 }
11861058
11871059 #[derive(Debug, Args)]
11881060 pub struct SessionStartArgs {
1189− /// The issue it works on.
1061+ /// The work item it works on, by its number in the workspace.
11901062 #[arg(short, long)]
1191− pub issue: Option<u64>,
1063+ pub item: Option<u64>,
11921064 /// The pull request it works on.
11931065 #[arg(short, long)]
11941066 pub pull: Option<u64>,
12621134 }
12631135
12641136 #[derive(Debug, Args)]
1265−#[command(group(clap::ArgGroup::new("what").required(true).multiple(true).args(["issue", "pull", "branch", "head_commit", "title"])))]
1137+#[command(group(clap::ArgGroup::new("what").required(true).multiple(true).args(["item", "pull", "branch", "head_commit", "title"])))]
12661138 pub struct SessionAttachArgs {
1139+ /// A work item, by its number in the workspace.
12671140 #[arg(short, long)]
1268− pub issue: Option<u64>,
1141+ pub item: Option<u64>,
12691142 #[arg(short, long)]
12701143 pub pull: Option<u64>,
12711144 #[arg(short, long)]
13001173 /// Only sessions in this state.
13011174 #[arg(short, long, value_enum)]
13021175 pub state: Option<SessionState>,
1176+ /// Only sessions on this work item.
13031177 #[arg(short, long)]
1304− pub issue: Option<u64>,
1178+ pub item: Option<u64>,
13051179 #[arg(short, long)]
13061180 pub pull: Option<u64>,
13071181 #[arg(short = 'L', long, default_value_t = 20)]
13351209
13361210 // --- work -------------------------------------------------------------
13371211
1212+#[derive(Debug, Args)]
1213+pub struct WorkArgs {
1214+ /// The workspace, by its slug; the current repository's when left out.
1215+ #[arg(long, global = true, value_name = "SLUG", env = "G1T_WORKSPACE")]
1216+ pub workspace: Option<String>,
1217+ #[command(subcommand)]
1218+ pub command: WorkCommand,
1219+}
1220+
13381221 #[derive(Debug, Subcommand)]
13391222 pub enum WorkCommand {
1340− /// Everything about an issue's work: claims, sessions, pull requests, dependencies, decisions.
1341− Context(WorkNumber),
1342− /// Claim an issue: say you are working on it. Others are told, never stopped.
1343− #[command(after_help = "\nWith --title instead of a number, a new issue is opened and claimed in one step, and the
1344−current session is attached to it: for work that became a change others should know about.
1223+ /// List the workspace's work items; with --repo, those linked to that repository.
1224+ List(WorkListArgs),
1225+ /// Show a work item with everything about its work: repositories and what landed, claims,
1226+ /// sessions, pull requests, what it waits on, decisions.
1227+ View(WorkViewArgs),
1228+ /// Open a work item, with the current repository as its origin.
1229+ #[command(after_help = "\nIn a repository, the work item is filed from it (its origin). With --workspace and no
1230+repository of that workspace here, it is filed in the workspace alone. --target names a repository
1231+where the work is meant to land; repeat it for more.
1232+Examples:
1233+ g1t work new --title \"Sign-in times out on slow networks\" --body \"...\"
1234+ g1t work new --title \"Rename the flag\" --target acme/api --target acme/docs")]
1235+ New(WorkNewArgs),
1236+ /// Comment on a work item.
1237+ Comment(WorkCommentArgs),
1238+ /// Change a work item's title, body, labels, assignees or milestone.
1239+ Edit(WorkEditArgs),
1240+ /// Close a work item.
1241+ Close(WorkCloseArgs),
1242+ /// Reopen a work item.
1243+ Reopen(ReopenArgs),
1244+ /// Link a repository to a work item: where the work must land (target), or touched.
1245+ #[command(after_help = "\nThe repository is the current one, or --repo OWNER/NAME. A work item with targets closes once it
1246+has landed in every one.
1247+Examples:
1248+ g1t work link 12 --repo acme/api
1249+ g1t work link 12 --role touched")]
1250+ Link(WorkLinkArgs),
1251+ /// Unlink a repository from a work item (never its origin).
1252+ Unlink(WorkNumber),
1253+ /// Claim a work item: say you are working on it. Others are told, never stopped.
1254+ #[command(after_help = "\nWith --title instead of a number, a new work item is opened (filed from the current repository)
1255+and claimed in one step, and the current session is attached to it: for work that became a change
1256+others should know about.
13451257 Examples:
13461258 g1t work claim 12 --note \"Rewriting the retry loop\"
13471259 g1t work claim --title \"Preview builds time out on large repositories\"")]
13481260 Claim(WorkClaimArgs),
1349− /// Release your claim on an issue.
1261+ /// Release your claim on a work item.
13501262 Release(WorkReleaseArgs),
1351− /// Hand an issue over to someone else, or to anyone.
1263+ /// Hand a work item over to someone else, or to anyone.
13521264 Handoff(WorkHandoffArgs),
13531265 /// Active claims and sessions in the repository.
1354− List,
1355− /// Say an issue waits on others: it is blocked by them.
1266+ Status,
1267+ /// Say a work item waits on others: it is blocked by them.
13561268 Block(WorkBlockArgs),
1357− /// Say an issue no longer waits on others.
1269+ /// Say a work item no longer waits on others.
13581270 Unblock(WorkBlockArgs),
13591271 /// The repository's events; --follow keeps printing them as they happen.
13601272 #[command(after_help = "\
13611273 Examples:
1362− g1t work events --follow --issue 12
1274+ g1t work events --follow --item 12
13631275 g1t work events --follow --type integration.failed --type overlap.detected --json
13641276 With --json, each event is one JSON object on a line of its own.")]
13651277 Events(WorkEventsArgs),
1366− /// Start work on an issue in a session on your own Claude, or print the Claude Code command for it.
1278+ /// Start work on a work item in a session on your own Claude, or print the Claude Code command for it.
13671279 #[command(after_help = "\nWith the workspace's Anthropic AI provider, a Claude Managed Agents session starts on that
13681280 account and is recorded on g1t; otherwise (or with --handoff) this prints a `claude` command
1369−to run with g1t's plugin, whose session attaches to the issue as it starts.
1281+to run with g1t's plugin, whose session attaches to the work item as it starts.
13701282 Examples:
13711283 g1t work dispatch 12
13721284 g1t work dispatch 12 --mode plan --instruction \"Keep the old flag\"
13751287 }
13761288
13771289 #[derive(Clone, Copy, Debug, PartialEq, Eq, ValueEnum)]
1290+pub enum ItemState {
1291+ Open,
1292+ Closed,
1293+ All,
1294+}
1295+
1296+#[derive(Clone, Copy, Debug, PartialEq, Eq, ValueEnum)]
1297+pub enum LinkRole {
1298+ Origin,
1299+ Target,
1300+ Touched,
1301+}
1302+
1303+impl LinkRole {
1304+ pub fn name(self) -> &'static str {
1305+ match self {
1306+ LinkRole::Origin => "origin",
1307+ LinkRole::Target => "target",
1308+ LinkRole::Touched => "touched",
1309+ }
1310+ }
1311+}
1312+
1313+/// The roles a repository can be linked in by hand: the origin is where a
1314+/// work item was filed.
1315+#[derive(Clone, Copy, Debug, PartialEq, Eq, ValueEnum)]
1316+pub enum LinkAs {
1317+ Target,
1318+ Touched,
1319+}
1320+
1321+impl LinkAs {
1322+ pub fn name(self) -> &'static str {
1323+ match self {
1324+ LinkAs::Target => "target",
1325+ LinkAs::Touched => "touched",
1326+ }
1327+ }
1328+}
1329+
1330+#[derive(Debug, Args)]
1331+pub struct WorkListArgs {
1332+ #[arg(short, long, value_enum, default_value_t = ItemState::Open)]
1333+ pub state: ItemState,
1334+ /// Only work items with this label.
1335+ #[arg(short, long)]
1336+ pub label: Option<String>,
1337+ /// Only work items in the workspace milestone of this number.
1338+ #[arg(short, long)]
1339+ pub milestone: Option<u64>,
1340+ /// Only work items assigned to this person (@me for you).
1341+ #[arg(short, long)]
1342+ pub assignee: Option<String>,
1343+ /// Only work items opened by this person (@me for you).
1344+ #[arg(short = 'A', long)]
1345+ pub author: Option<String>,
1346+ /// With --repo: only those linked to it this way.
1347+ #[arg(long, value_enum)]
1348+ pub role: Option<LinkRole>,
1349+ #[arg(short = 'L', long, default_value_t = 20)]
1350+ pub limit: usize,
1351+}
1352+
1353+#[derive(Debug, Args)]
1354+pub struct WorkViewArgs {
1355+ /// The work item's number.
1356+ pub number: u64,
1357+ /// Show its comments too.
1358+ #[arg(short, long)]
1359+ pub comments: bool,
1360+ /// Open it in the browser.
1361+ #[arg(short, long)]
1362+ pub web: bool,
1363+}
1364+
1365+#[derive(Debug, Args)]
1366+pub struct WorkNewArgs {
1367+ #[arg(short, long)]
1368+ pub title: Option<String>,
1369+ #[command(flatten)]
1370+ pub body: BodyArgs,
1371+ /// An image to show after the text (PNG, JPEG, GIF or WebP, at most 10 MB): uploaded, and its Markdown added. Repeat for more.
1372+ #[arg(long, value_name = "FILE")]
1373+ pub attach: Vec<PathBuf>,
1374+ /// A repository of the workspace where the work is meant to land, OWNER/NAME; repeat for more.
1375+ #[arg(long, value_name = "OWNER/NAME")]
1376+ pub target: Vec<String>,
1377+ /// A label; repeat for more.
1378+ #[arg(short, long)]
1379+ pub label: Vec<String>,
1380+ /// Someone to assign; repeat for more (@me for you).
1381+ #[arg(short, long)]
1382+ pub assignee: Vec<String>,
1383+ /// A workspace milestone's number.
1384+ #[arg(short, long)]
1385+ pub milestone: Option<u64>,
1386+ /// Open the new work item page in the browser instead.
1387+ #[arg(short, long)]
1388+ pub web: bool,
1389+}
1390+
1391+#[derive(Debug, Args)]
1392+pub struct WorkCommentArgs {
1393+ /// The work item's number.
1394+ pub number: u64,
1395+ #[command(flatten)]
1396+ pub body: BodyArgs,
1397+ /// An image to show after the text (PNG, JPEG, GIF or WebP, at most 10 MB): uploaded, and its Markdown added. Repeat for more.
1398+ #[arg(long, value_name = "FILE")]
1399+ pub attach: Vec<PathBuf>,
1400+}
1401+
1402+#[derive(Clone, Copy, Debug, PartialEq, Eq, ValueEnum)]
1403+pub enum CloseReason {
1404+ Completed,
1405+ // Spelled as the API spells it.
1406+ #[value(name = "not_planned", alias = "not-planned")]
1407+ NotPlanned,
1408+}
1409+
1410+#[derive(Debug, Args)]
1411+pub struct WorkCloseArgs {
1412+ pub number: u64,
1413+ #[arg(short, long, value_enum)]
1414+ pub reason: Option<CloseReason>,
1415+ /// Leave a comment as it closes.
1416+ #[arg(short, long)]
1417+ pub comment: Option<String>,
1418+ /// The commit on the repository's default branch that did it: its message names the work item
1419+ /// after a closing keyword (Fixes #12). Its full hash. It lands there; the work item closes when
1420+ /// nothing else is left to land.
1421+ #[arg(long)]
1422+ pub commit: Option<String>,
1423+}
1424+
1425+#[derive(Debug, Args)]
1426+pub struct WorkEditArgs {
1427+ pub number: u64,
1428+ #[arg(short, long)]
1429+ pub title: Option<String>,
1430+ #[command(flatten)]
1431+ pub body: BodyArgs,
1432+ #[arg(long, value_name = "LABEL")]
1433+ pub add_label: Vec<String>,
1434+ #[arg(long, value_name = "LABEL")]
1435+ pub remove_label: Vec<String>,
1436+ #[arg(long, value_name = "LOGIN")]
1437+ pub add_assignee: Vec<String>,
1438+ #[arg(long, value_name = "LOGIN")]
1439+ pub remove_assignee: Vec<String>,
1440+ /// A workspace milestone's number.
1441+ #[arg(short, long)]
1442+ pub milestone: Option<u64>,
1443+ /// Take it out of its milestone.
1444+ #[arg(long, conflicts_with = "milestone")]
1445+ pub remove_milestone: bool,
1446+}
1447+
1448+#[derive(Debug, Args)]
1449+pub struct WorkLinkArgs {
1450+ /// The work item's number.
1451+ pub number: u64,
1452+ /// How the repository is linked.
1453+ #[arg(long, value_enum, default_value_t = LinkAs::Target)]
1454+ pub role: LinkAs,
1455+}
1456+
1457+#[derive(Clone, Copy, Debug, PartialEq, Eq, ValueEnum)]
13781458 pub enum DispatchMode {
13791459 Plan,
13801460 Implement,
13941474 #[derive(Debug, Args)]
13951475 #[command(group(clap::ArgGroup::new("which").required(true).args(["number", "title"])))]
13961476 pub struct WorkDispatchArgs {
1397− /// The issue's number.
1477+ /// The work item's number.
13981478 pub number: Option<u64>,
1399− /// Open a new issue with this title and work on it.
1479+ /// Open a new work item with this title and work on it.
14001480 #[arg(long, conflicts_with = "number")]
14011481 pub title: Option<String>,
1402− /// The new issue's description.
1482+ /// The new work item's description.
14031483 #[arg(long, requires = "title")]
14041484 pub body: Option<String>,
1405− /// What to do beyond what the issue says.
1485+ /// What to do beyond what the work item says.
14061486 #[arg(short, long)]
14071487 pub instruction: Option<String>,
14081488 /// What kind of work.
14181498
14191499 #[derive(Debug, Args)]
14201500 pub struct WorkNumber {
1421− /// The issue's number.
1501+ /// The work item's number.
14221502 pub number: u64,
14231503 }
14241504
14251505 #[derive(Debug, Args)]
14261506 #[command(group(clap::ArgGroup::new("which").required(true).args(["number", "title"])))]
14271507 pub struct WorkClaimArgs {
1428− /// The issue's number.
1508+ /// The work item's number.
14291509 pub number: Option<u64>,
1430− /// Open a new issue with this title and claim it; the current session is attached to it.
1510+ /// Open a new work item with this title and claim it; the current session is attached to it.
14311511 #[arg(long, conflicts_with = "number")]
14321512 pub title: Option<String>,
1433− /// The new issue's description.
1513+ /// The new work item's description.
14341514 #[arg(long, requires = "title")]
14351515 pub body: Option<String>,
14361516 /// What you are doing about it.
14621542
14631543 #[derive(Debug, Args)]
14641544 pub struct WorkBlockArgs {
1465− /// The issue that waits.
1545+ /// The work item that waits.
14661546 pub number: u64,
1467− /// The issue it waits on; repeat for more.
1547+ /// The work item it waits on; repeat for more.
14681548 #[arg(long = "by", value_name = "NUMBER", required = true)]
14691549 pub by: Vec<u64>,
14701550 }
14771557 /// Only events of this type; repeat for more.
14781558 #[arg(short = 't', long = "type", value_name = "TYPE")]
14791559 pub types: Vec<String>,
1480− /// Only events about this issue or pull request; repeat for more.
1481− #[arg(short, long = "issue", value_name = "NUMBER")]
1482− pub issues: Vec<u64>,
1560+ /// Only events about this work item or pull request; repeat for more.
1561+ #[arg(short = 'i', long = "item", value_name = "NUMBER")]
1562+ pub items: Vec<u64>,
14831563 /// Only events since then: 15m, 2h, 1d, or a time like 2026-10-12T09:00:00Z.
14841564 #[arg(short, long)]
14851565 pub since: Option<String>,
15151595 Prints each image's Markdown, ![name](url), to paste into a description or a comment; --json prints
15161596 { id, name, url, markdown, content_type, size } (a list for several files). The image is served from
15171597 g1t's usercontent address, and anyone given that address can see it, even from a private repository.
1518−--attach FILE on g1t issue create, g1t issue comment, g1t pr create, g1t pr comment and g1t pr ready
1598+--attach FILE on g1t work new, g1t work comment, g1t pr create, g1t pr comment and g1t pr ready
15191599 uploads and adds the Markdown for you:
15201600 g1t attach preview.png
15211601 g1t pr comment --body 'The preview, after the fix:' --attach preview.png")]
15431623
15441624 #[derive(Debug, Args)]
15451625 #[command(after_help = "\
1546−ENDPOINT is an operation's name (list_issues) or a path (/repos/{owner}/{name}/issues).
1626+ENDPOINT is an operation's name (list_work_items) or a path (/workspaces/{workspace}/work).
15471627 {owner}, {name}, {repo} and {workspace} are filled in from the current repository,
15481628 and an operation's other path parameters from -f/-F fields of the same name.
15491629
15501630 Examples:
1551− g1t api list_issues -f state=closed
1631+ g1t api list_work_items -f state=closed
15521632 g1t api /user --jq .username
1553− g1t api create_issue -f title='Broken link' -f labels[]=docs
1633+ g1t api open_work_item -f title='Broken link' -f labels[]=docs
15541634 g1t api list_workflow_runs --paginate --jq '.[].conclusion'
1555− g1t api --list issue")]
1635+ g1t api --list work")]
15561636 pub struct ApiArgs {
15571637 /// An operation's name, or a path.
15581638 pub endpoint: Option<String>,
15901670
15911671 #[derive(Debug, Args)]
15921672 pub struct BrowseArgs {
1593− /// An issue or pull request number, a file path (path:line), or a commit.
1673+ /// A work item or pull request number, a file path (path:line), or a commit.
15941674 pub target: Option<String>,
15951675 /// The branch to show files on.
15961676 #[arg(short, long)]
15971677 pub branch: Option<String>,
15981678 #[arg(short, long)]
15991679 pub settings: bool,
1680+ /// The repository's work items: the workspace's Work list, filtered to it.
16001681 #[arg(long)]
1601− pub issues: bool,
1682+ pub work: bool,
16021683 #[arg(long)]
16031684 pub pulls: bool,
16041685 #[arg(long)]
17921873 }
17931874 }
17941875
1795− /// `work claim` takes an issue's number, or a title for a new one, never both.
1876+ /// `work claim` takes a work item's number, or a title for a new one, never both.
17961877 #[test]
1797− fn a_claim_names_an_issue_or_a_title_for_a_new_one() {
1878+ fn a_claim_names_a_work_item_or_a_title_for_a_new_one() {
17981879 let claim = |argv: &[&str]| {
17991880 let mut all = vec!["g1t", "work", "claim"];
18001881 all.extend_from_slice(argv);
18011882 Cli::try_parse_from(all).map(|cli| match cli.command {
1802− super::Command::Work(super::WorkCommand::Claim(args)) => args,
1883+ super::Command::Work(super::WorkArgs { command: super::WorkCommand::Claim(args), .. }) => args,
18031884 _ => panic!("not work claim"),
18041885 })
18051886 };
18341915 assert!(Cli::try_parse_from(["g1t", "session", "acknowledge", "--note", "No IDs"]).is_err());
18351916 }
18361917
1918+
1919+ #[test]
1920+ fn work_items_take_a_workspace_and_there_is_no_issue_command() {
1921+ let cli = Cli::try_parse_from(["g1t", "work", "list", "--workspace", "acme", "--label", "bug"]).unwrap();
1922+ let super::Command::Work(work) = cli.command else { panic!("not work") };
1923+ assert_eq!(work.workspace.as_deref(), Some("acme"));
1924+ assert!(Cli::try_parse_from(["g1t", "work", "view", "12", "--workspace", "acme"]).is_ok());
1925+ assert!(Cli::try_parse_from(["g1t", "work", "link", "12", "--role", "touched", "-R", "acme/api"]).is_ok());
1926+ assert!(Cli::try_parse_from(["g1t", "work", "link", "12", "--role", "origin"]).is_err());
1927+ assert!(Cli::try_parse_from(["g1t", "work", "close", "12", "--commit", "9f2c4e1"]).is_ok());
1928+ assert!(Cli::try_parse_from(["g1t", "work", "events", "-i", "12"]).is_ok());
1929+ assert!(Cli::try_parse_from(["g1t", "pr", "create", "--item", "12"]).is_ok());
1930+ assert!(Cli::try_parse_from(["g1t", "issue", "list"]).is_err());
1931+ assert!(Cli::try_parse_from(["g1t", "pr", "create", "--issue", "12"]).is_err());
1932+ }
18371933 }
+4−2
354354 owner: "acme".into(),
355355 name: "web".into(),
356356 };
357− let call = client.op("get_issue").repo(&repo).arg("number", 12);
358− assert_eq!(call.path(), "/repos/acme/web/issues/12");
357+ let call = client.op("get_pull_request").repo(&repo).arg("number", 12);
358+ assert_eq!(call.path(), "/repos/acme/web/pulls/12");
359+ let call = client.op("get_work_item").arg("workspace", "acme").arg("number", 12);
360+ assert_eq!(call.path(), "/workspaces/acme/work/12");
359361 }
360362 }
+4−4
192192 fn words_split_like_a_shell() {
193193 assert_eq!(split("pr checkout").unwrap(), v(&["pr", "checkout"]));
194194 assert_eq!(
195− split(r#"issue list --label "good first issue""#).unwrap(),
196− v(&["issue", "list", "--label", "good first issue"])
195+ split(r#"work list --label "good first issue""#).unwrap(),
196+ v(&["work", "list", "--label", "good first issue"])
197197 );
198198 assert_eq!(
199199 split("api '/repos/{owner}/{name}'").unwrap(),
212212 );
213213 assert_eq!(
214214 substitute(
215− &v(&["issue", "list", "--label", "$1"]),
215+ &v(&["work", "list", "--label", "$1"]),
216216 &v(&["bug", "-L", "5"])
217217 ),
218− v(&["issue", "list", "--label", "bug", "-L", "5"])
218+ v(&["work", "list", "--label", "bug", "-L", "5"])
219219 );
220220 }
221221
+11−8
526526
527527 #[test]
528528 fn operations_fill_their_paths_from_the_repository() {
529− let op = ops::get("list_issues");
529+ let op = ops::get("list_repo_work_items");
530530 let mut given = Map::new();
531531 given.insert("state".into(), json!("closed"));
532532 let plan = plan_op(op, None, given, &repo).unwrap();
534534 plan,
535535 Plan {
536536 method: "GET".into(),
537− path: "/repos/acme/web/issues".into(),
537+ path: "/repos/acme/web/work".into(),
538538 query: vec![("state".into(), "closed".into())],
539539 body: None
540540 }
541541 );
542+ // A workspace's operations take the repository's.
543+ let plan = plan_op(ops::get("list_work_items"), None, Map::new(), &repo).unwrap();
544+ assert_eq!(plan.path, "/workspaces/acme/work");
542545
543− let op = ops::get("create_issue");
546+ let op = ops::get("open_work_item");
544547 let mut given = Map::new();
545548 given.insert("title".into(), json!("Broken"));
546549 let plan = plan_op(op, None, given, &repo).unwrap();
547550 assert_eq!(plan.method, "POST");
548551 assert_eq!(plan.body, Some(json!({ "title": "Broken" })));
549552
550− let op = ops::get("get_issue");
553+ let op = ops::get("get_work_item");
551554 let err = plan_op(op, None, Map::new(), &repo).unwrap_err();
552555 assert!(err.message.contains("number"), "{}", err.message);
553− let err = plan_op(ops::get("list_issues"), None, Map::new(), &no_repo).unwrap_err();
556+ let err = plan_op(ops::get("list_repo_work_items"), None, Map::new(), &no_repo).unwrap_err();
554557 assert_eq!(err.kind, Kind::Usage);
555558 }
556559
557560 #[test]
558561 fn paths_fill_placeholders() {
559− let plan = plan_path("repos/{owner}/{repo}/issues", None, Map::new(), &repo).unwrap();
560− assert_eq!(plan.path, "/repos/acme/web/issues");
562+ let plan = plan_path("repos/{owner}/{repo}/work", None, Map::new(), &repo).unwrap();
563+ assert_eq!(plan.path, "/repos/acme/web/work");
561564 assert_eq!(plan.method, "GET");
562565 let mut given = Map::new();
563566 given.insert("title".into(), json!("x"));
564− let plan = plan_path("/repos/acme/web/issues", None, given, &no_repo).unwrap();
567+ let plan = plan_path("/workspaces/acme/work", None, given, &no_repo).unwrap();
565568 assert_eq!(plan.method, "POST");
566569 assert_eq!(plan.body, Some(json!({ "title": "x" })));
567570 }
+2−2
1−//! `g1t attach FILE...`: upload images to show in an issue, a pull request
1+//! `g1t attach FILE...`: upload images to show in a work item, a pull request
22 //! or a comment, and print the Markdown that shows each. `--attach FILE`
3−//! on `g1t issue create`, `g1t issue comment`, `g1t pr create`, `g1t pr
3+//! on `g1t work new`, `g1t work comment`, `g1t pr create`, `g1t pr
44 //! comment` and `g1t pr ready` does the same and adds the Markdown to the
55 //! text ([`with_attachments`]). An agent shows a screenshot of its preview
66 //! this way, instead of committing the image to the repository.
+23−8
33 use crate::cli::BrowseArgs;
44 use crate::context::Ctx;
55 use crate::error::Result;
6+use crate::output::s;
67 use crate::repo::Repo;
78
89 /// Opens `url` in the browser at a terminal; prints it otherwise.
2122 if args.settings {
2223 return format!("{base}/settings");
2324 }
24− if args.issues {
25− return format!("{base}/issues");
25+ if args.work {
26+ return format!("{site}/{}/-/work?repo={}", repo.owner, repo.name);
2627 }
2728 if args.pulls {
2829 return format!("{base}/pulls");
3839 };
3940 let target = target.trim_start_matches('#');
4041 if target.chars().all(|c| c.is_ascii_digit()) {
41− // Issues and pull requests share numbers; the issue page sends a
42− // pull request's number on to it.
43− return format!("{base}/issues/{target}");
42+ // What the number names is found first (`run`); this is a pull
43+ // request of the repository.
44+ return format!("{base}/pull/{target}");
4445 }
4546 if target.len() >= 7
4647 && target.len() <= 40
7475 } else {
7576 None
7677 };
77− let url = address(&client.host.site, &repo, &args, branch.as_deref());
78+ let mut url = address(&client.host.site, &repo, &args, branch.as_deref());
79+ // `#N` here: a pull request of the repository, or a work item of its
80+ // workspace (an old issue number of the repository included).
81+ if let Some(number) = args.target.as_deref().map(|t| t.trim_start_matches('#')).filter(|t| !t.is_empty() && t.chars().all(|c| c.is_ascii_digit()))
82+ && let Ok(found) = client.op("resolve_ref").repo(&repo).arg("number", number).send()
83+ {
84+ url = match found["kind"].as_str() {
85+ Some("work_item") => format!("{}/{}/-/work/{}", client.host.site, s(&found, "workspace"), found["number"]),
86+ Some("pull") => format!("{}/{}/pull/{}", client.host.site, s(&found, "repo"), found["number"]),
87+ _ => url,
88+ };
89+ }
7890 if args.no_browser {
7991 println!("{url}");
8092 return Ok(());
91103 target: target.map(str::to_owned),
92104 branch: None,
93105 settings: false,
94− issues: false,
106+ work: false,
95107 pulls: false,
96108 actions: false,
97109 no_browser: true,
112124 );
113125 assert_eq!(
114126 address(site, &repo, &args(Some("12")), None),
115− "https://g1t.sh/acme/web/issues/12"
127+ "https://g1t.sh/acme/web/pull/12"
116128 );
117129 assert_eq!(
118130 address(site, &repo, &args(Some("src/main.rs:41")), Some("dev")),
122134 address(site, &repo, &args(Some("9f2c4e1")), None),
123135 "https://g1t.sh/acme/web/commit/9f2c4e1"
124136 );
137+ let mut work = args(None);
138+ work.work = true;
139+ assert_eq!(address(site, &repo, &work, None), "https://g1t.sh/acme/-/work?repo=web");
125140 let mut settings = args(None);
126141 settings.settings = true;
127142 assert_eq!(
+0−504
Loading the diff…
+91−2
Loading the diff…
+32−25
Loading the diff…
+1−1
Loading the diff…
+2−2
Loading the diff…
+12−12
Loading the diff…
+8−5
Loading the diff…
+3−3
Loading the diff…
+553−129
Loading the diff…
+1−1
Loading the diff…
+5−2
Loading the diff…
+16−36
Loading the diff…
+1−1
Loading the diff…
+660−466
A large diff (1,417 lines) is not shown until you ask for it.
+64−55
Loading the diff…

Comments

Sign in to comment.