Skip to content

Commit

Permalink
[variant_expiration] Do not rely on is_patch to identify patches (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
suhaibmujahid authored Aug 28, 2023
1 parent 8687ec9 commit 89f9218
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions bugbot/rules/variant_expiration.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,13 @@ def handle_bug(self, bug, data):
return bug

def is_with_patch(self, bug: dict) -> bool:
"""Check if the bug has a patch"""
"""Check if the bug has a patch (not obsolete))"""
return any(
attachment["is_patch"]
and not attachment["is_obsolete"]
and attachment["content_type"] == "text/x-phabricator-request"
not attachment["is_obsolete"]
and (
attachment["content_type"] == "text/x-phabricator-request"
or attachment["is_patch"]
)
for attachment in bug["attachments"]
)

Expand Down

0 comments on commit 89f9218

Please sign in to comment.