Skip to content

Commit 8f2a4b9

Browse files
committed
mailbot: strip down From lines of user bots
syzbot adds some noise to its email address. Remove it when checking for auto-cr. Signed-off-by: Jakub Kicinski <[email protected]>
1 parent df5eac5 commit 8f2a4b9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mailbot.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,10 @@ def _resolve_authorized(self, pw):
324324
self._authorized = False
325325

326326
def user_bot(self):
327-
return self.msg.get('From') in auto_changes_requested
327+
sender = self.msg.get('From')
328+
# strip down [email protected] to [email protected], for syzbot
329+
sender = re.sub(r"\+[a-zA-Z0-9_-]*@", "@", sender)
330+
return sender in auto_changes_requested
328331

329332
def auto_awaiting_upstream(self):
330333
# Try to operate only on the first message in the thread

0 commit comments

Comments
 (0)