Automaintainer PoC
This does the following:
- Look at changes, discarding any changes not related to APKBUILDs and any changes that add new files
- Look at all changed APKBUILDs and extract the '# Maintainer:' field
- From the extracted '# Maintainer:' field get everything between '<' '>' which corresponds to the email address of the maintainer
- Store the email address on a map (to avoid duplicates)
- If there is only 1 value on the map, use ListUsers as an Admin to get the user that is registered with that email address
- Check if the Author of the merge request and the maintainer share the same username, if not assign it
In all steps there are checks and bails to avoid doing something that will end up annoying our users.
Do note that this will override a previously assigned maintainer, we might want to stop early if that is the case.