Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 2
Message 1 of 4

GraphQL API doesn't indicate which files in a PR are new

Solved! Go to Solution.

The REST API would tell you if a file was added, modified or deleted: https://developer.github.com/v3/pulls/#list-pull-requests-files

 

The GraphQL API doesn't seem to have any way to do this - you can see how many additions/deletions were in a commit/PR overall, but there isn't a way (without separately querying the repo) to see which files are new vs simply had lines added. This is functionality we used in the REST API for some of our automation.

3 Replies
Highlighted
Solution
Community Manager
Message 2 of 4

Re: GraphQL API doesn't indicate which files in a PR are new

Hi @RyanCavanaugh,

Thanks for the feedback! I've taken your suggestion and passed it along to the appropriate teams.
I don't have an ETA on when or if this request will be implemented but this is in good hands.

Thank you for your perspective and your contribution!
All the Best

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!

Highlighted
Ground Controller Lvl 1
Message 3 of 4

Re: GraphQL API doesn't indicate which files in a PR are new

Similarly, I'm running into wanting to know which files were deleted!

Highlighted
Ground Controller Lvl 1
Message 4 of 4

Re: GraphQL API doesn't indicate which files in a PR are new

The proposed solution isn't really one. It merely admits that the requested feature is missing. It would be nice to leave this as "unresolved" and notify subscribers to when this is is actually fixed. Thanks!