From c1a3bfb5f4a6760111f08167e1e6afdfa6a5cf3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20J=C3=A4ger?= Date: Tue, 4 Jun 2024 14:42:32 +0200 Subject: [PATCH] scripts: set_assignees.py: Use "size: XS" label for one-liners MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, one-line changes were tagged as "Trivial". The description of the "Trivial" label states: "Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.". Just because a change only affects a single line of code, it does not mean that it is a trivial change. It may have difficult to understand implications which require approval of the responsible maintainer. For this reason, change the label to "size: XS" and let humans judge if a PR is trivial or not. Signed-off-by: Martin Jäger --- scripts/set_assignees.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/set_assignees.py b/scripts/set_assignees.py index d2091931585..679735414c3 100755 --- a/scripts/set_assignees.py +++ b/scripts/set_assignees.py @@ -70,15 +70,12 @@ def process_pr(gh, maintainer_file, number): all_areas = set() fn = list(pr.get_files()) - manifest_change = False for changed_file in fn: if changed_file.filename in ['west.yml','submanifests/optional.yaml']: - manifest_change = True break - # one liner PRs should be trivial - if pr.commits == 1 and (pr.additions <= 1 and pr.deletions <= 1) and not manifest_change: - labels = {'Trivial'} + if pr.commits == 1 and (pr.additions <= 1 and pr.deletions <= 1): + labels = {'size: XS'} if len(fn) > 500: log(f"Too many files changed ({len(fn)}), skipping....")