"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "api/queries_pr.go" between
gh-cli-1.12.0.tar.gz and gh-cli-1.12.1.tar.gz

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

queries_pr.go  (gh-cli-1.12.0):queries_pr.go  (gh-cli-1.12.1)
skipping to change at line 536 skipping to change at line 536
func pullRequestFragment(httpClient *http.Client, hostname string) (string, erro r) { func pullRequestFragment(httpClient *http.Client, hostname string) (string, erro r) {
cachedClient := NewCachedClient(httpClient, time.Hour*24) cachedClient := NewCachedClient(httpClient, time.Hour*24)
prFeatures, err := determinePullRequestFeatures(cachedClient, hostname) prFeatures, err := determinePullRequestFeatures(cachedClient, hostname)
if err != nil { if err != nil {
return "", err return "", err
} }
fields := []string{ fields := []string{
"number", "title", "state", "url", "isDraft", "isCrossRepository" , "number", "title", "state", "url", "isDraft", "isCrossRepository" ,
"requiresStrictStatusChecks", "headRefName", "headRepositoryOwner ", "mergeStateStatus", "headRefName", "headRepositoryOwner", "mergeStateStatus",
} }
if prFeatures.HasStatusCheckRollup { if prFeatures.HasStatusCheckRollup {
fields = append(fields, "statusCheckRollup") fields = append(fields, "statusCheckRollup")
} }
if prFeatures.HasBranchProtectionRule {
fields = append(fields, "requiresStrictStatusChecks")
}
var reviewFields []string var reviewFields []string
if prFeatures.HasReviewDecision { if prFeatures.HasReviewDecision {
reviewFields = append(reviewFields, "reviewDecision") reviewFields = append(reviewFields, "reviewDecision")
} }
fragments := fmt.Sprintf(` fragments := fmt.Sprintf(`
fragment pr on PullRequest {%s} fragment pr on PullRequest {%s}
fragment prWithReviews on PullRequest {...pr,%s} fragment prWithReviews on PullRequest {...pr,%s}
`, PullRequestGraphQL(fields), PullRequestGraphQL(reviewFields)) `, PullRequestGraphQL(fields), PullRequestGraphQL(reviewFields))
 End of changes. 2 change blocks. 
1 lines changed or deleted 4 lines changed or added

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