"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pkg/cmd/pr/shared/params.go" between
gh-cli-1.10.3.tar.gz and gh-cli-1.11.0.tar.gz

About: GitHub CLI is GitHub’s official command line tool.

params.go  (gh-cli-1.10.3):params.go  (gh-cli-1.11.0)
package shared package shared
import ( import (
"fmt" "fmt"
"github.com/google/shlex"
"net/url" "net/url"
"strings" "strings"
"github.com/cli/cli/api" "github.com/cli/cli/api"
"github.com/cli/cli/internal/ghrepo" "github.com/cli/cli/internal/ghrepo"
"github.com/cli/cli/pkg/githubsearch" "github.com/cli/cli/pkg/githubsearch"
) )
func WithPrAndIssueQueryParams(client *api.Client, baseRepo ghrepo.Interface, ba seURL string, state IssueMetadataState) (string, error) { func WithPrAndIssueQueryParams(client *api.Client, baseRepo ghrepo.Interface, ba seURL string, state IssueMetadataState) (string, error) {
u, err := url.Parse(baseURL) u, err := url.Parse(baseURL)
skipping to change at line 246 skipping to change at line 247
if options.Milestone != "" { if options.Milestone != "" {
q.InMilestone(options.Milestone) q.InMilestone(options.Milestone)
} }
if options.Search != "" { if options.Search != "" {
q.AddQuery(options.Search) q.AddQuery(options.Search)
} }
return q.String() return q.String()
} }
func QueryHasStateClause(searchQuery string) bool {
argv, err := shlex.Split(searchQuery)
if err != nil {
return false
}
for _, arg := range argv {
if arg == "is:closed" || arg == "is:merged" || arg == "state:clos
ed" || arg == "state:merged" || strings.HasPrefix(arg, "merged:") || strings.Has
Prefix(arg, "closed:") {
return true
}
}
return false
}
// MeReplacer resolves usages of `@me` to the handle of the currently logged in user. // MeReplacer resolves usages of `@me` to the handle of the currently logged in user.
type MeReplacer struct { type MeReplacer struct {
apiClient *api.Client apiClient *api.Client
hostname string hostname string
login string login string
} }
func NewMeReplacer(apiClient *api.Client, hostname string) *MeReplacer { func NewMeReplacer(apiClient *api.Client, hostname string) *MeReplacer {
return &MeReplacer{ return &MeReplacer{
apiClient: apiClient, apiClient: apiClient,
 End of changes. 2 change blocks. 
0 lines changed or deleted 18 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)