Skip to content

Commit

Permalink
[duplicate_copy_metadata] Do not copy metadata from private bugs to p…
Browse files Browse the repository at this point in the history
…ublic ones
  • Loading branch information
suhaibmujahid committed Sep 22, 2023
1 parent 28e8400 commit 8bfc159
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bugbot/rules/duplicate_copy_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def bughandler(bug, data):
"regressed_by",
"is_open",
"cf_webcompat_priority",
"groups",
],
bughandler=bughandler,
bugdata=original_bugs,
Expand All @@ -82,13 +83,19 @@ def bughandler(bug, data):
if not bug["is_open"]:
continue

is_public = not bug["groups"]

copied_fields = {}
for dup_bug_id in bug["duplicates"]:
dup_bug_id = str(dup_bug_id)
dup_bug = dup_bugs.get(dup_bug_id)
if not dup_bug:
continue

if is_public and dup_bug["groups"]:
# We avoid copying fields from private to public bugs
continue

# TODO: Since the logic for copied fields is getting bigger,
# consider refactoring it in a separate method.

Expand Down Expand Up @@ -368,6 +375,7 @@ def get_bz_params(self, date):
"regressed_by",
"cf_webcompat_priority",
"last_change_time_non_bot",
"groups",
]

params = {
Expand Down

0 comments on commit 8bfc159

Please sign in to comment.