Docs match the code for work items
Every name the docs guessed is now the code's: settings, operations and their reference links, MCP actions, CLI flags, Actions triggers and payloads, webhook data, the rail and the phone bar, attachments and the live Work pages. Old issue API pages redirect to their work item pages, and the phone guide describes the Work tab and its links.
- G1T-Session:
- ses_01m560bz6eeqc8v1hrrha03pap
24 files+299−960/24 viewed
| 45 | 45 | '/reference/api/issues/close-issue/': '/reference/api/work-items/close-work-item/', | |
| 46 | 46 | '/reference/api/issues/reopen-issue/': '/reference/api/work-items/reopen-work-item/', | |
| 47 | 47 | '/reference/api/integrations/import-issue/': '/reference/api/work-items/import-work-items/', | |
| 48 | + | '/reference/api/issues/list-issue-labels/': '/reference/api/work-items/list-work-item-labels/', | |
| 49 | + | '/reference/api/issues/add-issue-labels/': '/reference/api/work-items/add-work-item-labels/', | |
| 50 | + | '/reference/api/issues/set-issue-labels/': '/reference/api/work-items/set-work-item-labels/', | |
| 51 | + | '/reference/api/issues/remove-issue-labels/': '/reference/api/work-items/remove-work-item-labels/', | |
| 52 | + | '/reference/api/issues/remove-issue-label/': '/reference/api/work-items/remove-work-item-label/', | |
| 53 | + | '/reference/api/issues/add-comment/': '/reference/api/work-items/add-work-item-comment/', | |
| 54 | + | '/reference/api/issues/edit-comment/': '/reference/api/work-items/edit-work-item-comment/', | |
| 55 | + | '/reference/api/issues/delete-comment/': '/reference/api/work-items/delete-work-item-comment/', | |
| 56 | + | '/reference/api/issues/react/': '/reference/api/work-items/react-to-work-item/', | |
| 57 | + | '/reference/api/issues/upload-attachment/': '/reference/api/work-items/upload-attachment/', | |
| 58 | + | '/reference/api/decisions-and-why/list-issue-decisions/': '/reference/api/work-items/list-work-item-decisions/', | |
| 59 | + | '/reference/api/claims-and-work/get-work/': '/reference/api/work-items/get-work/', | |
| 60 | + | '/reference/api/claims-and-work/claim-issue/': '/reference/api/work-items/claim-work-item/', | |
| 61 | + | '/reference/api/claims-and-work/claim-new-issue/': '/reference/api/work-items/claim-new-work-item/', | |
| 62 | + | '/reference/api/claims-and-work/list-claims/': '/reference/api/work-items/list-claims/', | |
| 63 | + | '/reference/api/claims-and-work/release-claim/': '/reference/api/work-items/release-claim/', | |
| 64 | + | '/reference/api/claims-and-work/hand-off-issue/': '/reference/api/work-items/hand-off-work-item/', | |
| 65 | + | '/reference/api/notifications/get-issue-subscription/': '/reference/api/notifications/get-work-item-subscription/', | |
| 66 | + | '/reference/api/notifications/set-issue-subscription/': '/reference/api/notifications/set-work-item-subscription/', | |
| 67 | + | '/reference/api/notifications/delete-issue-subscription/': '/reference/api/notifications/delete-work-item-subscription/', | |
| 48 | 68 | }, | |
| 49 | 69 | integrations: [ | |
| 50 | 70 | starlight({ |
| 31 | 31 | ||
| 32 | 32 | - `g1t.sh/<owner>/<repo>/issues/12` redirects to the work item that issue | |
| 33 | 33 | became, at `g1t.sh/<owner>/-/work/<number>`. **Issues**, **New issue**, | |
| 34 | − | **Labels** and **Milestones** under a repository redirect to **Work**. | |
| 34 | + | **Labels** and **Milestones** under a repository redirect to **Work**: | |
| 35 | + | the repository's issue list to the Work list filtered to it, and its | |
| 36 | + | labels and milestones to the workspace's. A milestone's own old address, | |
| 37 | + | `…/milestones/3`, lands on the milestones list, since milestones were | |
| 38 | + | renumbered. | |
| 39 | + | - A person's **Issues** tab is their **Work items** tab, at | |
| 40 | + | `g1t.sh/u/<name>/items`. | |
| 35 | 41 | - `#12` and `owner/repo#12` in descriptions, comments and commit messages | |
| 36 | 42 | written before still link to that issue's work item. | |
| 37 | 43 | - `Closes #12` in history still points at the right work item. | |
| 38 | 44 | - A repository's old **Work** page, its claims and sessions, is now its | |
| 39 | − | **Sessions** page, and the old address redirects there. | |
| 45 | + | **Sessions** page, with the sessions recorded on its pull requests, and | |
| 46 | + | the old address redirects there. A session's page is | |
| 47 | + | `g1t.sh/<owner>/<repo>/sessions/<id>`; an old address with a pull | |
| 48 | + | request's number in place of the id goes to that pull request's | |
| 49 | + | session. | |
| 40 | 50 | ||
| 41 | 51 | ## Labels and milestones | |
| 42 | 52 | ||
| ⋯ | |||
| 55 | 65 | ||
| 56 | 66 | | Was | Now | | |
| 57 | 67 | | --- | --- | | |
| 58 | − | | `g1t issue …` | `g1t work …`: `list`, `view`, `new`, `edit`, `close`, `reopen` | | |
| 68 | + | | `g1t issue …` | `g1t work …`: `list`, `view`, `new`, `comment`, `edit`, `close`, `reopen` | | |
| 69 | + | | `g1t browse --issues` | `g1t browse --work` | | |
| 59 | 70 | | `g1t work context N` | `g1t work view N` | | |
| 60 | 71 | | `g1t work list` (claims and sessions) | `g1t work status` | | |
| 61 | 72 | | `--issue N` on `g1t pr create`, `g1t session …` and `g1t work events` | `--item N` | | |
| ⋯ | |||
| 64 | 75 | | `/repos/{owner}/{name}/issues…` | `/workspaces/{workspace}/work…` | | |
| 65 | 76 | | Repository labels and milestones routes | `/workspaces/{workspace}/labels` and `/workspaces/{workspace}/milestones` | | |
| 66 | 77 | | `issue.*` events and webhooks | `work_item.*`. Webhooks you had were moved over for you. | | |
| 78 | + | | `issue` and `other_issue` in event payloads | `item` and `other_item` | | |
| 79 | + | | Workflows `on: issues` and `on: issue_comment`, and `permissions: { issues: … }` | `on: work_item`, `on: work_item_comment` and `permissions: { work: … }`. The old names still read but start and grant nothing, and the workflow's page says so. | | |
| 80 | + | | The repository settings `has_issues` and `auto_close_issues` | `has_work_items` and `auto_close_items` | | |
| 81 | + | | Search `is:issue` and `type: issues` | `is:item` and `type: items` | | |
| 67 | 82 | | `issues:read`, `issues:write` scopes | `work:read`, `work:write` | | |
| 68 | 83 | | `/g1t:work-on-issue` in Claude Code | `/g1t:work-on-item`, with the plugin 0.3.0 and the CLI 0.4.0 or later | | |
| 69 | 84 | ||
| 63 | 63 | it has no target, or once every target has landed. `Part of #N` (or | |
| 64 | 64 | `Refs #N`) links the pull request or commit, and its repository as | |
| 65 | 65 | touched, without landing anything. References reach every repository of | |
| 66 | − | the same workspace; a work item in another workspace is never closed. The | |
| 67 | − | work item's other open pull requests in that repository close as | |
| 68 | − | superseded ([How g1t works](/concepts/overview/#several-pull-requests-for-one-work-item)). | |
| 66 | + | the same workspace; a work item in another workspace is never closed. When a merged | |
| 67 | + | pull request lands its own work item, that work item's other open pull | |
| 68 | + | requests in the same repository close as superseded; those in its other | |
| 69 | + | repositories stay open ([How g1t works](/concepts/overview/#several-pull-requests-for-one-work-item)). | |
| 69 | 70 | ||
| 70 | 71 | Work items were issues, one repository's each, until a migration moved | |
| 71 | 72 | them into their workspaces: numbered above every number the workspace's |
| 116 | 116 | copy, its own session and its own diff. The work item's page lists them | |
| 117 | 117 | all, by repository, with their status. | |
| 118 | 118 | ||
| 119 | − | When you merge one: | |
| 119 | + | When you merge one into its repository's default branch: | |
| 120 | 120 | ||
| 121 | 121 | - the pull request becomes `merged`, recording who merged it and when; | |
| 122 | 122 | - its repository is marked **landed** on the work item, which records that | |
| 123 | 123 | pull request as the one that **resolved** it there; | |
| 124 | 124 | - every other pull request for that work item in the same repository that | |
| 125 | 125 | was still a draft or open is closed, marked as **superseded** by the one | |
| 126 | − | that was merged; | |
| 126 | + | that was merged; pull requests for it in its other repositories stay | |
| 127 | + | open, since each lands its own part; | |
| 127 | 128 | - the work item closes as `completed` once every repository it targets | |
| 128 | 129 | has landed, or at once when it has no targets. | |
| 129 | 130 |
| 29 | 29 | ||
| 30 | 30 | | On GitHub | On g1t | | |
| 31 | 31 | | --- | --- | | |
| 32 | − | | `on:` `push` (branches, tags, paths), `pull_request`, `pull_request_target`, `issues`, `issue_comment`, `pull_request_review`, `schedule`, `workflow_dispatch`, `workflow_run`, `merge_group`, `create`, `delete`, `repository_dispatch`, `release`, `deployment`, `deployment_status` | The same, from g1t's own pushes, pull requests, [work items](/guides/work-items/) linked to the repository, comments, [releases](#releases), [deployments](#deployments) and [merge queue](/guides/merge-queue/). `issues` is `work_item` on g1t, since issues became work items. `create` starts on each new branch or tag, at its commit; `delete` on each branch or tag a push deletes, on the default branch's latest commit, with `github.event.ref` and `github.event.ref_type` naming what went. As on GitHub, neither takes `branches` or `tags` filters: a workflow on them runs for every branch and tag. `repository_dispatch` starts on [a dispatch event](#repository-dispatch). | | |
| 32 | + | | `on:` `push` (branches, tags, paths), `pull_request`, `pull_request_target`, `work_item`, `work_item_comment`, `pull_request_review`, `schedule`, `workflow_dispatch`, `workflow_run`, `merge_group`, `create`, `delete`, `repository_dispatch`, `release`, `deployment`, `deployment_status` | The same, from g1t's own pushes, pull requests, [work items](/guides/work-items/) linked to the repository, comments, [releases](#releases), [deployments](#deployments) and [merge queue](/guides/merge-queue/). `work_item` and `work_item_comment` are g1t's own, in place of GitHub's `issues` and `issue_comment`, with `github.event.work_item` in place of `github.event.issue`; `work_item_comment` runs for comments on pull requests too, with `github.event.work_item.pull_request` set. A workflow on `issues` or `issue_comment` still reads, but starts nothing, and its page says to write `work_item` or `work_item_comment`. `create` starts on each new branch or tag, at its commit; `delete` on each branch or tag a push deletes, on the default branch's latest commit, with `github.event.ref` and `github.event.ref_type` naming what went. As on GitHub, neither takes `branches` or `tags` filters: a workflow on them runs for every branch and tag. `repository_dispatch` starts on [a dispatch event](#repository-dispatch). | | |
| 33 | 33 | | `jobs`, `needs`, `if`, `outputs`, `env`, `defaults`, `timeout-minutes`, `continue-on-error` | The same. | | |
| 34 | 34 | | `timeout-minutes` and `continue-on-error` on a step | The same, for `run:` and `uses:` steps alike. A `uses:` step's action is stopped at its limit, with every process it started; a step inside a composite action stops at its own limit or the `uses:` step's, whichever comes first. A step stopped this way fails, unless `continue-on-error` lets the job go on. | | |
| 35 | 35 | | `strategy.matrix` with `include` and `exclude`, `fail-fast`, `max-parallel`, a matrix from `fromJSON(needs.…)` | The same. | | |
| ⋯ | |||
| 1579 | 1579 | default, as `opened` and `synchronize` are), `converted_to_draft`, | |
| 1580 | 1580 | `ready_for_review`, `labeled`, `unlabeled`, `milestoned`, `demilestoned`, | |
| 1581 | 1581 | `assigned`, `review_requested` and `closed`, and `edited` when the branch | |
| 1582 | − | a pull request merges into changes; `issue_comment` workflows on | |
| 1583 | − | `created`, `edited` (with `github.event.changes.body.from`) and `deleted`; `work_item` workflows on `assigned`, `labeled`, `unlabeled`, `milestoned` and | |
| 1584 | − | `demilestoned` too. List them under `types:` to run on them. For | |
| 1582 | + | a pull request merges into changes; `work_item_comment` workflows on | |
| 1583 | + | `created`, `edited` (with `github.event.changes.body.from`) and `deleted`; `work_item` workflows on `assigned`, `labeled`, `unlabeled`, `milestoned`, | |
| 1584 | + | `demilestoned`, `linked`, `unlinked` and `landed` (a repository it targets landed it) too. List them under `types:` to run on them. For | |
| 1585 | 1585 | `labeled` and `unlabeled`, `github.event.label` names the label; for | |
| 1586 | 1586 | `assigned`, `github.event.assignee` names who was assigned. Assigning | |
| 1587 | 1587 | several people at once starts one run, which names the first of them. A pull | |
| ⋯ | |||
| 1677 | 1677 | push changed when it pushed one commit and a workflow on `push` has a | |
| 1678 | 1678 | `paths` or `paths-ignore` filter, which makes g1t compare the push. | |
| 1679 | 1679 | Otherwise, and for a push of several commits, they are empty lists. | |
| 1680 | + | - **On `work_item` and `work_item_comment`,** `work_item` is GitHub's | |
| 1681 | + | `issue`, with g1t's own fields beside it: `workspace` and | |
| 1682 | + | `workspace_url`; `repos`, each linked repository with its `full_name`, | |
| 1683 | + | `role` (`origin`, `target` or `touched`), `legacy_number` (its issue | |
| 1684 | + | number there before work items) and whether the work `landed` there; | |
| 1685 | + | `resolutions`, each with the `repository` and the `pull` or `commit` that | |
| 1686 | + | landed it; `blocked_by` and `pull_count`. On `linked` and `unlinked`, | |
| 1687 | + | `link` names the `repository` and its `role`; on `landed`, and on a | |
| 1688 | + | close a landing caused, `resolution` is what landed and `missing` the | |
| 1689 | + | targets still to land in. A comment's `item_url` is its work item in the | |
| 1690 | + | API. For a comment on a pull request, `work_item` is the pull request, | |
| 1691 | + | with `pull_request` set, as GitHub sends it. | |
| 1692 | + | - **On pull request events,** `pull_request.item` is the number of its | |
| 1693 | + | work item in the workspace, `item_url` that work item in the API, and | |
| 1694 | + | `closes` and `parts` the work items it closes and is part of. | |
| 1680 | 1695 | - **On pull request events,** `pull_request.base.sha` is the tip of the | |
| 1681 | 1696 | branch it merges into when the event happened, and | |
| 1682 | 1697 | `pull_request.merge_commit_sha` is set only once it is merged, to the | |
| ⋯ | |||
| 1815 | 1830 | | --- | --- | --- | | |
| 1816 | 1831 | | `contents` | Clone and fetch with git, read the repository | Push, publish releases | | |
| 1817 | 1832 | | `pull-requests` | Read pull requests | Open, review, close and merge them | | |
| 1818 | − | | `issues` | Read the work items linked to the repository | Open, edit, comment on and close them | | |
| 1833 | + | | `work` | Read the work items linked to the repository | Open, edit, comment on and close them | | |
| 1819 | 1834 | | `actions` | Read workflows, runs and logs | Run, cancel and re-run them | | |
| 1820 | 1835 | | `checks`, `statuses` | Read statuses and check runs | Report them | | |
| 1821 | 1836 | | `deployments`, `pages` | Read deployments | Report them | | |
| ⋯ | |||
| 1825 | 1840 | | `id-token` | Nothing | Ask for an [OIDC token](#oidc-tokens) | | |
| 1826 | 1841 | | `discussions`, `attestations`, `models`, `repository-projects` | Nothing on g1t | Nothing on g1t | | |
| 1827 | 1842 | ||
| 1843 | + | GitHub's `issues` permission grants nothing on g1t, which has work items | |
| 1844 | + | in place of issues; the workflow's page says to write `work` instead. | |
| 1845 | + | ||
| 1828 | 1846 | `read-all` and `write-all` set every permission; `permissions: {}` sets | |
| 1829 | 1847 | none, so the token cannot even clone a private repository. A reusable | |
| 1830 | 1848 | workflow's jobs get no more than the job that calls it. | |
| 874 | 874 | | `packages:read` | Pull container images and install private [packages](/guides/packages/). Public ones need no scope. | | |
| 875 | 875 | | `packages:write` | Push container images and publish packages; with the Admin role on a package, change its settings | | |
| 876 | 876 | | `packages:delete` | Delete and restore packages and their versions | | |
| 877 | − | | `work:read` | Read [work items](/guides/work-items/) and comments | | |
| 878 | − | | `work:write` | Open, edit, link, claim, close and comment on work items | | |
| 877 | + | | `work:read` | Read [work items](/guides/work-items/) and their comments, and the workspace's [labels](/guides/labels/) and [milestones](/guides/milestones/) | | |
| 878 | + | | `work:write` | Open, edit, link, claim, close, comment on and react to work items; manage labels and milestones | | |
| 879 | 879 | | `pull_requests:read` | Read pull requests, their changes, sessions and merge queues | | |
| 880 | − | | `pull_requests:write` | Open, review, close and merge pull requests | | |
| 880 | + | | `pull_requests:write` | Open, review, comment on, close and merge pull requests | | |
| 881 | 881 | | `workflows:read` | Read workflows, runs and logs | | |
| 882 | 882 | | `workflows:write` | Run, cancel, rerun and turn workflows on or off | | |
| 883 | 883 | | `workflow_files:write` | Add, change and delete [workflow files](#workflow-files) under `.g1t/workflows` and `.github/workflows`, with git or the API. Not in any preset. | |
| 14 | 14 | | Read and change anything on g1t from inside the agent | The MCP server at `https://mcp.g1t.sh`: [MCP tools](/reference/mcp/) | | |
| 15 | 15 | | Work from the agent's shell | The [g1t CLI](/guides/cli/): `g1t pr create`, `g1t pr checks --watch`, `g1t run logs --failed` | | |
| 16 | 16 | | Push code | git over HTTPS, signed in with `g1t auth setup-git` or an [access token](/guides/authentication/#access-tokens) | | |
| 17 | − | | Start the agent when something happens | [Webhooks](/guides/webhooks/), or a [workflow](/guides/actions/) on `issues` or `issue_comment` | | |
| 17 | + | | Start the agent when something happens | [Webhooks](/guides/webhooks/), or a [workflow](/guides/actions/) on `work_item` or `work_item_comment` | | |
| 18 | 18 | | Show people how a change was made | The pull request's [session](/guides/why-blame/#sessions) | | |
| 19 | 19 | | See who is working on what, and not collide | [Sessions, claims and dependencies](/guides/sessions/) | | |
| 20 | 20 | | Script anything else | The [REST API](/reference/api/), which has the same operations as the tools | | |
| ⋯ | |||
| 168 | 168 | combined with the pull requests ahead of it, g1t | |
| 169 | 169 | [says which ones and which check failed](/guides/merge-queue/#who-is-told): | |
| 170 | 170 | in the pull request's session, as an `integration_failure` decision | |
| 171 | − | (`pull_request` `list_decisions`), and as the `integration.failed` event. | |
| 171 | + | (`pull_request` `list_decisions`, and `work_item` `decisions` for its | |
| 172 | + | work item), and as the `integration.failed` event. | |
| 172 | 173 | The agent reads the other pull request's changes, fixes its own, and | |
| 173 | 174 | pushes; once the checks pass, the pull request rejoins the queue by | |
| 174 | 175 | itself. It can say what it changed with `pull_request` `record_decision` | |
| ⋯ | |||
| 286 | 287 | as `work_item.labeled`, `work_item.assigned`, `comment.created`, | |
| 287 | 288 | `checks.completed` or `workflow.completed`. Each delivery is signed. See | |
| 288 | 289 | [webhooks](/guides/webhooks/). | |
| 289 | − | - **Workflows.** A workflow in `.g1t/workflows/` can start on `issues` or | |
| 290 | − | `issue_comment` and run your agent's command line on a g1t runner, with | |
| 290 | + | - **Workflows.** A workflow in `.g1t/workflows/` can start on `work_item` or | |
| 291 | + | `work_item_comment` and run your agent's command line on a g1t runner, with | |
| 291 | 292 | its key in a [secret](/guides/secrets-and-variables/). See | |
| 292 | 293 | [GitHub Actions](/guides/actions/). | |
| 293 | 294 | - **Notifications.** An agent that works as you can read your inbox with | |
| 239 | 239 | ```sh | |
| 240 | 240 | g1t work list # open work items, newest first | |
| 241 | 241 | g1t work list --label bug --assignee @me | |
| 242 | − | g1t work list --repo acme/web # those linked to one repository | |
| 242 | + | g1t work list -R acme/web # those linked to one repository | |
| 243 | + | g1t work list -R acme/web --role target # those it is a target of | |
| 243 | 244 | g1t work view 12 --comments | |
| 244 | 245 | g1t work new --title "Greeting should name the caller" --body "Take a name from the first argument." | |
| 246 | + | g1t work new --title "Rename the flag" --target acme/api --target acme/docs | |
| 245 | 247 | g1t work comment 12 -b "Fixed in #14." | |
| 246 | 248 | g1t work edit 12 --add-label p1 --add-assignee @me | |
| 247 | − | g1t work link 12 --role target --repo acme/api | |
| 248 | − | g1t work unlink 12 --repo acme/api | |
| 249 | + | g1t work link 12 --role target -R acme/api | |
| 250 | + | g1t work unlink 12 -R acme/api | |
| 249 | 251 | g1t work close 12 --reason not_planned | |
| 250 | 252 | g1t work reopen 12 | |
| 251 | 253 | ``` | |
| 252 | 254 | ||
| 253 | 255 | [Work items](/guides/work-items/) belong to the workspace, and `g1t work` | |
| 254 | − | works on the current repository's workspace, or the one in `--workspace`. | |
| 255 | − | `g1t work new` makes the current repository the new work item's origin. | |
| 256 | + | works on the current repository's workspace, or the one in `--workspace` | |
| 257 | + | (or `G1T_WORKSPACE`). `-R` filters `g1t work list` to the work items | |
| 258 | + | linked to that repository, and names the repository `g1t work link` and | |
| 259 | + | `g1t work unlink` act on. | |
| 260 | + | `g1t work new` makes the current repository the new work item's origin, | |
| 261 | + | and `--target` names each repository it should land in. | |
| 256 | 262 | `g1t work view` shows the work item with its whole work context (see | |
| 257 | 263 | [Claims and context](#claims-and-context)). `@me` is you. At a terminal, | |
| 258 | 264 | `g1t work new` without `--title` asks for one and opens your editor for | |
| ⋯ | |||
| 272 | 278 | ||
| 273 | 279 | `--attach FILE` (repeat it for more) on `g1t work new`, `g1t work comment`, | |
| 274 | 280 | `g1t pr create`, `g1t pr comment` and `g1t pr ready` uploads each file and adds | |
| 275 | − | its Markdown after the text. An attachment is a PNG, JPEG, GIF or WebP image of | |
| 281 | + | its Markdown after the text. `g1t attach` and the `g1t pr` commands upload to | |
| 282 | + | the repository. `g1t work comment --attach` uploads to the work item, which | |
| 283 | + | keeps the files. `g1t work new --attach` uploads to the repository the work | |
| 284 | + | item is filed from; filed in the workspace alone (with `--workspace` and no | |
| 285 | + | repository of it here), it opens the work item first, then uploads to it and | |
| 286 | + | adds the Markdown to its description. An attachment is a PNG, JPEG, GIF or WebP image of | |
| 276 | 287 | at most 10 MB, judged by its bytes. It is served from g1t's usercontent address, | |
| 277 | 288 | never from g1t.sh, and its address is its permission: anyone given it can see | |
| 278 | 289 | the image, even from a private repository. Never commit an image to the | |
| 279 | 290 | repository just to link it. Through the API it is | |
| 280 | − | [`upload_attachment`](/reference/api/work-items/upload-attachment/). | |
| 291 | + | [`upload_attachment`](/reference/api/work-items/upload-attachment/) | |
| 292 | + | (`POST /repos/{owner}/{name}/attachments`) for a repository, and | |
| 293 | + | [`upload_work_item_attachment`](/reference/api/work-items/upload-work-item-attachment/) | |
| 294 | + | (`POST /workspaces/{workspace}/work/{number}/attachments`) for a work item. | |
| 281 | 295 | ||
| 282 | 296 | ### Pull requests | |
| 283 | 297 | ||
| ⋯ | |||
| 723 | 737 | | `G1T_TOKEN` | A token to use instead of the stored one. | | |
| 724 | 738 | | `G1T_HOST` | The host to use when no repository names one. | | |
| 725 | 739 | | `G1T_REPO` | The repository, as `[HOST/]OWNER/NAME`. | | |
| 740 | + | | `G1T_WORKSPACE` | The workspace `g1t work` works on, as `--workspace` says. | | |
| 726 | 741 | | `G1T_CONFIG_DIR` | Where to keep `config.json`. | | |
| 727 | 742 | | `G1T_KEYRING` | `off` keeps tokens out of the system's credential store. | | |
| 728 | 743 | | `G1T_PROMPT_DISABLED` | Never ask anything. | | |
| 121 | 121 | `PATCH /workspaces/{workspace}/work/{number}`, the `work_item` tool's | |
| 122 | 122 | `create` and `update`) and on `update_pull_request` set an item's labels, | |
| 123 | 123 | and `label` filters `list_work_items` and `list_pull_requests`. Managing | |
| 124 | − | labels needs a token with `work:write`. | |
| 124 | + | labels needs a token with `work:write`, and listing them `work:read`. |
| 200 | 200 | | Setting | Field | Default | What it does | | |
| 201 | 201 | | --- | --- | --- | --- | | |
| 202 | 202 | | Work items | `has_work_items` | On; off for a [fork](/concepts/forks/) | Whether work items can be filed in it, as their origin. Off keeps existing ones readable. `null` goes back to the default. `work_items_enabled` says whether they can be filed now. | | |
| 203 | − | | Land work items with merged linked pull requests | `auto_close_work_items` | On | A pull request that merges into the default branch lands this repository on its work item and on those it names after a [closing keyword](/guides/pull-requests/#closing-work-items), and so does a commit pushed to the default branch whose message names them. A work item closes once every repository it targets has landed, or at the first landing when it has no target. | | |
| 203 | + | | Land work items with merged linked pull requests | `auto_close_items` | On | A pull request that merges into the default branch lands this repository on its work item and on those it names after a [closing keyword](/guides/pull-requests/#closing-work-items), and so does a commit pushed to the default branch whose message names them. A work item closes once every repository it targets has landed, or at the first landing when it has no target. | | |
| 204 | 204 | ||
| 205 | 205 | ```sh | |
| 206 | 206 | curl -X PATCH https://api.g1t.sh/repos/acme/rocket/settings \ |
| 146 | 146 | commits its method made, which are the commits its checks ran on. The pull | |
| 147 | 147 | request is recorded as merged by its method, with the commit `main` moved | |
| 148 | 148 | to as its merge commit. Its work item records the repository as landed, and the other pull | |
| 149 | − | requests for it are superseded, as with any merge. | |
| 149 | + | requests for it in the repository are superseded, as with any merge. | |
| 150 | 150 | ||
| 151 | 151 | Current reviews and branch rules are checked again before publication, | |
| 152 | 152 | against the combined commit's checks and the entry's merge method. Once publication starts, removal, | |
| ⋯ | |||
| 370 | 370 | queue: from the `integration.failed` event, from the note in the pull | |
| 371 | 371 | request's session (`pull_request` `read_session`), or from its decisions | |
| 372 | 372 | (`pull_request` `list_decisions`, or | |
| 373 | − | `GET /repos/{owner}/{name}/pulls/{number}/decisions`). | |
| 373 | + | `GET /repos/{owner}/{name}/pulls/{number}/decisions`), and those of its | |
| 374 | + | work item and all its pull requests from `work_item` `decisions` | |
| 375 | + | (`GET /workspaces/{workspace}/work/{number}/decisions`). | |
| 90 | 90 | `update_pull_request`; `null` or `0` takes it out. Work items and pull | |
| 91 | 91 | requests carry `milestone` as `{"number", "title"}`, and `milestone` | |
| 92 | 92 | filters `list_work_items` and `list_pull_requests`. Managing milestones | |
| 93 | − | needs a token with `work:write`. | |
| 93 | + | needs a token with `work:write`, and reading them `work:read`. | |
| 94 | 94 | ||
| 95 | 95 | [Dependency updates](/guides/dependency-updates/) put their pull requests | |
| 96 | 96 | in the milestone their entry's `milestone` names. |
| 4 | 4 | --- | |
| 5 | 5 | ||
| 6 | 6 | The phone app is meant to be g1t on Android and iOS, with its own | |
| 7 | − | screens for what you do away from a desk: talking with your team in | |
| 7 | + | screens for what you do away from a desk: triaging and discussing | |
| 8 | + | [work items](/guides/work-items/) in Work, talking with your team in | |
| 8 | 9 | Chat, with notifications on your phone, and reviewing pull requests in | |
| 9 | 10 | Code. Everything else opens on the site, in your phone's browser. | |
| 10 | 11 | ||
| ⋯ | |||
| 50 | 51 | | Tab | What is on it | | |
| 51 | 52 | | --- | --- | | |
| 52 | 53 | | **Home** | Coming. Opens Home on the site meanwhile. | | |
| 54 | + | | **Work** | The workspace's work items, for every member, Code access or not. See [Work](#work). | | |
| 53 | 55 | | **Chat** | Your starred conversations, channels and direct messages, with what is unread, moving live. See [Chat](#chat). | | |
| 54 | 56 | | **Notifications** | Coming. Opens your notifications on the site meanwhile; messages to you already arrive [on the phone](#notifications). | | |
| 55 | − | | **Code** | The workspace's repositories, each with its pull requests and work items. A pull request shows its description, checks, conversation and changed files, and you can approve it or ask for changes. A work item shows the pull requests made for it, and you can comment. Shown when you use Code in the workspace. | | |
| 56 | − | | **More** | Whether this phone gets notifications, your workspaces, how you signed in, and **Sign out**. | | |
| 57 | + | | **More** | **Code**, for members with Code access; whether this phone gets notifications, your workspaces, how you signed in, and **Sign out**. | | |
| 58 | + | ||
| 59 | + | **Code**, under **More**, is the workspace's repositories, each with its | |
| 60 | + | pull requests and its **Work**: the work items linked to it. A pull | |
| 61 | + | request shows its description, checks, conversation and changed files, | |
| 62 | + | and you can approve it or ask for changes. | |
| 63 | + | ||
| 64 | + | ## Work | |
| 57 | 65 | ||
| 66 | + | Work on the phone is the site's [Work](/guides/work-items/), laid out for | |
| 67 | + | one hand. | |
| 68 | + | ||
| 69 | + | - **The list** shows the workspace's open work items, newest first: each | |
| 70 | + | with its number, title, state, labels and the repositories it is linked | |
| 71 | + | to, which fold into "+2" past the first few. Pull down to read it | |
| 72 | + | again; it loads more as you near its end. | |
| 73 | + | - **Filters** are in a sheet: tap the filter button in the header, a | |
| 74 | + | filter's chip above the list, or **Work** in the bar again. Choose the | |
| 75 | + | state, **Assigned to me**, a label, a milestone, a repository and its role. | |
| 76 | + | - **A work item** shows its description and comments (in Markdown, with | |
| 77 | + | `#123` references opening what they name), its labels, milestone and | |
| 78 | + | assignees, and under them its repositories: each with its role, its pull | |
| 79 | + | requests for the item and whether the work **landed** there, and which | |
| 80 | + | targets are still missing. **Suggested** repositories can be added as | |
| 81 | + | targets with a tap. | |
| 82 | + | - **The bar at its foot** comments. Its **⋯** closes the work item (as | |
| 83 | + | done, or as not planned), reopens it, links a repository as a target, | |
| 84 | + | copies its link, or opens it on the site. Tap a repository to open it or | |
| 85 | + | unlink it. | |
| 86 | + | - **New work item** (the **+** on Work) takes a title, a description, | |
| 87 | + | labels and the repositories it should land in; none is fine. Opened from | |
| 88 | + | a repository's Work, that repository is its origin. | |
| 89 | + | ||
| 58 | 90 | ## Chat | |
| 59 | 91 | ||
| 60 | 92 | Chat on the phone is the site's Chat: the same conversations, as they | |
| ⋯ | |||
| 128 | 160 | ||
| 129 | 161 | | Link | Opens | | |
| 130 | 162 | | --- | --- | | |
| 163 | + | | `g1t://<workspace>/-/work`, with the list's filters (`?repo=web&label=bug`) | Work, filtered as the link says | | |
| 164 | + | | `g1t://<workspace>/-/work/<number>` | The work item | | |
| 165 | + | | `g1t://<workspace>/-/work/new` | A new work item | | |
| 131 | 166 | | `g1t://<workspace>/-/chat`, `…/-/chat/<channel>`, `…/-/chat/dm/<id>` | Chat, or the conversation, in that workspace | | |
| 132 | 167 | | `g1t://<owner>/<repo>` | The repository | | |
| 133 | 168 | | `g1t://<owner>/<repo>/pull/<number>` | The pull request | | |
| 169 | + | | `g1t://<owner>/<repo>/issues/<number>` | What that old issue number names in the repository: the work item the issue became, or a pull request. The app asks g1t, as the site does. `…/issues` and `…/issues/new` open Work filtered to the repository, and a new work item from it. | | |
| 134 | 170 | ||
| 171 | + | The same paths as `https://g1t.sh/…` links, such as | |
| 172 | + | `https://g1t.sh/<workspace>/-/work/<number>`, open these screens once | |
| 173 | + | g1t.sh publishes the files Android and iOS check first (see | |
| 174 | + | [below](#whats-not-there-yet)). The workspace's labels and milestones open | |
| 175 | + | on the site. | |
| 176 | + | ||
| 135 | 177 | Any other page opens on the site, in the browser. | |
| 136 | 178 | ||
| 137 | 179 | ## Your own g1t | |
| ⋯ | |||
| 171 | 213 | page; iOS waits for the App Store. | |
| 172 | 214 | - **Home, Notifications and Artifacts** as tabs of their own. | |
| 173 | 215 | Their pages open on the site meanwhile. | |
| 174 | − | - **Formatting in Code.** Descriptions and comments show their Markdown | |
| 175 | − | as written; messages in Chat are formatted. | |
| 216 | + | - **More of Work.** Changing an existing work item's labels, assignees | |
| 217 | + | or milestone, reacting, and the workspace's **Labels** and | |
| 218 | + | **Milestones** pages are on the site for now. | |
| 176 | 219 | - **Attachments and custom emoji.** Files in messages, and a | |
| 177 | 220 | workspace's own `:emoji:`, show as their names. | |
| 178 | 221 | - **Replying from a notification**, without opening the app. | |
| 196 | 196 | ||
| 197 | 197 | A repository's pages keep up with it while you are on them, without a | |
| 198 | 198 | reload and whatever you watch: new commits, pull requests, checks, runs | |
| 199 | − | and comments appear as they happen. | |
| 199 | + | and comments appear as they happen. So do a workspace's Work pages, for | |
| 200 | + | its members. | |
| 200 | 201 | ||
| 201 | 202 | | Page | Updates when | | |
| 202 | 203 | | --- | --- | | |
| ⋯ | |||
| 204 | 205 | | **Commits** | Commits are pushed to the branch. They wait under a **3 new commits · Show** bar at the top instead of moving the list while you read; checks on the commits shown update in place. | | |
| 205 | 206 | | **Branches** | A branch is pushed, created, renamed or deleted. | | |
| 206 | 207 | | **Tags** | A tag is pushed or deleted, or a release is published. | | |
| 207 | − | | **Pull requests** and **Work** | One is opened, updated, reviewed, commented on, checked, merged or closed. | | |
| 208 | + | | **Pull requests** | One is opened, updated, reviewed, commented on, checked, merged or closed. | | |
| 209 | + | | **Work**, and a repository's **Work** tab | Any of the workspace's work items is opened, changed, labeled, linked, claimed, commented on, closed or reopened. | | |
| 208 | 210 | | A **pull request** | Commits are pushed to it, its checks report, someone reviews or comments, or it is merged or closed. New items join its timeline where you are reading; if you are at the end of the page, it follows them down. | | |
| 209 | − | | A **work item** | Someone comments on it or changes it, or a pull request linked to it moves. | | |
| 211 | + | | A **work item** | Someone comments on it or changes it, links a repository, claims it, or a pull request for it lands. If you are at the end of the page, it follows new items down. | | |
| 210 | 212 | | **Actions** and a **run** | A run starts, one of its jobs starts or finishes, or the run finishes. A running job's log streams on its own. | | |
| 211 | 213 | | **Security** | An alert is opened, fixed, dismissed or reopened. | | |
| 212 | 214 | | Your workspace's **Home** | Something lands, runs, deploys or comes to need you in its projects (the first 25). See [Home](/guides/home/#while-the-page-is-open). | | |
| ⋯ | |||
| 228 | 230 | minutes and is renewed while the page stays open, so someone who loses | |
| 229 | 231 | access stops hearing of the repository within that time. | |
| 230 | 232 | ||
| 233 | + | A workspace's Work pages follow the workspace instead, since a work item | |
| 234 | + | may link many repositories or none: opening one asks to follow the | |
| 235 | + | workspace's work items, and g1t first checks you are a member. Each | |
| 236 | + | change sends a note naming only what kind of thing changed and the work | |
| 237 | + | item's number. The Work list reads itself again on any of them, a work | |
| 238 | + | item's page on its own. Following lasts fifteen minutes and is renewed | |
| 239 | + | the same way. Someone who is not a member, such as a reader of a public | |
| 240 | + | repository's work items, gets the fallback below. | |
| 241 | + | ||
| 231 | 242 | Signed out, on a public repository, or while the live connection is down, | |
| 232 | 243 | pages fall back to checking for themselves: when you come back to the tab | |
| 233 | 244 | (at most every 30 seconds), and once a minute while it is in view. | |
| ⋯ | |||
| 396 | 407 | ||
| 397 | 408 | `GET /repos/{owner}/{name}/notifications` and | |
| 398 | 409 | `PUT /repos/{owner}/{name}/notifications` list and mark one repository's | |
| 399 | − | threads. Every action of the `notifications` tool is in | |
| 410 | + | threads. A thread's `subject` is what it is about: `item` for a work | |
| 411 | + | item, `pull`, `run` or `deploy`. A work item's thread id is `item:` and the work | |
| 412 | + | item's id. Watching a repository at **Custom** takes the kinds | |
| 413 | + | `work_items`, `pulls`, `deployments` and `security`. Every action of the `notifications` tool is in | |
| 400 | 414 | [MCP tools](/reference/mcp/#notifications). | |
| 401 | 415 | ||
| 402 | 416 | For example, to list the reviews waiting on you: | |
| 78 | 78 | marked **Resolve** opens again if it happens again; **Ignore** keeps it | |
| 79 | 79 | quiet. | |
| 80 | 80 | ||
| 81 | + | An error group names its work item as `item`, its number in the | |
| 82 | + | workspace; `update_error` with `item_number` links one, and `null` unlinks | |
| 83 | + | it. A group linked to an issue before work items, whose work item is not | |
| 84 | + | known yet, has that issue's number as `legacy_issue`. | |
| 85 | + | ||
| 81 | 86 | ## Apps on g1t.page | |
| 82 | 87 | ||
| 83 | 88 | Nothing to set up. Every request reaches an app through g1t.page's |
| 354 | 354 | preview.png` on `g1t pr create`, `g1t pr ready`, `g1t pr comment`, | |
| 355 | 355 | `g1t work new` and `g1t work comment` adds it for you (see the | |
| 356 | 356 | [CLI guide](/guides/cli/#images-in-descriptions-and-comments)). Through the API it is | |
| 357 | − | `POST /repos/{owner}/{name}/attachments` with `name`, the file | |
| 358 | − | base64-encoded in `data`, and optionally `content_type`; it answers with | |
| 359 | − | `id`, `url`, `content_type`, `size` and `markdown`. On the MCP server it is | |
| 360 | − | the `work_item` tool's `attach` action. | |
| 357 | + | [`POST /repos/{owner}/{name}/attachments`](/reference/api/work-items/upload-attachment/) | |
| 358 | + | with `name`, the file base64-encoded in `data`, and optionally | |
| 359 | + | `content_type`; it answers with `id`, `url`, `content_type`, `size` and | |
| 360 | + | `markdown`. A work item keeps its own: | |
| 361 | + | [`POST /workspaces/{workspace}/work/{number}/attachments`](/reference/api/work-items/upload-work-item-attachment/) | |
| 362 | + | takes the same and answers the same, so a work item filed with no | |
| 363 | + | repository takes images too; anyone who may comment on the work item may. | |
| 364 | + | On the MCP server they are the `pull_request` tool's `attach` action and | |
| 365 | + | the `work_item` tool's. | |
| 361 | 366 | ||
| 362 | 367 | An attachment is a PNG, JPEG, GIF or WebP image of at most 10 MB, judged by | |
| 363 | 368 | its bytes: a larger file is refused with `413` (`too_large`), anything else |
| 65 | 65 | | `org:acme` or `workspace:acme` | One workspace | Repositories, code, work items, pull requests | | |
| 66 | 66 | | `language:rust` | Code in a language, or repositories mostly written in it. `ts`, `js`, `py` and `cpp` are understood | Repositories, code | | |
| 67 | 67 | | `path:src/` | Code whose path contains `src/`. With `*`, a pattern: `path:*.rs`, `path:src/*/mod.rs` | Code | | |
| 68 | − | | `is:item`, `is:pr` | Only work items, or only pull requests | Work items, pull requests | | |
| 68 | + | | `is:item` (or `is:items`), `is:pr` | Only work items, or only pull requests | Work items, pull requests | | |
| 69 | 69 | | `is:open`, `is:closed` | Work items and pull requests by state | Work items, pull requests | | |
| 70 | 70 | | `is:merged`, `is:draft` | Pull requests that were merged, or are still drafts | Pull requests | | |
| 71 | 71 | | `is:public`, `is:private` | Results from public or private repositories | Repositories, code, work items, pull requests | |
| 53 | 53 | what the merge queue found when it combined changes. | |
| 54 | 54 | - **Just landed**: the latest merges, each with a link to the session | |
| 55 | 55 | behind it. | |
| 56 | + | - **Recorded on pull requests**: the latest sessions recorded on its pull | |
| 57 | + | requests, each opening that pull request's session. | |
| 56 | 58 | ||
| 57 | 59 | With nothing going on, choose your client in the | |
| 58 | 60 | [connection instructions](/guides/bring-your-own-agent/), or run | |
| ⋯ | |||
| 67 | 69 | the latest combination that failed in the merge queue, and its | |
| 68 | 70 | [decision records](/guides/why-blame/#decision-records), each marked | |
| 69 | 71 | **Claimed**, **Tested** or **Approved**. | |
| 70 | − | - **A session's page**, `g1t.sh/<owner>/<repo>/sessions/<id>`, | |
| 71 | − | opened from any of these: who ran it, in which harness and on which | |
| 72 | + | - **A session's page**, `g1t.sh/<owner>/<repo>/sessions/<id>` (the | |
| 73 | + | `ses_…` id; a pull request's number there goes to that pull request's | |
| 74 | + | recorded session, `…/pull/<number>/session`), opened from any of these: who ran it, in which harness and on which | |
| 72 | 75 | model, how long it has run, the work items and pull requests it and its | |
| 73 | 76 | subagents worked on (each says how it was tied), its subagents as a tree | |
| 74 | 77 | you open one at a time (each with its kind, the task it was given, what | |
| 54 | 54 | ||
| 55 | 55 | A work item belongs to the workspace, not to one repository, so a | |
| 56 | 56 | `work_item.` event's `data` has `workspace`, `number`, `item_id` and | |
| 57 | − | `repo_ids`, every repository linked to it. Each of those repositories' | |
| 58 | − | webhooks gets it, and so do the workspace's. | |
| 57 | + | `repo_ids`, every repository linked to it, its origin first. Each of | |
| 58 | + | those repositories' webhooks gets it, with `repository` naming that | |
| 59 | + | repository, and so do the workspace's, with `repository` naming the | |
| 60 | + | origin, or null for a work item filed in the workspace alone. | |
| 59 | 61 | ||
| 60 | 62 | With these headers: | |
| 61 | 63 | ||
| ⋯ | |||
| 92 | 94 | | `work_item.labeled`, `work_item.unlabeled`, `pull.labeled`, `pull.unlabeled` | A [label](/guides/labels/) was put on a work item or a pull request, or taken off: one event for each label. `data.number` and `data.label` (`name` and `color`). | | |
| 93 | 95 | | `work_item.milestoned`, `work_item.demilestoned`, `pull.milestoned`, `pull.demilestoned` | A work item or a pull request was put in a [milestone](/guides/milestones/), or taken out of one. `data.milestone` (`number` and `title`). Moving it from one to another is both. | | |
| 94 | 96 | | `pull.base_changed` | The branch a pull request merges into changed. `data.base` names it. See [pull requests into other branches](/guides/base-branches/). | | |
| 95 | − | | `work_item.opened`, `work_item.updated`, `work_item.assigned`, `work_item.closed`, `work_item.reopened` | A [work item](/guides/work-items/) changed. `data.workspace`, `data.number`, `data.item_id`, `data.repo_ids` and `data.author` (`id` and `username`); on close, `data.reason` and `data.resolutions` (each the `repo` and the `pull` request or default-branch `commit` that landed it), and `data.session` when it was closed in a session; on assignment, `data.assignees` and the newly assigned `data.added`. | | |
| 96 | − | | `work_item.linked`, `work_item.unlinked` | A repository was linked to a work item in a role, or unlinked. `data.workspace`, `data.number`, `data.item_id`, `data.repo_ids`, and the repository and its role. | | |
| 97 | + | | `work_item.opened`, `work_item.updated`, `work_item.assigned`, `work_item.closed`, `work_item.reopened` | A [work item](/guides/work-items/) changed. `data.workspace`, `data.number`, `data.item_id`, `data.repo_ids` and `data.author` (`id` and `username`); on close, `data.reason`, `data.resolution` when a landing closed it (the `repo` and the `pull` request or default-branch `commit` that landed it), and `data.session` when it was closed in a session; on assignment, `data.assignees` and the newly assigned `data.added`. | | |
| 98 | + | | `work_item.linked`, `work_item.unlinked` | A repository was linked to a work item in a role, or unlinked. `data.workspace`, `data.number`, `data.item_id`, `data.repo_ids`, `data.repo` (`owner/name`) and `data.role`. | | |
| 99 | + | | `work_item.landed` | A pull request or a default-branch commit landed a work item in one of its repositories. `data.resolution` (the `repo`, and the `pull` or `commit`) and `data.missing`, the targets it has still to land in. When nothing is left, `work_item.closed` follows. | | |
| 97 | 100 | | `comment.created` | A comment or review on a work item or pull request. | | |
| 98 | 101 | | `comment.edited` | A comment's text was [edited](/guides/pull-requests/#editing-and-deleting-comments). `data.comment_id`, `data.number`, `data.pull_id` on a pull request, and `data.changes.body.from`, what it said before. | | |
| 99 | 102 | | `comment.deleted` | A comment was [deleted](/guides/pull-requests/#editing-and-deleting-comments). `data.comment_id`, `data.number`, `data.pull_id` on a pull request, and `data.comment` as it was: `id`, `body`, `author` (`id` and `username`), `created_at`, `path` and `line`. | | |
| 179 | 179 | recorded, with the harness sessions working on it; a work item lists its | |
| 180 | 180 | own and its pull requests' under them, from every repository it links. | |
| 181 | 181 | ||
| 182 | − | Read them with the `pull_request` tool's `list_decisions` action, with | |
| 183 | − | `GET /repos/{owner}/{name}/pulls/{number}/decisions`, or for a work item | |
| 184 | − | and all its pull requests in its `decisions`, from `g1t work view` or | |
| 182 | + | Read a pull request's with the `pull_request` tool's `list_decisions` | |
| 183 | + | action or | |
| 184 | + | [`GET /repos/{owner}/{name}/pulls/{number}/decisions`](/reference/api/decisions-and-why/list-decisions/). | |
| 185 | + | Read a work item's, with those of all its pull requests, with the | |
| 186 | + | `work_item` tool's `decisions` action or | |
| 187 | + | [`GET /workspaces/{workspace}/work/{number}/decisions`](/reference/api/work-items/list-work-item-decisions/); | |
| 188 | + | they are also in the `decisions` of `g1t work view` and | |
| 185 | 189 | [`GET /workspaces/{workspace}/work/{number}/work`](/reference/api/work-items/get-work/). | |
| 186 | 190 | A decision is as visible as the repository, so do not put secrets in one. | |
| 187 | 191 |
| 128 | 128 | example the items a repository is a target of). The address keeps the | |
| 129 | 129 | filters, so a filtered list can be shared. | |
| 130 | 130 | ||
| 131 | + | Work's sidebar has **Open**, **Assigned to you** and **Closed**, then | |
| 132 | + | **New work item**, **Labels** and **Milestones**. On a phone, the bar | |
| 133 | + | along the bottom is **Home**, **Work**, **Chat**, **Notifications** and | |
| 134 | + | **More**, with **Work** there for every member, Code access or not, and | |
| 135 | + | **Code** first in **More**. Tapping **Work** again opens that sidebar. | |
| 136 | + | ||
| 131 | 137 | A repository's **Work** tab is the same list, filtered to the work items | |
| 132 | 138 | linked to that repository: `g1t.sh/<workspace>/-/work?repo=<name>`. | |
| 133 | 139 | ||
| ⋯ | |||
| 143 | 149 | ||
| 144 | 150 | ```sh | |
| 145 | 151 | g1t work new --title "Sign-in times out on slow networks" --body "…" | |
| 152 | + | g1t work new --title "Rename the flag" --target acme/api --target acme/docs | |
| 146 | 153 | ``` | |
| 147 | 154 | ||
| 148 | − | `--workspace` opens one in a workspace with no repository as its origin. | |
| 155 | + | `--target` names a repository it should land in; repeat it for more. | |
| 156 | + | `--workspace`, outside a repository of that workspace, opens one with no | |
| 157 | + | repository as its origin. | |
| 149 | 158 | ||
| 150 | 159 | ## Work on one | |
| 151 | 160 | ||
| ⋯ | |||
| 163 | 172 | ## The CLI | |
| 164 | 173 | ||
| 165 | 174 | `g1t work` works on the current repository's workspace, or the one in | |
| 166 | − | `--workspace`. Every command takes `--json`. | |
| 175 | + | `--workspace` (or the `G1T_WORKSPACE` environment variable). `-R` (or | |
| 176 | + | `--repo`) `owner/name` names a repository instead of the current one: | |
| 177 | + | it filters `g1t work list`, and is the repository `g1t work link` and | |
| 178 | + | `g1t work unlink` act on. Every command takes `--json`. | |
| 167 | 179 | ||
| 168 | 180 | | Command | Does | | |
| 169 | 181 | | --- | --- | | |
| 170 | − | | `g1t work list` | Lists open work items. `--repo`, `--state`, `--label`, `--milestone`, `--assignee` narrow it. | | |
| 182 | + | | `g1t work list` | Lists open work items. `-R`, `--state`, `--label`, `--milestone`, `--assignee` and `--author` narrow it; with `-R`, `--role` keeps those linked to the repository in one role. | | |
| 171 | 183 | | `g1t work view N` | Shows the work item with everything about its work: its repositories and what landed, claims, sessions, pull requests, what blocks it, decisions. | | |
| 172 | − | | `g1t work new` | Opens a work item. | | |
| 184 | + | | `g1t work new` | Opens a work item; `--target` for each repository it should land in. `--attach FILE` adds an image to its description: uploaded to the repository it is filed from, or, filed in the workspace alone, to the work item once it is open. | | |
| 185 | + | | `g1t work comment N` | Comments on it. `--attach FILE` uploads an image to the work item and adds it to the comment. | | |
| 173 | 186 | | `g1t work edit N` | Changes its title, description, labels, assignees or milestone. | | |
| 174 | − | | `g1t work close N` | Closes it, as completed, or `--reason not_planned`. | | |
| 187 | + | | `g1t work close N` | Closes it, as completed, or `--reason not_planned`. `--commit SHA` names a commit on the default branch that did it, which lands it there. | | |
| 175 | 188 | | `g1t work reopen N` | Opens it again. | | |
| 176 | − | | `g1t work link N` | Links a repository in a role: `--role target` (the default), with the current repository or `--repo owner/name`. | | |
| 177 | − | | `g1t work unlink N` | Unlinks a repository. | | |
| 189 | + | | `g1t work link N` | Links a repository in a role: `--role target` (the default) or `touched`, the current repository or `-R owner/name`. | | |
| 190 | + | | `g1t work unlink N` | Unlinks a repository, never its origin. | | |
| 178 | 191 | | `g1t work claim N` | Says you are working on it. With `--title` instead of a number, opens a work item and claims it. | | |
| 179 | 192 | | `g1t work release N` | Lets go of your claim. | | |
| 180 | 193 | | `g1t work handoff N` | Hands it to someone else, or to anyone, with a note. | | |
| 181 | 194 | | `g1t work status` | The repository's active claims and sessions. | | |
| 195 | + | | `g1t work block N --by M` | Says it waits on work item M; `g1t work unblock N --by M` takes that back. | | |
| 196 | + | | `g1t work events` | The repository's events; `--follow` keeps printing them, `--item N` for one work item. | | |
| 197 | + | | `g1t work dispatch N` | Starts work on it in a session on your own Claude, or prints the Claude Code command for it. | | |
| 182 | 198 | ||
| 183 | 199 | [CLI commands](/reference/cli/#g1t-work) lists every flag. | |
| 184 | 200 | ||
| 185 | 201 | ## MCP and the API | |
| 186 | 202 | ||
| 187 | 203 | The MCP server's `work_item` tool takes an `action`: `list`, `get`, | |
| 188 | − | `create`, `update`, `close`, `reopen`, `link`, `unlink`, `comment`, | |
| 189 | − | `claim`, `release`, `handoff`, `work` and `import`, among others. It takes | |
| 204 | + | `create`, `update`, `close`, `reopen`, `links`, `link`, `unlink`, the | |
| 205 | + | label actions, `comment`, `react`, `attach`, `decisions`, `resolve`, `claim`, | |
| 206 | + | `release`, `handoff`, `work` and `import`, among others. A workspace's | |
| 207 | + | labels and milestones are on the `workspace` tool, and a repository's | |
| 208 | + | work list is the `repository` tool's `work`. It takes | |
| 190 | 209 | `workspace` and `number`; `repo` is optional, as the origin of a new work | |
| 191 | 210 | item, a filter, or to find the workspace. See [MCP tools](/reference/mcp/). | |
| 192 | 211 | ||
| ⋯ | |||
| 199 | 218 | | Get one | `GET /workspaces/{workspace}/work/{number}` | | |
| 200 | 219 | | Change one | `PATCH /workspaces/{workspace}/work/{number}` | | |
| 201 | 220 | | Close or reopen it | `POST /workspaces/{workspace}/work/{number}/close`, `…/reopen` | | |
| 221 | + | | Its repositories | `GET /workspaces/{workspace}/work/{number}/links` | | |
| 202 | 222 | | Link or unlink a repository | `POST` or `DELETE /workspaces/{workspace}/work/{number}/links` | | |
| 203 | − | | Comment | `POST /workspaces/{workspace}/work/{number}/comments` | | |
| 223 | + | | Its labels | `GET`, `POST`, `PUT` or `DELETE /workspaces/{workspace}/work/{number}/labels` | | |
| 224 | + | | Comment | `POST /workspaces/{workspace}/work/{number}/comments`; `PATCH` or `DELETE /workspaces/{workspace}/work/comments/{id}` | | |
| 225 | + | | React | `POST /workspaces/{workspace}/work/{number}/reactions` | | |
| 226 | + | | Upload an image for it | [`POST /workspaces/{workspace}/work/{number}/attachments`](/reference/api/work-items/upload-work-item-attachment/), with `work:write`; anyone who may comment on it may | | |
| 227 | + | | Its decisions, with its pull requests' | `GET /workspaces/{workspace}/work/{number}/decisions` | | |
| 228 | + | | Watch it | `GET`, `PUT` or `DELETE /workspaces/{workspace}/work/{number}/subscription` | | |
| 204 | 229 | | Its work context | `GET /workspaces/{workspace}/work/{number}/work` | | |
| 205 | 230 | | Claim, release, hand off | `POST /workspaces/{workspace}/work/{number}/claim`, `…/release`, `…/handoff` | | |
| 206 | 231 | | A repository's work items | `GET /repos/{owner}/{name}/work` | | |
| 232 | + | | What `#N` names | `GET /repos/{owner}/{name}/refs/{number}`, or `GET /workspaces/{workspace}/refs/{number}` | | |
| 233 | + | | The workspace's labels and milestones | `/workspaces/{workspace}/labels`, `/workspaces/{workspace}/milestones` | | |
| 207 | 234 | ||
| 208 | 235 | ```sh | |
| 209 | 236 | curl -X POST https://api.g1t.sh/workspaces/acme/work \ | |
| 696 | 696 | ||
| 697 | 697 | | Part | Where | What it holds | | |
| 698 | 698 | | --- | --- | --- | | |
| 699 | − | | **The rail** | A narrow column of icons down the left edge | g1t's mark, which goes to [Home](/guides/home/); the built-in apps; and at its foot **People**, **Workspace** and your account. Hold the pointer over an icon for its name. | | |
| 699 | + | | **The rail** | A narrow column of icons down the left edge | g1t's mark, which goes to [Home](/guides/home/); the built-in apps, with **Explore** after **Work**; the apps you pinned; and at its foot **Apps**, **People**, **Workspace** and your account. Hold the pointer over an icon for its name. | | |
| 700 | 700 | | **The sidebar** | Flush against the rail | The workspace and its switcher at the top, **Search or jump to**, then the lists of the app you are in, in named groups. Home has none. | | |
| 701 | 701 | | **The page** | The rest of the window, flat against the sidebar | Its header: the button that shows or hides the sidebar, where you are, **Search or jump to** (<kbd>Ctrl</kbd> <kbd>K</kbd>, or <kbd>⌘</kbd> <kbd>K</kbd> on a Mac) when the sidebar is hidden or has a search of its own, the [notifications](/guides/notifications/) bell and **Create new**. Then the page itself. | | |
| 702 | 702 | ||
| 703 | 703 | ### The rail | |
| 704 | 704 | ||
| 705 | − | The built-in apps are always in the rail, each an icon with what is | |
| 706 | − | unread on it: | |
| 705 | + | The built-in apps are always in the rail, in this order from the top, | |
| 706 | + | each an icon with what is unread on it: | |
| 707 | 707 | ||
| 708 | 708 | | App | Opens | | |
| 709 | 709 | | --- | --- | | |
| 710 | 710 | | **Home** | Where you're needed across the workspace, and what happened while you were away. See [Home](/guides/home/). | | |
| 711 | − | | **Work** | The workspace's work items, with its labels and milestones, at `g1t.sh/<workspace>/-/work`. See [work items](/guides/work-items/). | | |
| 711 | + | | **Work** | The workspace's work items, with its labels and milestones, at `g1t.sh/<workspace>/-/work`. Every member has it, with Code access or not. See [work items](/guides/work-items/). | | |
| 712 | + | | **Explore** | g1t beyond your workspaces: public projects, people and other workspaces. | | |
| 712 | 713 | | **Chat** | Channels and messages. See [Chat](/guides/chat/). | | |
| 713 | − | | **Notifications** | Reviews, mentions and failures. See [notifications](/guides/notifications/). | | |
| 714 | 714 | | **Code** | Projects, pull requests and checks. Not shown to a member without Code access. | | |
| 715 | 715 | | **Artifacts** | Documents, decks and pages. See [artifacts](/guides/artifacts/). | | |
| 716 | + | | **Routines** | Standing work g1t will run by itself, on a schedule or when something happens. Not available yet: the page shows what it will hold. | | |
| 717 | + | ||
| 718 | + | Under them come the apps you pinned. At the foot of the rail: | |
| 719 | + | ||
| 720 | + | | App | Opens | | |
| 721 | + | | --- | --- | | |
| 722 | + | | **Apps** | Every app the workspace has, to open one or pin it to the rail. | | |
| 716 | 723 | | **People** | Everyone in the workspace, and its [teams](/guides/teams/). See [people and teams](/guides/people-and-teams/). | | |
| 717 | 724 | | **Workspace** | The workspace's settings: who has access, money, compute, and how each part of g1t is set up. See [Workspace mode](#workspace-mode). | | |
| 718 | 725 | ||
| 726 | + | [Notifications](/guides/notifications/) are the bell in the page's header. | |
| 727 | + | ||
| 719 | 728 | The app you are in sits on a filled square. Your account is the | |
| 720 | 729 | avatar at the foot: your status, your profile and settings, | |
| 721 | 730 | [appearance](#appearance), the documentation, support, status, the | |
| ⋯ | |||
| 868 | 877 | ||
| 869 | 878 | | | What it does | | |
| 870 | 879 | | --- | --- | | |
| 871 | − | | **The bar along the bottom** | **Home**, **Chat**, **Notifications** and **Code** (for members with Code access), each with what is unread, and **More**. It runs flat along the bottom edge, as the rail stands beside the page on a computer, and the page fills the screen above it. The app you are in is marked as on the rail. It steps aside while the keyboard is up and inside a conversation. | | |
| 872 | − | | **More** | A panel above the bar with **Artifacts**, **People**, **Workspace**, and **You and help**: your status, profile and settings, [appearance](#appearance), the documentation, support, status, the keyboard's shortcuts and signing out. | | |
| 880 | + | | **The bar along the bottom** | **Home**, **Work**, **Chat** and **Notifications**, each with what is unread, and **More**. Work is there for every member, with Code access or not. It runs flat along the bottom edge, as the rail stands beside the page on a computer, and the page fills the screen above it. The app you are in is marked as on the rail. It steps aside while the keyboard is up and inside a conversation. | | |
| 881 | + | | **More** | A panel above the bar with **Code** first (for members with Code access), **All apps** and the apps you pinned, **Artifacts**, **Routines**, **People**, **Workspace**, **Explore**, and **You and help**: your status, profile and settings, [appearance](#appearance), the documentation, support, status, the keyboard's shortcuts and signing out. | | |
| 873 | 882 | | **The sidebar button**, at the left of the page's header | Opens the sidebar of the app you are in from the left, most of the screen wide: the same lists and links as on a computer. Tap outside it, or open a page, and it closes. | | |
| 874 | − | | **The tab you are already on** | Tap it again to open that app's sidebar too. | | |
| 883 | + | | **The tab you are already on** | Tap it again to open that app's sidebar too: for **Work**, **Open**, **Assigned to you**, **Closed**, **New work item**, **Labels** and **Milestones**. | | |
| 875 | 884 | | **The workspace's name** in the page's header | Switches workspace, or opens your profile or settings. | | |
| 876 | 885 | ||
| 877 | 886 | Inside a [project](/guides/projects/), its pages (**Overview**, **Code**, | |
| 30 | 30 | "mcp_url": "https://mcp.g1t.sh", | |
| 31 | 31 | "current_user_url": "https://api.g1t.sh/user", | |
| 32 | 32 | "repository_url": "https://api.g1t.sh/repos/{owner}/{name}", | |
| 33 | − | "work_url": "https://api.g1t.sh/workspaces/{workspace}/work{?state,label,repo}", | |
| 33 | + | "work_url": "https://api.g1t.sh/workspaces/{workspace}/work{?state,label,milestone,assignee,repo,role}", | |
| 34 | + | "work_item_url": "https://api.g1t.sh/workspaces/{workspace}/work/{number}", | |
| 35 | + | "labels_url": "https://api.g1t.sh/workspaces/{workspace}/labels", | |
| 36 | + | "milestones_url": "https://api.g1t.sh/workspaces/{workspace}/milestones{?state}", | |
| 34 | 37 | "pulls_url": "https://api.g1t.sh/repos/{owner}/{name}/pulls{?state}" | |
| 35 | 38 | } | |
| 36 | 39 | ``` | |
| ⋯ | |||
| 270 | 273 | | [Supply chain](/reference/api/supply-chain/list-vulnerability-alerts/) | Vulnerability alerts, the dependency graph, its SPDX SBOM, and comparing dependencies. See [supply chain](/guides/security/supply-chain/). | | |
| 271 | 274 | | [Security settings](/reference/api/security-settings/get-security-settings/) | When pull request checks fail, dependency review's policy, delegated bypass, validity checks and a workspace's overview. | | |
| 272 | 275 | | [Work items](/reference/api/work-items/list-work-items/) | What should change, in a workspace: the repositories each links, labels and comments, claims and hand-offs. See [work items](/guides/work-items/). | | |
| 276 | + | | [Labels and milestones](/reference/api/labels-and-milestones/list-labels/) | A workspace's labels and milestones, shared by its work items and pull requests. See [labels](/guides/labels/) and [milestones](/guides/milestones/). | | |
| 273 | 277 | | [Pull requests](/reference/api/pull-requests/list-pull-requests/) | Proposed changes: reviews, merging and the merge queue. | | |
| 274 | 278 | | [Sessions](/reference/api/sessions/read-session/) | The record of how a pull request was made, written by the coding agent that made it. See [sessions and why-blame](/guides/why-blame/). | | |
| 275 | 279 | | [Actions](/reference/api/actions/list-workflows/) | Workflows, their runs and their logs. | | |
| 151 | 151 | `This access token needs the work:write scope to use open_work_item.` | |
| 152 | 152 | ||
| 153 | 153 | For example, a token with only `work:write` sees `work_item` (its `list` and | |
| 154 | − | `get` too, since `write` includes `read`), and `account` with `whoami`. A token with the | |
| 154 | + | `get` too, since `write` includes `read`); `workspace` with its label and | |
| 155 | + | milestone actions; `repository` with its `work` list and commit comments; | |
| 156 | + | `search` with `ticket`; and `account` with `whoami`. A token with the | |
| 155 | 157 | [Read only preset](/guides/authentication/#presets) sees only the reading | |
| 156 | 158 | actions of each tool. | |
| 157 | 159 | ||
| ⋯ | |||
| 272 | 274 | | [`rule_evaluations`](/reference/api/rules/list-rule-evaluations/) | How its rules judged pushes and merges, newest first, with 30 days of insights. Write role. | `repo` | `repo:read` | | |
| 273 | 275 | | [`codeowners`](/reference/api/repositories/get-codeowners-errors/) | Its [CODEOWNERS file](/guides/codeowners/) checked as a linter would, on `ref` (the default branch unless you say): its `path`, `rules`, `sections`, and `errors`, each with `line`, `kind`, `token` and `message`. Read role. | `repo` | `repo:read` | | |
| 274 | 276 | | [`list_events`](/reference/api/repositories/list-events/) | Its timeline, newest first; `before` pages back. To follow it, give `after` (an event id): the events written after it come oldest first, and the last one's `id` is the next `after`. With `wait` (seconds, at most 25) a call that finds nothing holds on until a matching event is written. `types` and `numbers` (arrays) narrow it, with `since` and `limit` (at most 200). | `repo` | `repo:read` | | |
| 277 | + | | [`work`](/reference/api/work-items/list-repo-work-items/) | The work items linked to it, in any role or in `role` (`origin`, `target` or `touched`), by `state`, `label`, `milestone` and `assignee`: the workspace's work list filtered to it. Read only: open one with `work_item` `create`. | `repo` | `work:read` | | |
| 275 | 278 | | [`languages`](/reference/api/repository-insights/get-languages/) | Its [languages](/guides/managing-repositories/#languages) by bytes, each with `color` and `percent`, for the default branch's `commit`; `pending` while it is first read. | `repo` | `repo:read` | | |
| 276 | 279 | | [`contributors`](/reference/api/repository-insights/list-contributors/) | Its [contributors](/guides/managing-repositories/#contributors): `kind` (`user`, `g1t` or `author`), `commits` and `weeks`, and the repository's commits by week. | `repo` | `repo:read` | | |
| 277 | 280 | | [`license`](/reference/api/repository-insights/get-license/) | The license its `LICENSE` file holds: `spdx_id`, `name`, `path`. | `repo` | `repo:read` | | |
| ⋯ | |||
| 320 | 323 | `merge_commit_message`, `squash_commit_message` and their templates, | |
| 321 | 324 | `suggest_updating_branches`, `allow_auto_merge`, `delete_branch_on_merge`, | |
| 322 | 325 | `require_web_commit_sign_off`, `allow_commit_comments`, | |
| 323 | − | `auto_close_work_items` and `has_work_items`. | |
| 326 | + | `auto_close_items` and `has_work_items`. | |
| 324 | 327 | `update` with `private`, `default_branch`, `allow_forking` or | |
| 325 | 328 | `max_ref_updates` also needs `repo:admin`. | |
| 326 | 329 | ||
| ⋯ | |||
| 337 | 340 | in place of `workspace`, which is then the repository's. Before working on | |
| 338 | 341 | one, `work` gives everything about it, and `claim` says you are on it; see | |
| 339 | 342 | [sessions, claims and dependencies](/guides/sessions/). Work items and pull | |
| 340 | − | requests share numbers in a workspace, so `comment` and the label actions | |
| 341 | − | work on either; give `repo` for a pull request. `attach` uploads an image, | |
| 342 | − | such as a screenshot, and gives the Markdown that shows it in either's | |
| 343 | − | description or a comment. | |
| 343 | + | requests share numbers in a workspace; a pull request's comments, labels | |
| 344 | + | and reactions are on the [`pull_request`](#pull_request) tool. `resolve` | |
| 345 | + | says which of the two a `#N` names. `attach` uploads an image, such as a | |
| 346 | + | screenshot, and gives the Markdown that shows it in a description or a | |
| 347 | + | comment. | |
| 344 | 348 | ||
| 345 | 349 | | Action | What it does | Required | Scope | | |
| 346 | 350 | | --- | --- | --- | --- | | |
| ⋯ | |||
| 348 | 352 | | [`get`](/reference/api/work-items/get-work-item/) | A work item: description (which may say what done means, under **Definition of done**), labels, comments, its `repos` with their roles and whether each `landed`, its `resolutions`, and every pull request made for it. | `workspace`, `number` | `work:read` | | |
| 349 | 353 | | [`create`](/reference/api/work-items/open-work-item/) | Open a work item, with `body`, `labels`, `milestone`, `repo` (its origin) and `targets` (the repositories it should land in). A label the workspace lacks is created for someone with the Write role. `checks` is deprecated: its commands are added to the body under **Definition of done**, and the result carries a `deprecation` note. | `workspace` or `repo`, `title` | `work:write` | | |
| 350 | 354 | | [`update`](/reference/api/work-items/update-work-item/) | Change its title, body, labels, milestone, assignees or `blocked_by` (the work items that must land first). Labels, assignees and `blocked_by` each replace the whole set; `milestone` `null` or `0` takes it out of its milestone. A `blocked_by` that names the work item itself, something not a work item of the workspace, or makes a cycle is refused. | `workspace`, `number` | `work:write` | | |
| 351 | − | | [`link`](/reference/api/work-items/link-work-item/) | Link a repository of the workspace in a `role`: `target` (the default) or `origin`. Triage role. | `workspace`, `number`, `repo` | `work:write` | | |
| 352 | − | | [`unlink`](/reference/api/work-items/unlink-work-item/) | Unlink a repository. Triage role. | `workspace`, `number`, `repo` | `work:write` | | |
| 353 | − | | [`labels`](/reference/api/work-items/list-item-labels/) | The labels a work item or pull request carries, with their colors. | `workspace`, `number` | `work:read` | | |
| 354 | − | | [`add_labels`](/reference/api/work-items/add-item-labels/) | Add `labels` to a work item or pull request, keeping the ones it has. | `workspace`, `number`, `labels` | `work:write` | | |
| 355 | − | | [`set_labels`](/reference/api/work-items/set-item-labels/) | Replace a work item's or pull request's labels with `labels`. | `workspace`, `number`, `labels` | `work:write` | | |
| 356 | − | | [`remove_labels`](/reference/api/work-items/remove-item-labels/) | Take `label`, or several `labels`, off a work item or pull request; with neither, all of them. | `workspace`, `number` | `work:write` | | |
| 357 | − | | [`close`](/reference/api/work-items/close-work-item/) | Close it as `completed` or `not_planned`. | `workspace`, `number` | `work:write` | | |
| 355 | + | | [`links`](/reference/api/work-items/list-work-item-links/) | The repositories it is linked to: its origin, then its targets, then those it touched, each with its `role`, its `legacy_number` (the issue number it had in its origin) and whether it `landed`; `missing` lists the targets it has not landed in yet. | `workspace`, `number` | `work:read` | | |
| 356 | + | | [`link`](/reference/api/work-items/link-work-item/) | Link a repository of the workspace in a `role`: `target` (the default) or `touched`; linking one already linked changes its role. An origin cannot be given. Triage role. | `workspace`, `number`, `repo` | `work:write` | | |
| 357 | + | | [`unlink`](/reference/api/work-items/unlink-work-item/) | Unlink a target or a touched repository. Its origin stays. Triage role. | `workspace`, `number`, `repo` | `work:write` | | |
| 358 | + | | [`labels`](/reference/api/work-items/list-work-item-labels/) | The labels a work item carries, with their colors. | `workspace`, `number` | `work:read` | | |
| 359 | + | | [`add_labels`](/reference/api/work-items/add-work-item-labels/) | Add `labels` to it, keeping the ones it has. | `workspace`, `number`, `labels` | `work:write` | | |
| 360 | + | | [`set_labels`](/reference/api/work-items/set-work-item-labels/) | Replace its labels with `labels`. | `workspace`, `number`, `labels` | `work:write` | | |
| 361 | + | | [`remove_labels`](/reference/api/work-items/remove-work-item-labels/) | Take `label`, or several `labels`, off it; with neither, all of them. | `workspace`, `number` | `work:write` | | |
| 362 | + | | [`close`](/reference/api/work-items/close-work-item/) | Close it as `completed` or `not_planned`; with `commit` and `repo`, a commit already on that repository's default branch that names it after a closing keyword lands it there, as its push would have. | `workspace`, `number` | `work:write` | | |
| 358 | 363 | | [`reopen`](/reference/api/work-items/reopen-work-item/) | Reopen a closed work item. Its resolutions are cleared. | `workspace`, `number` | `work:write` | | |
| 359 | − | | [`comment`](/reference/api/work-items/add-comment/) | Comment on a work item or a pull request; with `path` and `line`, on one line of a pull request's change. | `workspace`, `number`, `body` | `work:write` | | |
| 360 | − | | [`edit_comment`](/reference/api/work-items/edit-comment/) | Change a comment's text, by its id from `get`. Your own, or anyone's with the Maintain role or higher. Notes of what happened cannot be edited. | `workspace`, `comment_id`, `body` | `work:write` | | |
| 361 | − | | [`delete_comment`](/reference/api/work-items/delete-comment/) | Delete a comment, by its id. Your own, or anyone's with the Maintain role or higher. A review that approved or requested changes cannot be deleted. | `workspace`, `comment_id` | `work:write` | | |
| 362 | − | | [`attach`](/reference/api/work-items/upload-attachment/) | Upload an image to show in a description or a comment: `data` base64-encoded, `name` its file name. PNG, JPEG, GIF or WebP of at most 10 MB, by its bytes (`413` `too_large`, `415` `unsupported_type` otherwise). Returns `id`, `url`, `content_type`, `size` and `markdown` (``) to paste into a `body` or `summary`. The file travels in the tool call, so keep it small (a few hundred KB); `g1t attach FILE` sends one from disk. Anyone who may comment there may. | `workspace`, `name`, `data` | `work:write` | | |
| 364 | + | | [`comment`](/reference/api/work-items/add-work-item-comment/) | Comment on it, in Markdown. | `workspace`, `number`, `body` | `work:write` | | |
| 365 | + | | [`edit_comment`](/reference/api/work-items/edit-work-item-comment/) | Change a comment's text, by its id from `get`. Your own, or anyone's with the Maintain role or higher. Notes of what happened cannot be edited. | `workspace`, `comment_id`, `body` | `work:write` | | |
| 366 | + | | [`delete_comment`](/reference/api/work-items/delete-work-item-comment/) | Delete a comment, by its id. Your own, or anyone's with the Maintain role or higher. | `workspace`, `comment_id` | `work:write` | | |
| 367 | + | | [`react`](/reference/api/work-items/react-to-work-item/) | React with an emoji (`content`: `+1`, `-1`, `laugh`, `hooray`, `confused`, `heart`, `rocket` or `eyes`) to its description, or with `comment_id` to one of its comments; `remove` takes it back. | `workspace`, `number`, `content` | `work:write` | | |
| 368 | + | | [`decisions`](/reference/api/work-items/list-work-item-decisions/) | The [decision records](/guides/why-blame/#decision-records) on it and on each of its pull requests, in any repository, oldest first. | `workspace`, `number` | `work:read` | | |
| 369 | + | | [`attach`](/reference/api/work-items/upload-work-item-attachment/) | Upload an image to show in its description or in a comment on it, kept by the work item, so one filed with no repository takes images too: `data` base64-encoded, `name` its file name. PNG, JPEG, GIF or WebP of at most 10 MB, by its bytes (`413` `too_large`, `415` `unsupported_type` otherwise). Returns `id`, `url`, `content_type`, `size` and `markdown` (``) to paste into a `body`. The file travels in the tool call, so keep it small (a few hundred KB); `g1t work comment --attach FILE` sends one from disk. Anyone who may comment on it may. | `workspace`, `number`, `name`, `data` | `work:write` | | |
| 363 | 370 | | [`import`](/reference/api/work-items/import-work-items/) | Open a work item from a Jira, Linear or Sentry item, linked to it. | `workspace`, `reference` | `work:write` | | |
| 371 | + | | [`resolve`](/reference/api/work-items/resolve-ref/) | What `#number` names where it is written: in `repo`, a pull request of it, then a work item filed there under that old issue number, then the workspace's work item, then a pull request of another of its repositories; in a `workspace` alone ([`GET /workspaces/{workspace}/refs/{number}`](/reference/api/work-items/resolve-ref-for-workspace/)), its work item, else its pull request. Answers `kind` `work_item`, `pull` or `none`. | `workspace` or `repo`, `number` | `work:read` | | |
| 364 | 372 | | [`work`](/reference/api/work-items/get-work/) | Everything to pick a work item up: its definition of done and required checks, its repositories with what landed where and which targets are still missing, suggested targets (each with `why`), active claims, sessions, pull requests (checks, mergeability, overlaps, queue place), what it is blocked by and blocks, decisions, and its recent coordination events. | `workspace`, `number` | `work:read` | | |
| 365 | 373 | | [`claim`](/reference/api/work-items/claim-work-item/) | Say you are working on an open work item: advisory and expiring (`ttl_minutes`, 30 unless you say, at most 240), never a lock. Returns `others` already on it and what it is `blocked_by`. Claiming again, or a heartbeat of its `session_id`, renews it. With `title` (and `body`) instead of `number`, it [opens the work item first](/reference/api/work-items/claim-new-work-item/), claims it, attaches the `session_id` session to it, and returns it as `item`. | `workspace`, and `number` or `title` | `work:write` | | |
| 366 | 374 | | [`release`](/reference/api/work-items/release-claim/) | Give up your claim, with an optional `reason`. | `workspace`, `number` | `work:write` | | |
| ⋯ | |||
| 369 | 377 | ||
| 370 | 378 | ## `pull_request` | |
| 371 | 379 | ||
| 372 | − | Pull requests: start a change for a work item, record your session, mark it | |
| 373 | − | ready, review, update its branch, and merge by a merge commit, a squash, a | |
| 380 | + | Pull requests: start a change for a work item, record your session, | |
| 381 | + | comment and react, attach images, mark it ready, review, update its branch, and merge by a merge commit, a squash, a | |
| 374 | 382 | rebase or a fast-forward, now or with auto-merge. Read `overlaps` and | |
| 375 | 383 | `behind` on `get` before going far. | |
| 376 | 384 | ||
| ⋯ | |||
| 384 | 392 | | [`record_session`](/reference/api/sessions/record-session/) | Append entries to a pull request's session. Each has `kind` and `text`, and `tool` for tool entries. | `repo`, `number`, `entries` | `pull_requests:write` | | |
| 385 | 393 | | [`read_session`](/reference/api/sessions/read-session/) | The recorded session, oldest first. `after` skips to entries after a sequence number. | `repo`, `number` | `pull_requests:read` | | |
| 386 | 394 | | [`record_decision`](/reference/api/decisions-and-why/record-decision/) | Record a decision on a pull request, kept as `claimed`: a `kind` (`proposal`, `claim`, `fix` or `note`), a `summary`, and optional `evidence` (an object) and `session_id`. | `repo`, `number`, `kind`, `summary` | `pull_requests:write` | | |
| 387 | − | | [`list_decisions`](/reference/api/decisions-and-why/list-decisions/) | The decision records on a pull request, or on a work item and its pull requests, oldest first, each with its `kind`, `confidence` (`claimed`, `tested` or `approved`), `summary` and `evidence`. | `repo`, `number` | `pull_requests:read` | | |
| 395 | + | | [`list_decisions`](/reference/api/decisions-and-why/list-decisions/) | The decision records on a pull request, oldest first, each with its `kind`, `confidence` (`claimed`, `tested` or `approved`), `summary` and `evidence`. A work item's, with its pull requests', are `work_item` `decisions`. | `repo`, `number` | `pull_requests:read` | | |
| 396 | + | | [`comment`](/reference/api/pull-requests/add-comment/) | Comment on it, in Markdown; with `path` and `line`, on one line of its change. | `repo`, `number`, `body` | `pull_requests:write` | | |
| 397 | + | | [`edit_comment`](/reference/api/pull-requests/edit-comment/) | Change a comment's text, by its id from `get`. Your own, or anyone's with the Maintain role or higher. Notes of what happened cannot be edited. | `repo`, `comment_id`, `body` | `pull_requests:write` | | |
| 398 | + | | [`delete_comment`](/reference/api/pull-requests/delete-comment/) | Delete a comment, by its id. Your own, or anyone's with the Maintain role or higher. A review that approved or requested changes cannot be deleted. | `repo`, `comment_id` | `pull_requests:write` | | |
| 399 | + | | [`react`](/reference/api/pull-requests/react/) | React with an emoji (`content`) to its description, or with `comment_id` to one of its comments; `remove` takes it back. | `repo`, `number`, `content` | `pull_requests:write` | | |
| 400 | + | | [`attach`](/reference/api/work-items/upload-attachment/) | Upload an image to show in a pull request's description, its summary or a comment, kept by the repository: `data` base64-encoded, `name` its file name. As the `work_item` tool's `attach` otherwise; `g1t attach FILE` sends one from disk. Anyone who may comment on the repository may. | `repo`, `name`, `data` | `work:write` | | |
| 388 | 401 | | [`ready`](/reference/api/pull-requests/mark-pull-request-ready/) | Mark a draft ready for review. The summary becomes its description. | `repo`, `number`, `summary` | `pull_requests:write` | | |
| 389 | 402 | | [`draft`](/reference/api/pull-requests/convert-pull-request-to-draft/) | Turn a pull request that is ready for review back into a draft. It leaves the merge queue. Its author, or the Triage role. | `repo`, `number` | `pull_requests:write` | | |
| 390 | 403 | | [`request_reviewers`](/reference/api/pull-requests/request-reviewers/) | Ask more people (`reviewers`, by username) or teams (`team_reviewers`, as `workspace/team` or a slug of the repository's workspace) to review it, added to whoever is asked already. Its author, or the Triage role. | `repo`, `number` | `pull_requests:write` | | |
| ⋯ | |||
| 530 | 543 | | [`traces`](/reference/api/observability/list-traces/) | Traces, newest first, each its root span, duration, span and error counts; `q`, `errors_only`, `min_duration_ms`. | `workspace`, `project` | `observability:read` | | |
| 531 | 544 | | [`trace`](/reference/api/observability/get-trace/) | One trace: every span with its timing, status, attributes and events, and the logs written under it. | `workspace`, `project`, `trace_id` | `observability:read` | | |
| 532 | 545 | | [`errors`](/reference/api/observability/list-errors/) | Errors grouped by exception, most recently seen first, each with its count, the deployment that brought it in, its last request and trace, and its `state`; filter by `state`. | `workspace`, `project` | `observability:read` | | |
| 533 | − | | [`update_error`](/reference/api/observability/update-error/) | Resolve, ignore or reopen an error group (`state`), or link the work item made for it (`item`, null to unlink). Triage role. | `workspace`, `project`, `fingerprint` | `observability:write` | | |
| 546 | + | | [`update_error`](/reference/api/observability/update-error/) | Resolve, ignore or reopen an error group (`state`), or link the work item made for it (`item_number`, its number in the workspace; null to unlink). Triage role. | `workspace`, `project`, `fingerprint` | `observability:write` | | |
| 534 | 547 | | [`metrics`](/reference/api/observability/list-metrics/) | The metrics the project's software sends, with their kind, unit and services. | `workspace`, `project` | `observability:read` | | |
| 535 | 548 | | [`metric`](/reference/api/observability/get-metric/) | One metric over time: `aggregate` (`avg`, `sum`, `min`, `max`, `p50`, `p95`, `p99`), `group_by` an attribute, `step`. | `workspace`, `project`, `metric` | `observability:read` | | |
| 536 | 549 | ||
| ⋯ | |||
| 724 | 737 | | [`update_integration`](/reference/api/integrations/update-integration/) | Change one: its `name`, its `config` (replaced whole) or its `secret` (write-only, never returned). Owners only. | `workspace`, `id` | `workspace:admin` | | |
| 725 | 738 | | [`disconnect_integration`](/reference/api/integrations/disconnect-integration/) | Remove it and its secrets. Owners only. | `workspace`, `id` | `workspace:admin` | | |
| 726 | 739 | | [`test_integration`](/reference/api/integrations/test-integration/) | Check its credentials against the system it connects to. Owners only. | `workspace`, `id` | `workspace:admin` | | |
| 727 | − | | [`activity`](/reference/api/workspaces/get-workspace-activity/) | What happened across its repositories you can read, newest first: pull requests merged, opened and closed, work items, releases, deployments, pushes (`default_branch` marks what landed without a pull request), reviews and packages, each with its `repo`, `actor`, `number`, `title` and `url` where it has them, and a `summary` of what shipped. `landed` lists the commits that reached default branches, with each author's `username` when known and `production` (`live`, `deploying`, `failed` or `not_deployed`, with the `deploy` that decided it) where the repository deploys: a project's production deployment, or a successful run of its deploy workflow on the default branch. `since` and `until` (RFC 3339; the last 24 hours by default, at most 31 days), `kinds` and `limit` (at most 200) narrow it; `complete` is false when more happened than was read. | `workspace` | `repo:read` | | |
| 740 | + | | [`activity`](/reference/api/workspaces/get-workspace-activity/) | What happened across its repositories you can read, newest first: pull requests merged, opened and closed, work items, releases, deployments, pushes (`default_branch` marks what landed without a pull request), reviews and packages, each with its `repo`, `actor`, `number`, `title` and `url` where it has them, and a `summary` of what shipped. `landed` lists the commits that reached default branches, with each author's `username` when known and `production` (`live`, `deploying`, `failed` or `not_deployed`, with the `deploy` that decided it) where the repository deploys: a project's production deployment, or a successful run of its deploy workflow on the default branch. `since` and `until` (RFC 3339; the last 24 hours by default, at most 31 days), `kinds` (`merged`, `pulls`, `work_items`, `releases`, `deployments`, `pushes`, `reviews`, `comments`, `packages`, `runs`; all but `comments` when left out) and `limit` (at most 200) narrow it; `complete` is false when more happened than was read. | `workspace` | `repo:read` | | |
| 728 | 741 | | [`list_labels`](/reference/api/labels-and-milestones/list-labels/) | Its labels by name, each with `color`, `description`, and how many work items (`items`) and pull requests (`pulls`) carry it. | `workspace` | `work:read` | | |
| 729 | 742 | | [`create_label`](/reference/api/labels-and-milestones/create-label/) | Create a label named `label`, with `color` (six hex digits; chosen from the name when left out) and `description`. Write role in the workspace. | `workspace`, `label` | `work:write` | | |
| 730 | 743 | | [`update_label`](/reference/api/labels-and-milestones/update-label/) | Change a label's `new_name`, `color` or `description`. Renaming renames it on everything that carries it. Write role in the workspace. | `workspace`, `label` | `work:write` | | |
Comments
Sign in to comment.