Commit graph

138 commits

Author SHA1 Message Date
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
Mason McElvain
74ff94c3e4 feat(browse): add blame flag 2026-03-03 19:03:40 -07:00
Robin Neatherway
a1fbfba9e1 Add tests of browse --actions 2025-12-11 11:31:12 +00:00
Robin Neatherway
786d276bfb Add gh browse --actions flag 2025-12-11 10:33:01 +00:00
Babak K. Shandiz
3ad3fcdce9
fix: resolve gocritic issue
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-11-03 20:05:26 +00:00
Azeem Sajid
33c30d5bd1 Inconsistent format of examples in help text 2025-02-27 16:26:25 +05:00
Azeem Sajid
0fb87903e5 Update usage to lower-kebab-case 2025-02-14 22:12:22 +05:00
ANKDDEV
a4923de755
docs: update description of command
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
2024-12-06 20:43:54 +03:00
ANKDDEV
0653a5a09c
style: reformat files 2024-12-06 20:04:15 +03:00
ANKDDEV
0e5f26449d
docs: update sentence case
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
2024-12-06 19:38:26 +03:00
ANKDDEV
694e209142
docs: improve help for browse command
Co-authored-by: Andy Feller <andyfeller@github.com>
2024-12-06 16:33:57 +03:00
ANKDDEV
3e647385f7
docs: improve docs for browse command as of #5352 2024-12-06 13:45:22 +03:00
Samuel Durante
109458cf66
Update pkg/cmd/browse/browse.go
Co-authored-by: Andy Feller <andyfeller@github.com>
2024-01-05 10:53:15 -04:00
Samuel Durante
ab7e55e20a Add more help message to browse command 2023-12-12 20:36:40 -03:00
EBIBO
8e8e6d9ac6
gh browse subdirectory path problem with repo flag (#8141) 2023-10-17 09:01:51 +00:00
nate smith
5785ccb4ec fix typo 2023-07-10 15:31:46 -07:00
nate smith
a889bfab20 Merge remote-tracking branch 'origin/trunk' into fix/error-on-no-browser 2023-07-10 15:29:17 -07:00
Naoya Yasuda
08114f981e
refactor: nest if (#7596) 2023-06-20 09:27:08 +09:00
Alexander Seiler
218f29f296
Correct some typos 2023-04-21 03:51:31 +02:00
Kousik Mitra
aa0f2de885 Return error on no-browser option if repo don't exists 2023-04-16 01:30:14 +05:30
Kenichi Kocha
1263412055
fix: make number arg, commit arg, and flags mutually exclusive (#7268)
* make number, commit, and flags mutually exclusive

* break condition into arg own check
2023-04-04 12:24:40 +09:30
Kenichi Kocha
18f2484080
docs: add commit SHA arg to gh browse help (#7267)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2023-04-03 14:40:37 +00:00
Benjamin Chadwick
82662685e3
Autocomplete branch flags (#6031)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2023-03-29 16:09:44 +00:00
Alex Petrov
c2d728ecd3
Improve documentation and consistency of the --commit flag for gh browse command (#7105) 2023-03-13 01:27:07 +00:00
Naoya Yasuda
19788459cd feat: add open num hash to browse command 2023-02-25 23:22:39 +09:00
Owen Voke
fd0af5e3aa
feat: add --releases option to gh browse (#6996) 2023-02-09 10:14:00 +11:00
Mislav Marohnić
b12ea845ef
Migrate to the new Cobra command grouping feature 2022-11-09 16:42:13 +01:00
Sam Coe
4294ee14a1
revert revert 57fbe4f317 (#6474) 2022-10-20 12:17:20 +00:00
Sam Coe
2cefb9fa59
Fix pr create regression (#6472)
* Revert "Refactor to use new git client (#6447)"

This reverts commit 57fbe4f317.

* Fix pr create regression
2022-10-20 12:46:23 +03:00
Sam Coe
57fbe4f317
Refactor to use new git client (#6447) 2022-10-19 21:11:36 +03:00
Eng Zer Jun
471cbea4fa
test: use t.Setenv to set env vars in tests (#6333)
This commit replaces `os.Setenv` with `t.Setenv` in tests. The
environment variable is automatically restored to its original value
when the test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.Setenv
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-09-26 08:46:02 +00:00
Sam Coe
e7102f9d84
Migrate to go-gh text package (#6236) 2022-09-14 09:23:55 +04:00
Natthakit Susanthitanon
ac036c1c5b
Fix browse issue with leading hashtag (#6144) 2022-08-29 10:58:46 +00:00
Sam Coe
6a8deb1f5a
Integrate latest go-gh packages (#6084) 2022-08-18 09:04:13 +03:00
Yuta Iwama
a447c078cf
Enable browsing to commit page (#5729) 2022-08-15 11:43:11 +00:00
Håvard Anda Estensen
58cb773e09
Replace ioutil with io and os (#5498) 2022-04-26 13:07:44 +02:00
Benjamin Chadwick
4bbbf46321
Fix browse last commit when using the repo override flag (#4845) 2021-12-13 15:00:22 +01:00
Benjamin Chadwick
c581a093ed
Encode segments of gh browse resulting URL (#4663)
- URLs are now always generated without a trailing slash
- Windows-style paths are normalized before processing
- Special characters in branch names are escaped

Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-11-18 13:10:55 +00:00
Boston Cartwright
dd0edc8fbd
Omit current directory when browse --branch is used with no file argument (#4676) 2021-11-04 15:00:42 +00:00
nate smith
70c78f2aa8 some fixes, streamlining 2021-10-14 17:07:51 -05:00
nate smith
4996ba2ba4 Merge remote-tracking branch 'origin/trunk' into relative-path 2021-10-14 12:24:27 -05:00
nate smith
5bdaab882b fix 2021-10-14 11:25:33 -05:00
nate smith
d72d0f47f6 Merge remote-tracking branch 'origin/trunk' into browse-commit 2021-10-13 16:53:50 -05:00
Andrew Hsu
e13398f6b4
fix browse of markdown files with line ranges (#4310)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-09-14 16:08:19 +02:00
Mislav Marohnić
e0fa56dc29 Merge remote-tracking branch 'origin' into go-module-v2 2021-09-02 20:02:16 +02:00
Des Preston
dafd0bfbd1 feat(4248): add support for line range w/ browse
Allow using a range of lines when browsing files. For example:

`gh browse test.go:10-20`

Closes #4248
2021-08-31 16:32:37 -04:00
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
bchadwic
5993018679 NEW functionality:
current folder '.', from current folder '.(pathsep)', parent folder '..(path sep)', absolute 'folder | filename'
2021-08-04 15:20:45 -07:00
bchadwic
7ef919d713 NEW functionality: current folder '.', from current folder '.(path sep)', parent folder '..(path sep)', absolute 'folder | filename' 2021-08-04 15:03:30 -07:00
Ben Chadwick
1efc07b183 made tests non os dependant 2021-07-28 22:09:37 -07:00