-
Notifications
You must be signed in to change notification settings - Fork 11
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
[ENH]: Filter PRs by checking for commits in branch #54
base: main
Are you sure you want to change the base?
Conversation
If a branch is specified PRs are filtered by checking their PR base branch. This fails to pick up all PRs when multiple PRs are merged into one branch, followed by that branch being merged into the mainline via a single PR. If the `--since` argument is a git ref (_not_ a date) this is used to get a list of commits in the requested branch after `--since`. The list of PRs is then filtered by checking whether the PR commit appears in this list of branch commits. If the commit history for merged PRs/branches is maintained this should ensure PRs merged into one branch that are subsequently merged altogether into another branch are picked up. Closes executablebooks#50
Example: JupyterHub was switched from Old behaviour:
|
This seems pretty good to me! If @consideRatio is happy with the implementation I am 👍 |
I note that this is a Draft PR currently. I'll wait with code review until its a non-draft. @manics please ping me if its ready for review now or in the future! |
I'm not sure how to add a test for this... maybe a dedicated branch we can run tests against for real? |
If a branch is specified PRs are filtered by checking their PR base branch. This fails to pick up all PRs when multiple PRs are merged into one branch, followed by that branch being merged into the mainline via a single PR. It will also fail if a branch is renamed.
If the
--since
argument is a git ref (not a date) this will now be used to get a list of commits in the requested branch after--since
. The list of PRs is then filtered by checking whether the PR commit appears in this list of branch commits. If the commit history for merged PRs/branches is maintained this should ensure PRs merged into one branch that are subsequently merged altogether into another branch are picked up.If
--since
is a date the current behaviour is kept since a commit date is not the same as the date the commit was added to a repo, so the only alternative is to fetch the list of all commits.Closes #50
Todo: