From ae2ec36cd5dc40d08adf2165b78fc39521e1ba06 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Wed, 18 Oct 2023 02:37:17 +0000 Subject: [PATCH] pr_labeler: exempt bots from porting_guide check For example, patchback is not a release manager, but we still want it to backport Porting Guide PRs. --- hacking/pr_labeler/label.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hacking/pr_labeler/label.py b/hacking/pr_labeler/label.py index 8c2e454acf..31a06b19ef 100644 --- a/hacking/pr_labeler/label.py +++ b/hacking/pr_labeler/label.py @@ -243,8 +243,13 @@ def no_body_nag(ctx: IssueOrPrCtx) -> None: def warn_porting_guide_change(ctx: PRLabelerCtx) -> None: """ - Complain if a user outside of the Release Management WG changes porting_guide + Complain if a non-bot user outside of the Release Management WG changes + porting_guide """ + user = ctx.pr.user.login + if user.endswith("[bot]"): + return + # If the API token does not have permisisons to view teams in the ansible # org, fall back to an empty list. members = []