-
Notifications
You must be signed in to change notification settings - Fork 68
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
Nag to close leave-open bugs only when no deps or deps are all closed #850
base: master
Are you sure you want to change the base?
Conversation
bugids = set() | ||
for info in bugs.values(): | ||
bugids.update(info["depends_on"]) | ||
bugids = list(bugids) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit:
bugids = set() | |
for info in bugs.values(): | |
bugids.update(info["depends_on"]) | |
bugids = list(bugids) | |
bugids = list(set(sum((info["depends_on"] for info in bugs.values()), []))) |
bugids = set() | ||
for info in bugs.values(): | ||
bugids.update(info["depends_on"]) | ||
bugids = list(bugids) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rename the variable dependencies_ids
, so it's clearer what it refers to?
to_fix = {} | ||
for bugid, info in bugs.items(): | ||
deps = set(info["depends_on"]) | ||
if not (deps & open_bugs): | ||
to_fix[bugid] = info | ||
|
||
return to_fix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit:
to_fix = {} | |
for bugid, info in bugs.items(): | |
deps = set(info["depends_on"]) | |
if not (deps & open_bugs): | |
to_fix[bugid] = info | |
return to_fix | |
return {bug_id: info for bug_id, info in bugs.items() if not (set(info["depends_on"]) & open_bugs)} |
|
||
def filter_deps(self, bugs): | ||
def handler(bug, data): | ||
if bug["resolution"] == "": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you could filter out closed bugs at query time directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, do you want to rebase it and test it to make sure it still works?
@calixteman ping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@calixteman please rebase and test so we can merge this
It aims to fix the issue reported by bz last week.