Add common.get_upstream_branch() and use it instead of assuming "master"
as upstream branch.
Example: user forks v20.05 to v20.05_some-fix, then creates a merge
request. CI must use v20.05 as upstream branch, when comparing for
modified files etc.
At the moment we assume that all files except in /.* belong to
a package. Now that .shared-patches was moved to device/.shared-patches
that does not work correctly anymore.
This method should really check to which package the files belong
(e.g. walk up directories until it finds an APKBUILD) instead of
assuming they are directly in the same directory as the APKBUILD.
For now just ignore **/.* (i.e. all files in dot folders),
to unblock the MR since it's a critical fix.
When running on upstream/master, don't compare HEAD against
upstream/master. This is the same commit, so all versions will be the
same. Instead compare against HEAD~1.
Make sure that changed aports always have a higher version than what is
currently in master. This check can be skipped with ci:skip-vercheck (in
square brackets).
Related: #187