-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Description
Summary
If a PR is created by the maintainer of an area, then the maintainer is usually the assignee.
However, the current set_assignees.py
script will always attempt to replace the author with another maintainer if there is one: https://github.com/zephyrproject-rtos/zephyr/blob/main/scripts/set_assignees.py#L134-L150
The problem is that if an author creates a PR with 1000 lines of code changes, where the author is the maintainer for the areas of 999 of those lines, and there is another maintainer for the last 1 line of change, then the other maintainer will be assigned. This is for example fairly often the case with a PR that implements a new API function for their own area, where there is a single line in the release notes, and the maintainers for the Release Notes
area are assigned instead.
Describe the solution you'd like
The set_assignees.py
should take the number of line changes into account, and only overwrite the author as the assignee, if there exists a maintainer of another area, where the number of files changed for the other area is significant, e.g. at least 10% of the PR.
The assignee should be the maintainer of area with the most changes, or if maintainer == author, then the maintainer oft he area of with second-most changes, but at least 10% of the lines of code changes (or any other relative value).
Alternatives
No response
Additional Context
No response