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

Nag to close leave-open bugs only when no deps or deps are all closed #850

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

calixteman
Copy link
Contributor

It aims to fix the issue reported by bz last week.

@calixteman calixteman requested a review from sylvestre November 26, 2019 10:12
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 25.331% when pulling f8ba8c2 on calixteman:fix_leaveopen into 2d41e48 on mozilla:master.

Comment on lines +55 to +58
bugids = set()
for info in bugs.values():
bugids.update(info["depends_on"])
bugids = list(bugids)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit:

Suggested change
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()), [])))

Comment on lines +55 to +58
bugids = set()
for info in bugs.values():
bugids.update(info["depends_on"])
bugids = list(bugids)
Copy link
Contributor

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?

Comment on lines +68 to +74
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit:

Suggested change
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"] == "":
Copy link
Contributor

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

Copy link
Contributor

@marco-c marco-c left a 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?

@sylvestre sylvestre requested review from marco-c and removed request for sylvestre January 3, 2022 09:58
@marco-c
Copy link
Contributor

marco-c commented Jan 3, 2022

@calixteman ping

Copy link
Contributor

@marco-c marco-c left a 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

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

Successfully merging this pull request may close these issues.

3 participants