The set assignee script currently exits if there's too many labels
associated with a PR. Change that to just skip the label assignment, but
continue on to assign a maintainer based on the most relevant area.
Tested with:
./scripts/set_assignees.py -v --dry-run -P 52716
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Disables allowing the python argparse library from automatically
shortening command line arguments, this prevents issues whereby
a new command is added and code that wrongly uses the shortened
command of an existing argument which is the same as the new
command being added will silently change script behaviour.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
When there are more than 15 reviewers, the `set_assignee` script was
adding the reviewers more or less on a random basis because the input
set was arbitrarily ordered (thanks to how Python "set" works), and the
attempt to add any reviewers beyond the count of 15 results in the
previoulsy added reviewer being removed.
This commit updates the `set_assignee` script such that:
1. The collaborator list (input for generating the reviewer list) is
ordered by the area match, such that the collaborators of the most
relevant area come first.
2. The reviewers of the relevant areas are added first, until the total
reviewer count is 15. The script does not attempt to add more than
15 reviewers because that can result in the previously added
reviewers being removed from the list.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The log refers to Platform taking precedence but the loop handles
Documentation as well. Move it under the proper section, drop "Drivers"
as that is not handle in any special way.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The script right now assumes that all the areas have a maintainer and
that the second area in particular has one in case of Documentation,
that results in a ValueError when it's not the case. Handle that by
checking the lists before using them.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
If PR already has an assignee, do not add additional assignees to the
PR. Each PR should only have one assignee (in most cases)
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Use MAINTAINERS.yml file to set lables, assignees and reviewers for
specific PRs or all unassigned PRs since a given date.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>