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

🐛 Don't stop looking if an old PR gets updated #32

Merged
merged 1 commit into from
Jul 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions d3b_release_maker/release_maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,14 @@ def _get_merged_prs(self, after, prs_to_ignore=None):
prs = []
prs_to_ignore = prs_to_ignore or {}
for p in self.session.yield_paginated(endpoint, query_params):
if p["merged_at"]:
if p["merged_at"] < after:
if p["merged_at"]: # only the merged PRs
if p["updated_at"] < after:
# stop looking if last update was before the last release
break
elif (p["number"] not in prs_to_ignore) and (
regex.search(release_pattern, p["title"]) is None
elif (
(p["merged_at"] > after) # ignore old PRs with updates
and (p["number"] not in prs_to_ignore)
and (regex.search(release_pattern, p["title"]) is None)
):
prs.append(p)
return prs
Expand Down