[ENH]: Filter PRs by checking for commits in branch#54
Draft
manics wants to merge 3 commits intoexecutablebooks:mainfrom
Draft
[ENH]: Filter PRs by checking for commits in branch#54manics wants to merge 3 commits intoexecutablebooks:mainfrom
manics wants to merge 3 commits intoexecutablebooks:mainfrom
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
Contributor
Author
|
Example: JupyterHub was switched from Old behaviour:
|
Member
|
This seems pretty good to me! If @consideRatio is happy with the implementation I am 👍 |
Collaborator
|
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! |
Contributor
Author
|
I'm not sure how to add a test for this... maybe a dedicated branch we can run tests against for real? |
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.
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
--sinceargument 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
--sinceis 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: