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

Refactor count_bugs to use libmozdata #3676

Closed
suhaibmujahid opened this issue Sep 30, 2023 · 2 comments · Fixed by #4058
Closed

Refactor count_bugs to use libmozdata #3676

suhaibmujahid opened this issue Sep 30, 2023 · 2 comments · Fixed by #4058
Labels
good-first-bug Good for newcomers

Comments

@suhaibmujahid
Copy link
Member

We should use the Bugzilla class from libmozdata.bugzilla instead of doing a direct request:

bugbug/bugbug/bugzilla.py

Lines 282 to 291 in 082613f

def count_bugs(bug_query_params):
bug_query_params["count_only"] = 1
r = utils.get_session("bugzilla").get(
"https://bugzilla.mozilla.org/rest/bug", params=bug_query_params
)
r.raise_for_status()
count = r.json()["bug_count"]
return count

Example:

Bugzilla(params, bughandler=bughandler).get_data().wait()

@suhaibmujahid suhaibmujahid added the good-first-bug Good for newcomers label Sep 30, 2023
@akshayamadhuri
Copy link

@suhaibmujahid i would like to work on this issue can you help me with this

@suhaibmujahid
Copy link
Member Author

@akshayamadhuri you are welcom to work on the issue! You can start by following the instructions in Guidance for first contributors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-bug Good for newcomers
Projects
None yet
2 participants