mozilla / mozilla/bugbot

Treat the bug ID as `int`

Open
#1,432 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
68
Forks
92
Avg merge
2d 2h
Merged PRs (30d)
16

Description

We almost always convert the bug ID to str for consistency, examples:

https://github.com/mozilla/relman-auto-nag/blob/dd10eeba431dc8431d5664f8aaaaa336021d5ee4/auto_nag/scripts/has_str_no_range.py#L29

https://github.com/mozilla/relman-auto-nag/blob/e9d9e067e689e5b2fcd8030cde23493245886c46/auto_nag/scripts/meta_defect.py#L23

We should use the bug ID as int and convert it to int wherever it is retrieved as str; the rest of the codebase should not need to handle the typecasting.

@calixteman do we have limitations preventing us from doing this? WDYT?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing auto_nag/scripts/has_str_no_range.py at the referenced line and auto_nag/scripts/meta_defect.py at the referenced line, then search the codebase for bug IDs retrieved as strings. The work is done when bug IDs are treated as integers at retrieval and callers no longer need to perform the conversion themselves.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.