Merge pull request #12657 from yuvrajangadsingh/feature/pr-files-status

feat(pr): add changeType field to files JSON output
This commit is contained in:
Kynan Ware 2026-03-03 16:04:00 -07:00 committed by GitHub
commit 39874b7cf4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 6 deletions

View file

@ -296,9 +296,10 @@ type PullRequestCommitCommit struct {
}
type PullRequestFile struct {
Path string `json:"path"`
Additions int `json:"additions"`
Deletions int `json:"deletions"`
Path string `json:"path"`
Additions int `json:"additions"`
Deletions int `json:"deletions"`
ChangeType string `json:"changeType"`
}
type ReviewRequests struct {

View file

@ -148,7 +148,8 @@ var prFiles = shortenQuery(`
nodes {
additions,
deletions,
path
path,
changeType
}
}
`)

View file

@ -26,7 +26,7 @@ func TestPullRequestGraphQL(t *testing.T) {
{
name: "compressed query",
fields: []string{"files"},
want: "files(first: 100) {nodes {additions,deletions,path}}",
want: "files(first: 100) {nodes {additions,deletions,path,changeType}}",
},
{
name: "invalid fields",
@ -72,7 +72,7 @@ func TestIssueGraphQL(t *testing.T) {
{
name: "compressed query",
fields: []string{"files"},
want: "files(first: 100) {nodes {additions,deletions,path}}",
want: "files(first: 100) {nodes {additions,deletions,path,changeType}}",
},
{
name: "projectItems",