Commit graph

5315 commits

Author SHA1 Message Date
Kynan Ware
07744e8e80 Fix gofmt formatting in godoc comments
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 16:16:13 -07:00
Kynan Ware
b8ee5c5eba Add godoc comments to exported symbols in remaining packages
Add documentation comments to exported symbols across all remaining
smaller packages including cmd/gen-docs, context, internal/browser,
internal/gh, internal/ghcmd, internal/ghinstance, internal/ghrepo,
internal/keyring, internal/run, internal/safepaths, internal/tableprinter,
internal/text, internal/update, pkg/cmd/accessibility, pkg/cmd/actions,
pkg/cmd/alias, pkg/cmd/api, pkg/cmd/browse, pkg/cmd/cache,
pkg/cmd/completion, pkg/cmd/copilot, pkg/cmd/factory, pkg/cmd/gpg-key,
pkg/cmd/label, pkg/cmd/licenses, pkg/cmd/org, pkg/cmd/preview,
pkg/cmd/ssh-key, pkg/cmd/version, pkg/extensions, pkg/jsoncolor,
pkg/markdown, pkg/option, pkg/set, pkg/ssh, pkg/surveyext, test,
internal/authflow, and utils.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 16:14:20 -07:00
Kynan Ware
df295a1dba Add godoc comments to exported symbols in pkg/cmd/config and pkg/cmd/root
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 16:14:05 -07:00
Kynan Ware
e2e697722b Add godoc comments to exported symbols in pkg/cmd/agent-task and pkg/cmd/search
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 16:14:05 -07:00
Kynan Ware
1a51fc61ae Add godoc comments to exported symbols in pkg/cmd/status and pkg/cmd/ruleset
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 16:14:05 -07:00
Kynan Ware
cbedf37b84 Add godoc comments to exported symbols in pkg/cmd/variable
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 16:14:04 -07:00
Kynan Ware
83bc80a1bb Add godoc comments to exported symbols in pkg/cmd/gist
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 16:08:04 -07:00
Kynan Ware
7618024294 Add godoc comments to exported symbols in pkg/cmd/codespace
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 16:08:04 -07:00
Kynan Ware
08ef11b093 Add godoc comments to exported symbols in pkg/cmd/secret
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 16:08:04 -07:00
Kynan Ware
65fcba95d9 Add godoc comments to exported symbols in pkg/cmd/auth
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 16:08:04 -07:00
Kynan Ware
0cb2c4718a Add godoc comments to exported symbols in pkg/cmd/issue
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 16:08:03 -07:00
Kynan Ware
7eb76da40a Add godoc comments to exported symbols in pkg/cmd/workflow
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 16:08:03 -07:00
Kynan Ware
2273310521 Add godoc comments to exported symbols in pkg/cmd/release
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 16:01:52 -07:00
Kynan Ware
520482c143 Add godoc comments to exported symbols in pkg/cmd/extension
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 15:58:15 -07:00
Kynan Ware
82f3b3dfaa Add godoc comments to exported symbols in pkg/cmd/project
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 15:58:15 -07:00
Kynan Ware
844963ca61 Add godoc comments to exported symbols in pkg/cmd/run
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 15:53:48 -07:00
Kynan Ware
34d1fb3e63 Add godoc comments to exported symbols in pkg/cmd/repo
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 15:53:48 -07:00
Kynan Ware
8f7e98c6f6 Add godoc comments to exported symbols in pkg/cmd/attestation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 15:53:47 -07:00
Kynan Ware
5de7a10080 Add godoc comments to exported symbols in pkg/cmd/pr
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 15:53:47 -07:00
Kynan Ware
d594c5e918
docs: add examples to gh issue close help text (#12830)
Add examples for closing issues, closing with a comment, closing as
duplicate, and closing with a reason.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Babak K. Shandiz <babakks@github.com>
2026-03-04 14:53:27 +00:00
Takeshi
b9c8d8e023
Merge branch 'trunk' into issue-close-duplicate-of 2026-03-03 22:03:25 -05:00
Mason McElvain
74ff94c3e4 feat(browse): add blame flag 2026-03-03 19:03:40 -07:00
Kynan Ware
4ea9076d81
Merge pull request #12651 from gunadhya/fix-repeating-cmd-gh-issue-develop
`issue develop`: prevent .git/config corruption on repeated `--name` invocation
2026-03-03 18:55:43 -07:00
Kynan Ware
6e979c6b32
Merge pull request #12686 from 4RH1T3CT0R7/add-no-upstream-flag
Add --no-upstream flag to repo clone
2026-03-03 16:01:05 -07:00
Kynan Ware
6045a593a3
Reword --no-upstream help doc 2026-03-03 15:51:27 -07:00
Kynan Ware
d983ae0469
Merge pull request #12623 from LouisLau-art/fix/issue-list-pr-search-qualifier
fix(issue list): reject pull request-only search qualifiers
2026-03-03 14:52:35 -07:00
Louis Shawn
b601b307a4 test(issue list): cover additional PR search qualifier variants 2026-03-03 10:13:57 +08:00
Kynan Ware
60318613d8
Merge pull request #12720 from cli/kw/fix-invalid-ansi
Fix invalid ANSI SGR escape code in JSON and diff colorization
2026-03-02 15:12:15 -07:00
Kynan Ware
ad41bb967d
Merge pull request #12807 from maxbeizer/agent-task-view-json
Add --json support to `gh agent-task view`
2026-03-02 13:36:06 -07:00
Kynan Ware
1a5fb34493
Merge pull request #12806 from maxbeizer/agent-task-list-json
Add --json support to `gh agent-task list`
2026-03-02 13:35:27 -07:00
Kynan Ware
79796d2dc5
Merge pull request #12787 from ManManavadaria/fix-12726/item-edit-draft-issue-partial-update
fix: `gh project item-edit` error when editing Draft Issue with only one (title/body) flag
2026-03-02 12:19:53 -07:00
Kynan Ware
1957a022b6
Merge pull request #12652 from VishnuVV27/fix-issue-view-comments-redundancy
Fix redundant API call in gh issue view --comments (#12606)
2026-03-02 10:58:41 -07:00
Louis Shawn
5194256928 fix(issue list): reject pull request-only search qualifiers 2026-03-02 10:50:15 -07:00
Kynan Ware
1c36686a61
Merge branch 'trunk' into 2722-fix-fork-remote-flag 2026-03-02 10:22:27 -07:00
Kynan Ware
0f5355e8b4
Merge pull request #12781 from itchyny/api-compile-json-content
Use pre-compiled regexp for matching Content-Type
2026-03-02 10:16:37 -07:00
Devraj Mehta
351df5b9d1
Set COPILOT_GH env var when launching Copilot CLI
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-02 10:25:47 -05:00
gunadhya
ee8014a4d9 Simplify progress indicators in issue develop 2026-03-02 17:01:57 +05:30
Max Beizer
d908af3484 Emit null for zero createdAt/updatedAt values
Consistent with completedAt handling. Addresses Copilot review feedback
from companion PR #12807.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-01 10:18:37 -06:00
Max Beizer
0d05a8acca Address Copilot review feedback
- Prioritize --json output over --log/--follow so JSON is not silently ignored
- Emit null for zero createdAt/updatedAt values, consistent with completedAt

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-01 10:18:21 -06:00
Max Beizer
ceb8cf2561 Polish --json support for agent-task view
- Rename 'status' field to 'state' for consistency with struct and UI
- Add missing JSON fields: completedAt, user, pullRequestTitle, pullRequestState
- Add test for nil PullRequest with --json
- Expand existing JSON test to cover new fields

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-01 09:09:08 -06:00
Max Beizer
c5c107aa8b Polish --json support for agent-task list
- Fix empty results returning error instead of [] when --json is used
- Rename 'status' field to 'state' for consistency with struct and UI
- Add missing JSON fields: completedAt, user, pullRequestTitle, pullRequestState
- Add test for empty results with --json
- Add test for nil PullRequest with --json

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-01 09:08:18 -06:00
Max Beizer
250d5a850a Fix gofmt alignment in view_test.go
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-01 08:57:53 -06:00
Takeshi
01c83acfe8 Add --duplicate-of flag and duplicate reason to gh issue close
Support closing issues as duplicates via --reason duplicate and
--duplicate-of <issue> flags. The --duplicate-of flag accepts an issue
number or URL, validates it references a different issue (not a PR),
and passes the duplicate issue ID to the closeIssue mutation.

Feature detection checks whether the GHES instance supports the
DUPLICATE enum value in IssueClosedStateReason before using it.
2026-02-28 20:10:07 -05:00
Max Beizer
7241b42ecf Add --json support to gh agent-task view
Add --json, --jq, and --template flags to `gh agent-task view`,
consistent with the pattern used by `gh pr view --json`,
`gh issue view --json`, etc.

This reuses the same ExportData interface and SessionFields defined
for list, applying them to the single-session view output.

Closes https://github.com/cli/cli/issues/12805 (partial)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-28 09:22:28 -06:00
Max Beizer
0d9e6af3da Add --json support to gh agent-task list
Add --json, --jq, and --template flags to `gh agent-task list`,
consistent with the pattern used by `gh pr list --json`,
`gh issue list --json`, etc.

This implements the ExportData interface on capi.Session and defines
SessionFields for the available JSON fields:
id, name, status, repository, createdAt, updatedAt,
pullRequestNumber, pullRequestUrl.

Closes https://github.com/cli/cli/issues/12805 (partial)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-28 09:20:13 -06:00
ManManavadaria
d21544c085 fix(project/item-edit): preserve title/body when editing draft issue with partial flags 2026-02-26 16:23:37 +05:30
itchyny
6057bfadbf Use pre-compiled regexp for matching Content-Type 2026-02-25 19:43:45 +09:00
William Martin
4dd50cf60c Fix project mutation query variable usage
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 07:13:07 -07:00
Babak K. Shandiz
4681b40e70
fix(agent-task/capi): fix capi API version
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2026-02-20 18:04:12 +00:00
Kynan Ware
48951aca01 Fix invalid ANSI SGR escape code in JSON and diff colorization
Replace `1;38` with `1;37` (bold white) in the delimiter/header
color constant. SGR parameter 38 is the extended foreground color
prefix and requires sub-parameters (e.g. `38;5;n` or `38;2;r;g;b`),
so using it bare produces an invalid escape sequence. Most terminals
silently ignore the malformed parameter, masking the bug.

Fixes cli/cli#12683

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 17:52:01 -07:00