Skip to content

Improve behavior of check-pureos-pkg-repo script

This is another MR that targets now the script check-pureos-pkg-repo.

It's does basically the same as done before for setup-pureos-pkg-repo.

  • Adding some more helping output if pre-conditions aren't fulfilled.
  • Don't stop the checking if branch protection isn't found.
  • Test user access rights before starting any detailed checking.
  • Extend checking so Librem5 and PureOs branch layouts are detected.
  • Don't check existence of the pristine-tar branch if the underlying repo is a native package.

Example output for a native package:

$ GITLAB_TOKEN=foobar ./check-pureos-pkg-repo -i 2221

Summary for https://source.puri.sm/carsten.schoenert/localechooser.git
======================================================================

OK:   pureos/latest branch present
FAIL: Default branch is not 'pureos/latest'
OK:   Branch 'pureos/latest' is protected
IGN:  Checking pristine-tar branch (package is '3.0 native')
OK:   CI enabled
OK:   Snippets disabled
OK:   Wiki disabled
FAIL: Service desk enabled, please disable
OK:   Merge method is fast-forward

And for a non native package:

$ GITLAB_TOKEN=foobar ./check-pureos-pkg-repo -i 2189

Summary for https://source.puri.sm/carsten.schoenert/util-linux.git
===================================================================

FAIL: No branch pureos/latest
FAIL: Default branch is not 'pureos/latest'
FAIL: Branch 'pureos/latest' doesn't exist
OK:   Branch 'pristine-tar' branch present
FAIL: Branch 'pristine-tar' is not protected
OK:   CI enabled
FAIL: Snippets enabled, please disable
FAIL: Wiki enabled, please disable
FAIL: Service desk enabled, please disable
FAIL: Merge method is not fast-forward

Merge request reports