Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ To update an installed binary later, run [`fullsend self-update`](self-update.md
| [`fullsend self-update`](self-update.md) | Update the local `fullsend` binary to the latest release, or to `--version`, after verifying the release's Sigstore signature and checksum. |
| `fullsend eval-measure` | Score wild-run traces into `eval-measurements.jsonl`. See [Eval measurements](../guides/infrastructure/eval-measurements.md). |
| `fullsend prepare-artifacts` | Build, in `--artifact-dir`, the filtered copy of a run's `--output-dir` that CI uploads as the run artifact. The level (`all`, `metadata` or `none`) comes from `config.yaml`'s [`artifacts`](../reference/config-reference.md#artifacts) setting and the run's source; a run whose source is unknown gets the strictest configured level. Prints the level on stdout and the rule it applied on stderr. If the level cannot be resolved, it leaves `--artifact-dir` empty and exits non-zero. `action.yml` and the GitLab agent job run it after `eval-measure`. See [Run artifacts and private data](../guides/user/run-artifacts-and-private-data.md). |
| `fullsend issues transition` | Transition an issue: exactly one of `--state closed`, `--transition NAME` (Jira), or `--status NAME` (Jira). Accepts `--resolution ID_OR_NAME` (Jira) and `--comment TEXT`, plus the existing `--tracker`, `--project`, `--number`, `--fullsend-dir`, and `--token` flags. See [Issue transitions](../guides/user/issues-commands.md#fullsend-issues-transition) for permissions, ambiguity handling, and partial failures. |

## Global flags

Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ The `admin` command group's `uninstall`/`analyze`/`enable`/`disable` subcommands
|----------|-------|
| CLI reference | _(no dedicated page)_ |
| Guides | `docs/guides/user/issues-commands.md`, `docs/guides/user/jira-integration.md`, `docs/guides/infrastructure/layered-config-reference.md`, `docs/guides/dev/cli-internals.md` |
| Go source | `internal/cli/issues.go` |
| Go source | `internal/cli/issues.go`, `internal/cli/issues_transition.go` |

## Minor commands

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Guides for developers working in repositories where fullsend is active.
- [How fullsend authenticates](user/how-fullsend-authenticates.md) — Which credential path fullsend uses in each case: the mint, GCP and OpenAI Workload Identity, and the gateway's direct OIDC trust
- [Using an inference gateway](user/inference-gateway.md) — Reach models through an OpenAI/Anthropic-compatible gateway with direct OIDC trust (no token exchange) or a gateway key
- [Bugfix workflow](user/bugfix-workflow.md) — End-to-end guide to how fullsend handles a bug report from issue to merge
- [Issue commands](user/issues-commands.md) — Read, create, and post comments on issues across GitHub, GitLab, and Jira (`fullsend issues get`, `create`, `post-comment`)
- [Issue commands](user/issues-commands.md) — Read, create, comment on, and transition issues across GitHub, GitLab, and Jira (`fullsend issues get`, `create`, `post-comment`, `transition`)
- [OWNERS file authorization](user/owners-file-authorization.md) — Authorize agent dispatch via Prow-style OWNERS files
- [Running agents locally](user/running-agents-locally.md) — Run fullsend agents on your machine using released binaries (macOS + Linux)

Expand Down
25 changes: 18 additions & 7 deletions docs/guides/dev/cli-internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,23 @@ fullsend
│ │ ├── --keep-history # Append previous content as collapsed history (default true)
│ │ ├── --only-if-exists # Update an existing marked comment, never create one
│ │ └── --fullsend-dir <path> # .fullsend config directory (resolves keep_history default)
│ └── link # Create a typed link between two issues (Jira only)
│ ├── --tracker <tracker> # Tracker backend; github/gitlab return "not supported"
│ ├── --from <key> # Source issue key (e.g. PROJ-123)
│ ├── --to <key> # Target issue key (e.g. PROJ-456)
│ ├── --type <name> # Link type name (e.g. Blocks), passed through verbatim
│ └── --fullsend-dir <path> # .fullsend config directory (resolves default --tracker)
│ ├── link # Create a typed link between two issues (Jira only)
│ │ ├── --tracker <tracker> # Tracker backend; github/gitlab return "not supported"
│ │ ├── --from <key> # Source issue key (e.g. PROJ-123)
│ │ ├── --to <key> # Target issue key (e.g. PROJ-456)
│ │ ├── --type <name> # Link type name (e.g. Blocks), passed through verbatim
│ │ └── --fullsend-dir <path> # .fullsend config directory (resolves default --tracker)
│ └── transition # Change issue lifecycle state (rejects GitHub PR numbers)
│ ├── --tracker <tracker> # Tracker backend: github, gitlab, or jira
│ ├── --project <project> # owner/repo or an allowed Jira project key
│ ├── --number <int> # Issue number
│ ├── --state closed # Portable closure; one selector required
│ ├── --transition <name> # Exact Jira transition name
│ ├── --status <name> # Exact Jira destination status
│ ├── --resolution <id-or-name> # Jira resolution allowed by the transition
│ ├── --comment <text> # Optional Markdown explanation
│ ├── --token <token> # GitHub/GitLab token; Jira uses runner credentials
│ └── --fullsend-dir <path> # Config directory (Jira connection and allowed targets)
├── post-review # Post sticky PR/MR review comments (formal review is best-effort)
│ ├── --forge <forge> # Forge backend: github (default) or gitlab
│ ├── --base-url <url> # Forge instance URL (e.g. https://gitlab.example.com)
Expand Down Expand Up @@ -920,7 +931,7 @@ var executableFiles = map[string]struct{}{
| `internal/cli/inference_openai.go` | ~900 | OpenAI WIF enrolment: request document, reply import, status/exchange |
| `internal/cli/github.go` | ~966 | GitHub setup/set/status/uninstall/sync-scaffold/enroll/unenroll |
| `internal/cli/github_client.go` | ~130 | GitHub token resolution and authenticated client construction |
| `internal/cli/issues.go` | ~971 | Issue read/write commands (`fullsend issues get`, `create`, `post-comment`, `link`) |
| `internal/cli/issues.go` | ~971 | Issue read/write commands (`fullsend issues get`, `create`, `post-comment`, `link`, `transition`; transitions are in `issues_transition.go`) |
Comment thread
ederign marked this conversation as resolved.
Resolved
| `internal/cli/tracker_client.go` | ~122 | Tracker client factory (GitHub/GitLab/Jira) |
| `internal/cli/run.go` | ~1923 | Agent execution lifecycle |
| `internal/mint/main.go` | ~95 | GCF token mint entry point (wiring only) |
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/infrastructure/layered-config-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ The `tracker` field is the single, provider-discriminated issue-tracker
mapping (`github`, `gitlab`, or `jira`; at most one). It replaces the former
scalar `tracker` field, which is no longer accepted. The provider block that
is present is the default for `--tracker` on `fullsend issues get`,
`create`, `post-comment`, and `link` (`link` supports only Jira, so a `github`
`create`, `post-comment`, `transition`, and `link` (`link` supports only Jira, so a `github`
or `gitlab` provider makes it fail with a not-supported error unless
`--tracker jira` is passed); an explicit `--tracker` flag overrides it. When
no provider block is set, `--tracker` is required on every `fullsend issues`
Expand Down
73 changes: 70 additions & 3 deletions docs/guides/user/issues-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@

Read and write issue content across GitHub, GitLab, and Jira from
custom agent scripts using `fullsend issues get`,
`fullsend issues create`, `fullsend issues post-comment`, and
`fullsend issues link`.
`fullsend issues create`, `fullsend issues post-comment`,
`fullsend issues link`, and `fullsend issues transition`.

## When to use

The built-in agent pipeline handles comment posting automatically for
GitHub-sourced events and for Jira-sourced triage and code runs. Use these
commands when:

- An agent needs to **close an issue** or execute a configured Jira workflow transition.

- A custom agent needs to post results back to **Jira** or **GitLab**.
- An agent script needs to **read** issue content (title, body, labels,
comments) from any tracker as structured JSON.
Expand Down Expand Up @@ -44,7 +46,7 @@ tracker:
`https://api.atlassian.com`. Issue links in the output use `base_url`.
- `project` is the repository's primary project and the default
`--project`.
- `issues create` may target only `project` or a project listed in
- `issues create` and `issues transition` may target only `project` or a project listed in
`allowed_targets.projects`. Any other project is refused before Jira is
called.

Expand Down Expand Up @@ -291,6 +293,71 @@ created in the type's outward direction: the example above records that
| `--token` | No | Rejected for Jira, which reads `FULLSEND_JIRA_TOKEN` or the OAuth client credentials |
| `--fullsend-dir` | Jira | Path to `.fullsend` config directory. Supplies the default `--tracker` and the [Jira connection settings](#jira-connection-settings) |

## `fullsend issues transition`

Close an issue through its tracker, or execute a named Jira workflow action:

```bash
fullsend issues transition --tracker github --project owner/repo \
--number 42 --state closed --comment "Triage complete."

fullsend issues transition --fullsend-dir .fullsend --tracker jira \
--project PROJ --number 42 --transition "Review"

fullsend issues transition --fullsend-dir .fullsend --tracker jira \
--number 42 --state closed --resolution "Fixed" --comment "Completed."
```

### Flags

Exactly one of `--state`, `--transition`, or `--status` is required:

| Flag | Meaning |
|------|---------|
| `--state closed` | Portable closure on GitHub, GitLab, and Jira. Jira selects a unique available transition whose destination has status category `done`. |
| `--transition NAME` | Exact, case-sensitive Jira transition name, such as `Review`. This names an action, not its destination status. |
| `--status NAME` | Exact Jira destination status name. Requires one available transition to that status. |
| `--resolution ID_OR_NAME` | Jira resolution selected from the transition's allowed values. Required when the transition requires a resolution without a default and does not offer exactly one valid allowed value. |
| `--comment TEXT` | Optional Markdown explanation. Jira sends it in the same request as the transition; GitHub/GitLab post it after closing. |

`--tracker`, `--project`, `--number`, `--fullsend-dir`, and `--token`
follow the connection and authentication rules above. Jira rejects `--token`;
credentials remain in the existing environment variables. `--number` must be
positive. GitHub pull request numbers are rejected before any write. Jira requires
its connection settings in the configuration directory. The target project must be
`tracker.jira.project` or listed in `tracker.jira.allowed_targets.projects`;
other projects are rejected before a client is built.

The command prints JSON with `changed`, and, where available, `transition` and
`status`. Portable closure of an already closed issue returns `changed: false`,
but still posts a requested comment. For Jira, supplying `--resolution` on an
already closed issue instead returns an error before posting a comment: no
transition would run to apply that resolution. Explicit named transitions always execute,
including self-transitions. The command does not infer that an unavailable action
means the issue is already at the desired destination.

Jira controls allowed source states and account permissions. The account needs
issue visibility and Transition Issues permission (and permission to add a comment
when one is requested). Zero or multiple matching actions fail without a write.
When Jira requires a resolution without a default, the command selects it
automatically only if the allowed-values list contains exactly one valid ID.
Otherwise, supply `--resolution`; the command never chooses among different
resolution meanings. A supplied `--comment` satisfies a required comment on the
transition screen. Jira validates other required fields against the existing
issue values. If a required field is missing, Jira rejects the transition and
the command reports the API error. Complete those fields in Jira before retrying.

A failure is nonzero. On GitHub/GitLab, a comment failure can leave the issue
closed; the error reports that partial result. Network/server failures on the
Jira transition POST are not automatically retried because the action may have
already occurred. Inspect the issue before retrying any uncertain result; reruns
can repeat comments or self-transition side effects. Normal rejected-request
handling for rate limits and expired OAuth credentials remains in effect.

The command runs only when invoked. It does not install event handlers or
change the built-in code or triage harnesses. It updates issue lifecycle state,
not GitHub Projects fields.

## Config-based default tracker

Set a default tracker in `.fullsend/config.yaml` to avoid passing
Expand Down
14 changes: 8 additions & 6 deletions docs/guides/user/jira-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,9 @@ explicit `FULLSEND_TRACKER` or `ISSUE_URL` points somewhere else. Code stops if
`JIRA_DUPLICATE_TRANSITION`, `JIRA_NOT_PLANNED_TRANSITION`, and
`JIRA_SPLIT_TRANSITION` in the triage harness's Jira overlay (by default
`Duplicate`, `Won't Do`, and `Obsolete`). Override them in a harness if your
Jira workflow uses different names. Tracker-neutral transition discovery is
tracked in [#6704](https://github.com/fullsend-ai/fullsend/issues/6704).
Jira workflow uses different names. Custom agents can use the shared
[`fullsend issues transition`](issues-commands.md#fullsend-issues-transition)
command to discover and apply Jira transitions.
- **Updates Jira cannot apply:** triage lists them under **Not applied in
Jira** in its comment instead of dropping them. This covers a label add for
a label not used anywhere on the Jira site (triage does not create new
Expand All @@ -538,12 +539,13 @@ explicit `FULLSEND_TRACKER` or `ISSUE_URL` points somewhere else. Code stops if
`actor.kind: bot`, so they do not dispatch agents again. See
[How it works](#how-it-works).
- **Credentials:** the triage and code harnesses map `FULLSEND_JIRA_TOKEN` and
`FULLSEND_JIRA_EMAIL` in `env.runner` for the runner-side post-scripts only.
`FULLSEND_JIRA_EMAIL` in `env.runner` for runner-side scripts only.
The `jira-ro` provider reads `FULLSEND_JIRA_TOKEN` on the host, and the
sandbox gets the provider's placeholder, not the real token.

When the code agent makes no PR or MR, or the run fails, nothing beyond the
run-status update is written to Jira.
When the code agent makes no PR or MR, or the run fails, no code-stage result
is written to Jira. Run-status updates and a configured run label may already
have been applied.

Custom agents can use `fullsend issues post-comment --tracker jira` to post
results back to Jira, and `fullsend issues create --tracker jira` to create
Expand Down Expand Up @@ -1439,5 +1441,5 @@ However, more pollers against the same Jira project means more API calls per cyc
- [CEL Triggers Reference](cel-triggers-reference.md) — NormalizedEvent fields and routing rules
- [Bring Your Own Agent](bring-your-own-agent.md) — adding custom agents
- [Configuring agent behavior](customizing-agents.md) — harness configuration
- [Issue commands](issues-commands.md) — `fullsend issues get`, `create`, and `post-comment`, including Jira
- [Issue commands](issues-commands.md) — `fullsend issues get`, `create`, `post-comment`, and `transition`, including Jira
- [Enabling fullsend on private repositories](../infrastructure/private-repositories.md#private-jira-projects-need-a-private-repository) — why a private Jira project needs a private repository
5 changes: 3 additions & 2 deletions docs/reference/config-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,12 +431,13 @@ shared Jira client: `FULLSEND_JIRA_TOKEN` is required and
`FULLSEND_JIRA_CLIENT_SECRET` replace both, as described above. The legacy
`JIRA_TOKEN` and `JIRA_USER_EMAIL` variables are not used by the poller.

The `fullsend issues` commands (`get`, `create`, `post-comment`, `link`),
The `fullsend issues` commands (`get`, `create`, `post-comment`, `link`, `transition`),
`fullsend run` Jira status updates, and `fullsend reconcile-status` read the
Jira connection only from these settings, with no flag or environment
fallback: `base_url` and `project` must be set, and Jira API calls fail
without them. `project` is the default `--project` of the issues commands.
`fullsend issues create` refuses any other Jira project unless it is listed
`fullsend issues create` and `fullsend issues transition` refuse any other Jira
project unless it is listed
in `allowed_targets.projects`. See
[Issue commands](../guides/user/issues-commands.md#jira-connection-settings).

Expand Down
1 change: 1 addition & 0 deletions internal/cli/issues.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ FULLSEND_JIRA_CLIENT_SECRET.`,
cmd.AddCommand(newIssuesCreateCmd())
cmd.AddCommand(newIssuesPostCommentCmd())
cmd.AddCommand(newIssuesLinkCmd())
cmd.AddCommand(newIssuesTransitionCmd())
return cmd
}

Expand Down
Loading
Loading