Skip to content
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

Ability to view past PRs #6

Open
mkatychev opened this issue Apr 9, 2019 · 7 comments
Open

Ability to view past PRs #6

mkatychev opened this issue Apr 9, 2019 · 7 comments

Comments

@mkatychev
Copy link

Is there any current plans to add functionality to PRs that have already been merged/closed?

@mkatychev mkatychev changed the title Ability to view pas PRs Ability to view past PRs Apr 16, 2019
@ptsochantaris
Copy link
Owner

Hi @mkatychev and sorry for the very slow reply. I didn't have any plans to do that TBH, the logic of the program is mostly about throwing away items what are merged or closed - i.e. to just hold items which are currently open.

However, I'd love to hear your thoughts on this - is this more about syncing down items which were closed/merged within a certain time range? Or would it be more about e.g. having a parameter that stops the program from removing items which were merged or closed after an update?

@mkatychev
Copy link
Author

Hey thanks for getting back to me! I'm quite unfamiliar with the GitHub API but my main use case was to trawl through already closed PRs at time of sync to use it sort of like a git log but for PR discussions. I'm not sure if that's possible but it would be tremendously useful. I suppose a certain time range works if it's too call intensive to do it from the beginning.

@amyers
Copy link

amyers commented Oct 11, 2019

I have a quickly hacked-together script that generates PRs across large numbers of repos (eg "we need to update in the circleci config for every repo" type situations). Being able to quickly view the status of every PR matching a given criteria, whether open or closed, would be extremely useful.

@ptsochantaris
Copy link
Owner

Hi @amyers! This is a bit of shameless self-promotion, BUT, for scripting I would strongly recommend looking into Trailer CLI here: https://github.com/ptsochantaris/trailer-cli as it would probably cover a lot of use cases related to what you want to do, for instance it's really good at tracking the open/close state of a group of PRs and supporting querying based on various attributes (including state), has options to output only the info you want CSV-style, and even builds JSON files with data which you can mine directly from your script if you prefer.

@amyers
Copy link

amyers commented Oct 18, 2019

Aye, that's why I commented on this issue for trailer-cli ;)

From what I can see, trailer update prs only ever pulls down info on open PRs? Or am I overlooking something?

@ptsochantaris
Copy link
Owner

Hahaha, oh dear, apologies, I wasn't looking at which repo this was. #facepalm

To answer your question, the problem is that we can't really request "give me every PR in the repo" via the API, as that will just overload the query and/or take ages to process, so we have to ask for only open items, plus any items which are already in our list. This means we can detect that existing items have closed, but we can't really retroactively find out that there were existing closed items. Does this make sense, or am I misunderstanding your question?

@mkatychev
Copy link
Author

@ptsochantaris this does make sense thank you, and sorry for the two month reply! I suppose scraping closed PRs would be a better alternative than doing this then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants