Skip to content

Automaintainer PoC

Leo requested to merge Leo/aports-qa-bot:automaintainer into master

This does the following:

  1. Look at changes, discarding any changes not related to APKBUILDs and any changes that add new files
  2. Look at all changed APKBUILDs and extract the '# Maintainer:' field
  3. From the extracted '# Maintainer:' field get everything between '<' '>' which corresponds to the email address of the maintainer
  4. Store the email address on a map (to avoid duplicates)
  5. 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
  6. 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.

Merge request reports