commit | 35b3a265ac4791f70befbe3c1eac5e9b6276cef6 | [log] [tgz] |
---|---|---|
author | Edwin Kempin <ekempin@google.com> | Mon Oct 19 13:19:02 2020 +0200 |
committer | Edwin Kempin <ekempin@google.com> | Fri Nov 27 13:31:29 2020 +0100 |
tree | 384e0ab33175faf9973df81c3b2dc2d7c705706c | |
parent | e3785bc19fed89440436f3dd0d895f5a61a8f05e [diff] |
Add REST endpoint to rename an email in code owner config files of one branch This REST endpoint updates code owner config files programmatically. If it would update the emails by parsing, updating and then formatting code owner config files, comments in the code owner config files would be lost (since they are not read and remembered during parsing). Instead this REST endpoint replaces emails in code owner config files on text level by doing a string replacement. To match email strings in code owner config files correctly, we need backend specific knowledge about the syntax, e.g. which characters can appear before and after an email. Doing a simple string replacement (replace oldEmail-string with newEmail-string) would wrongly affect emails that contain the oldEmail as a substring. This REST endpoint cannot be used to assign the code ownerships of one user to another user, but requires that the old and new emails belong to the same account. This REST endpoint requires the caller to be project owner or have direct push permissions to the branch. It is intended that this REST endpoint is used by a service or bot that takes care of updating code owner config files when a user changes their email, as the email update potentially needs to be done in all repos and all branches. Change-Id: I3d930b03503dcc6a212736e37ea9ab00b9e6952d Signed-off-by: Edwin Kempin <ekempin@google.com>
This plugin provides support for defining code owners for files in a repository.
If the code-owners plugin is enabled, changes can only be submitted if all touched files are covered by approvals from code owners.
Also see resources/Documentation/about.md
IMPORTANT: Before installing/enabling the plugin follow the instructions from the setup guide, see resources/Documentation/setup-guide.md