Skip to content

Commit 82eb05b

Browse files
authored
Merge branch 'trunk' into eugene/fetch-ref-handle-ReleaseNotFound
2 parents 1beb825 + 588120b commit 82eb05b

9 files changed

Lines changed: 87 additions & 25 deletions

File tree

docs/triage.md

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ As we get more issues and pull requests opened on the GitHub CLI, we've decided
66

77
Review and label [open issues missing either the `enhancement`, `bug`, or `docs` label](https://github.com/cli/cli/issues?q=is%3Aopen+is%3Aissue+-label%3Abug%2Cenhancement%2Cdocs+) and the label(s) corresponding to the command space prefixed with `gh-`, such as `gh-pr` for the `gh pr` command set, or `gh-extension` for the `gh extension` command set.
88

9-
Then, engage with the issue and community with the goal to remove the `needs-triage` label from the issue. The heuristics for triaging the different issue types are as follow:
9+
The heuristics for triaging the different issue types are as follows:
1010

1111
### Bugs
1212

13+
For bugs, the FR should engage with the issue and community with the goal to remove the `needs-triage` label from the issue.
14+
1315
To be considered triaged, `bug` issues require the following:
1416

1517
- A severity label `p1`, `p2`, and `p3`
@@ -23,33 +25,55 @@ To be considered triaged, `bug` issues require the following:
2325
| `p2` | Affects more than a few users but doesn't prevent core functions |
2426
| `p3` | Affects a small number of users or is largely cosmetic |
2527

26-
### Enhancements
28+
### Enhancements and Docs
29+
30+
For `enhancement` issues, the FR's role is to prepare the issue for team review and triage.
31+
32+
When a new issue is opened, the FR **should**:
2733

28-
To be considered triaged, `enhancement` issues require either
34+
- Acknowledge the issue
35+
- Assign themselves to the issue
36+
- Ensure there is enough information to understand the enhancement's scope and value
37+
- Ask the user for more information about value and use-case, if necessary
38+
- Leave the `needs-triage` label on the issue
39+
- Add the `needs-user-input` and `needs-investigation` labels as needed
2940

30-
- Clearly defined Acceptance Criteria as above
31-
- The `needs-investigation` or `needs-design` label with a clearly defined set of open questions to be investigated.
41+
When the FR has enough information to be triaged, they should:
42+
- Remove the `needs-user-input` and `needs-investigation` labels
43+
- Remove their assignment from the issue
3244

33-
### Docs
45+
The FR should **avoid**:
3446

35-
To be considered triaged, `docs` issues require clearly defined Acceptance Criteria, as defined above
47+
- Thoroughly investigating the enhancement's technical feasibility
48+
- Prematurely accepting the enhancement request
49+
- Removing the `needs-triage` label
50+
- Labeling issues as `help wanted`
3651

37-
## Additional triaging processes and labels
52+
## Additional triaging labels
3853

39-
Before removing the `needs-triage` label, consider adding any of the following labels below.
54+
The FR can consider adding any of the following labels below.
4055

4156
| Label | Description |
4257
| - | - |
4358
| `discuss` | Some issues require discussion with the internal team. Adding this label will automatically open up an internal discussion with the team to facilitate this discussion. |
4459
| `core` | Defines what we would like to do internally. We tend to lean towards `help wanted` by default, and adding `core` should be reserved for trickier issues or implementations we have strong opinions/preferences about. |
45-
| `good first issue` | Used to denote when an issue may be a good candidate for a first-time contributor to the CLI. These are usually small and well defined issues. |
46-
| `help wanted` | Defines what we feel the community could solve should they care to contribute, respectively. We tend to lean towards `help wanted` by default, and adding `core` should be reserved for trickier issues or implementations we have strong opinions/preferences about. |
47-
| `invalid` | Added to spam and abusive issues. |
4860
| `needs-user-input` | After asking any contributors for more information, add this label so it is clear that the issue has been responded to and we are waiting on the user. |
61+
| `needs-investigation` | Used when the issue requires further investigation before it can be reviewed and triaged. This is often used for issues that are not clearly bugs or enhancements, or when the FR needs to gather more information before proceeding. |
62+
| `invalid` | Added to spam and abusive issues. |
63+
64+
### Labels for team enhancement triaging
65+
66+
The FR should **avoid** adding these labels outside of team enhancement triage.
67+
68+
| Label | Description |
69+
| - | - |
70+
| `good first issue` | Used to denote when an issue may be a good candidate for a first-time contributor to the CLI. These are usually small and well defined issues. |
71+
| `help wanted` | These issues are ready for community contribution. |
72+
| `help wanted candidate` | Used to denote when an issue may be a good candidate for community contribution. Issues labelled this way are discussed internally and may be promoted to `help wanted`. |
4973

5074
## Expectations for community pull requests
5175

52-
All incoming pull requests are assigned to one of the engineers for review on a round-robin basis.
76+
All incoming pull requests are assigned to one of the engineers for review on a load-balanced basis.
5377
The person in a triage role for a week could take a glance at these pull requests, mostly to see whether
5478
the changeset is feasible and to allow the associated CI run for new contributors.
5579

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module github.com/cli/cli/v2
22

33
go 1.24.0
44

5-
toolchain go1.24.5
5+
toolchain go1.24.6
66

77
require (
88
github.com/AlecAivazis/survey/v2 v2.3.7
@@ -47,7 +47,7 @@ require (
4747
github.com/sigstore/protobuf-specs v0.5.0
4848
github.com/sigstore/sigstore-go v1.1.0
4949
github.com/spf13/cobra v1.9.1
50-
github.com/spf13/pflag v1.0.6
50+
github.com/spf13/pflag v1.0.7
5151
github.com/stretchr/testify v1.10.0
5252
github.com/theupdateframework/go-tuf/v2 v2.1.1
5353
github.com/yuin/goldmark v1.7.12

go.sum

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,8 +1363,9 @@ github.com/spf13/cast v1.9.2 h1:SsGfm7M8QOFtEzumm7UZrZdLLquNdzFYfIbEXntcFbE=
13631363
github.com/spf13/cast v1.9.2/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo=
13641364
github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo=
13651365
github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0=
1366-
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
13671366
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
1367+
github.com/spf13/pflag v1.0.7 h1:vN6T9TfwStFPFM5XzjsvmzZkLuaLX+HS+0SeFLRgU6M=
1368+
github.com/spf13/pflag v1.0.7/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
13681369
github.com/spf13/viper v1.20.1 h1:ZMi+z/lvLyPSCoNtFCpqjy0S4kPbirhpTMwl8BkW9X4=
13691370
github.com/spf13/viper v1.20.1/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4=
13701371
github.com/spiffe/go-spiffe/v2 v2.5.0 h1:N2I01KCUkv1FAjZXJMwh95KK1ZIQLYbPfhaxw8WS0hE=

pkg/cmd/search/code/code.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ func NewCmdCode(f *cmdutil.Factory, runF func(*CodeOptions) error) *cobra.Comman
4646
Note that these search results are powered by what is now a legacy GitHub code search engine.
4747
The results might not match what is seen on %[1]sgithub.com%[1]s, and new features like regex search
4848
are not yet available via the GitHub API.
49+
50+
For more information on handling search queries containing a hyphen, run %[1]sgh search --help%[1]s.
4951
`, "`"),
5052
Example: heredoc.Doc(`
5153
# Search code matching "react" and "lifecycle"

pkg/cmd/search/commits/commits.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,17 @@ func NewCmdCommits(f *cmdutil.Factory, runF func(*CommitsOptions) error) *cobra.
3737
cmd := &cobra.Command{
3838
Use: "commits [<query>]",
3939
Short: "Search for commits",
40-
Long: heredoc.Doc(`
40+
Long: heredoc.Docf(`
4141
Search for commits on GitHub.
4242
4343
The command supports constructing queries using the GitHub search syntax,
4444
using the parameter and qualifier flags, or a combination of the two.
4545
4646
GitHub search syntax is documented at:
4747
<https://docs.github.com/search-github/searching-on-github/searching-commits>
48-
`),
48+
49+
For more information on handling search queries containing a hyphen, run %[1]sgh search --help%[1]s.
50+
`, "`"),
4951
Example: heredoc.Doc(`
5052
# Search commits matching set of keywords "readme" and "typo"
5153
$ gh search commits readme typo

pkg/cmd/search/issues/issues.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,17 @@ func NewCmdIssues(f *cmdutil.Factory, runF func(*shared.IssuesOptions) error) *c
2626
cmd := &cobra.Command{
2727
Use: "issues [<query>]",
2828
Short: "Search for issues",
29-
Long: heredoc.Doc(`
29+
Long: heredoc.Docf(`
3030
Search for issues on GitHub.
3131
3232
The command supports constructing queries using the GitHub search syntax,
3333
using the parameter and qualifier flags, or a combination of the two.
3434
3535
GitHub search syntax is documented at:
3636
<https://docs.github.com/search-github/searching-on-github/searching-issues-and-pull-requests>
37-
`),
37+
38+
For more information on handling search queries containing a hyphen, run %[1]sgh search --help%[1]s.
39+
`, "`"),
3840
Example: heredoc.Doc(`
3941
# Search issues matching set of keywords "readme" and "typo"
4042
$ gh search issues readme typo

pkg/cmd/search/prs/prs.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,17 @@ func NewCmdPrs(f *cmdutil.Factory, runF func(*shared.IssuesOptions) error) *cobr
2828
cmd := &cobra.Command{
2929
Use: "prs [<query>]",
3030
Short: "Search for pull requests",
31-
Long: heredoc.Doc(`
31+
Long: heredoc.Docf(`
3232
Search for pull requests on GitHub.
3333
3434
The command supports constructing queries using the GitHub search syntax,
3535
using the parameter and qualifier flags, or a combination of the two.
3636
3737
GitHub search syntax is documented at:
3838
<https://docs.github.com/search-github/searching-on-github/searching-issues-and-pull-requests>
39-
`),
39+
40+
For more information on handling search queries containing a hyphen, run %[1]sgh search --help%[1]s.
41+
`, "`"),
4042
Example: heredoc.Doc(`
4143
# Search pull requests matching set of keywords "fix" and "bug"
4244
$ gh search prs fix bug

pkg/cmd/search/repos/repos.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,17 @@ func NewCmdRepos(f *cmdutil.Factory, runF func(*ReposOptions) error) *cobra.Comm
3838
cmd := &cobra.Command{
3939
Use: "repos [<query>]",
4040
Short: "Search for repositories",
41-
Long: heredoc.Doc(`
41+
Long: heredoc.Docf(`
4242
Search for repositories on GitHub.
4343
4444
The command supports constructing queries using the GitHub search syntax,
4545
using the parameter and qualifier flags, or a combination of the two.
4646
4747
GitHub search syntax is documented at:
4848
<https://docs.github.com/search-github/searching-on-github/searching-for-repositories>
49-
`),
49+
50+
For more information on handling search queries containing a hyphen, run %[1]sgh search --help%[1]s.
51+
`, "`"),
5052
Example: heredoc.Doc(`
5153
# Search repositories matching set of keywords "cli" and "shell"
5254
$ gh search repos cli shell

pkg/cmd/search/search.go

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package search
22

33
import (
4+
"github.com/MakeNowJust/heredoc"
45
"github.com/cli/cli/v2/pkg/cmdutil"
56
"github.com/spf13/cobra"
67

@@ -15,7 +16,33 @@ func NewCmdSearch(f *cmdutil.Factory) *cobra.Command {
1516
cmd := &cobra.Command{
1617
Use: "search <command>",
1718
Short: "Search for repositories, issues, and pull requests",
18-
Long: "Search across all of GitHub.",
19+
Long: heredoc.Docf(`
20+
Search across all of GitHub.
21+
22+
Excluding search results that match a qualifier
23+
24+
In a browser, the GitHub search syntax supports excluding results that match a search qualifier
25+
by prefixing the qualifier with a hyphen. For example, to search for issues that
26+
do not have the label "bug", you would use %[1]s-label:bug%[1]s as a search qualifier.
27+
28+
%[1]sgh%[1]s supports this syntax in %[1]sgh search%[1]s as well, but it requires extra
29+
command line arguments to avoid the hyphen being interpreted as a command line flag because it begins with a hyphen.
30+
31+
On Unix-like systems, you can use the %[1]s--%[1]s argument to indicate that
32+
the arguments that follow are not a flag, but rather a query string. For example:
33+
34+
$ gh search issues -- "my-search-query -label:bug"
35+
36+
On PowerShell, you must use both the %[1]s--%[2]s%[1]s argument and the %[1]s--%[1]s argument to
37+
produce the same effect. For example:
38+
39+
$ gh --%[2]s search issues -- "my search query -label:bug"
40+
41+
See the following for more information:
42+
- GitHub search syntax: <https://docs.github.com/en/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#exclude-results-that-match-a-qualifier>
43+
- The PowerShell stop parse flag %[1]s--%[2]s%[1]s: <https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_parsing?view=powershell-7.5#the-stop-parsing-token>
44+
- The Unix-like %[1]s--%[1]s argument: <https://www.gnu.org/software/bash/manual/bash.html#Shell-Builtin-Commands-1>
45+
`, "`", "%"),
1946
}
2047

2148
cmd.AddCommand(searchCodeCmd.NewCmdCode(f, nil))

0 commit comments

Comments
 (0)