-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: Check what files are touched by Pull Requests #1026
Comments
I think that would be a useful feature. I even have a local command to look that up for me, but it works on branches in the repo, and not on PRs. I'm not sure if it would be a good idea to build this into hub, however. The complexity of making and maintaing this command would be large, and its functionality is very specific. What about repos with a large amount of PRs that may come from forks, like a popular open source project? This command would be slow if it needed to fetch each one of those. |
For the PR, they could be cached with a function like sync. An upstream Do you think this kind of feature could take place in an other tool? 2015-11-09 16:28 GMT+01:00 Mislav Marohnić notifications@github.com:
|
My goal for the next larger release of hub is to offer commands to expose lower-level API data (such as issues and pull requests) to scripts. Then, it would be trivial for you to have an external script in your environment that would consume data through hub and perform this kind of analysis. |
Perfect :) give me a heads up when it's available Le lun. 9 nov. 2015 20:37, Mislav Marohnić notifications@github.com a
|
@sieben It only took a few years 😉 Now that there is a new Thank you for suggesting! |
@mislav Do you know when the |
@sieben I can't make predictions about when a certain API will be public. It's possible to also fetch it using the REST API: hub api -H 'accept: application/vnd.github.v3.diff' repos/OWNER/REPO/pulls/PR | \
grep '^diff ' -A3 | grep '^\(---\|+++\)' | cut -d/ -f2- | sort -u Via GraphQL preview: hub api -t -H 'accept: application/vnd.github.ocelot-preview+json' graphql -Fpr=PR -f query='
query($pr: Int!, $per_page: Int = 100, $after: String) {
repository(owner: "{owner}", name: "{repo}") {
pullRequest(number: $pr) {
files(first: $per_page, after: $after) {
edges {
node {
path
}
}
pageInfo {
endCursor
hasNextPage
}
}
}
}
}
' |
Thank you very much. I've found a similar request. Do you think this is a feature that |
@sieben No doubt this feature could be immensely useful! But I don't have good ideas yet about how to expose this functionality properly in core hub. Until this clarifies, accessing this information via |
Hello,
I would like to know if there is somebody working on this feature:
hub pull_requests my_file
Modifed by #xxx (github.com/.../)
Modifed by #yyy (github.com/.../)
Do you think it's possible? Do you think of a better API? Is there something else that provides similar features?
The text was updated successfully, but these errors were encountered: