Add new stream for pr-files#7
Open
leomattic wants to merge 3 commits into
Open
Conversation
joaopamaral
approved these changes
Aug 30, 2024
joaopamaral
left a comment
There was a problem hiding this comment.
This is a great contribution @leomattic! 🚀 Thank you so much!
I've only added a small change to fix the schema (I ran a local test).
cbeb336
Author
|
Thank you for all the help @joaopamaral !! How would it work btw? will it detect it's missing data for the existing PRs and do a backfill or will the data be available only for new PRs? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Priority
Non-urgent, nice to have one day.
Description of change
It would be fun to have the number of lines added and deleted per pr. This would allow us to aggregate them by repo or team and see the ebbs and flows of our development.
I naively tried to add it in the pull requests themselves:
It looks like we have to dig a little deeper. The best would be to get the details of each commit but that sounds too expensive as there can be many per pull request.
Another option would be to get the details of each file in a pul request. It looks like we can use the endpoint in a similar way we are already doing with
pr_commitsto have a new streampr_files.https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-pull-requests-files
https://api.github.com/repos/OWNER/REPO/pulls/PULL_NUMBER/commits
https://api.github.com/repos/OWNER/REPO/pulls/PULL_NUMBER/files
Manual QA steps
Note: I have not tested this, it's my first attempt and should be taken more like pseudo code than anything else.
Risks
Rollback steps