Skip to main content

Utility for use in gitlab ci to check merge requests have been marked tested

Project description

We use informal testing alongside automated CI testing which is documented in our merge requests. Once a project member has done some testing, the basic steps are documented in a comment on the merge request with the tested label attached to that comment (by add “~tested” to the comment text. The tested label then needs to be attached to the merge request for easy tracking

This python script is run as the alst step of ci and uses the gitlab api to inspect Merge Requests covering the current commit to see if they have the “tested” label attached. If so, it also checks the comments to ensure one of them has the ~tested label declared.

If either of these two requirements is not met, the CI job is failed.

It can be used in a gitlab-ci.yml stage like:

stages:
  - test
  - build
  - release
  - tested

< ... snip ... >

mr_tested:
  only:
    - branches
  stage: tested
  image: python:3
  script:
    - pip install gitlab_ci_mr_tested
    - gitlab_ci_mr_tested --token "${PRIVATE_TOKEN}" --label "tested"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

gitlab_ci_mr_tested-1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file gitlab_ci_mr_tested-1.0-py3-none-any.whl.

File metadata

  • Download URL: gitlab_ci_mr_tested-1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.7.0

File hashes

Hashes for gitlab_ci_mr_tested-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b4b77d7c4ade7ce02135e6c8ded3459d3a6b7a0406247bfcbc09901c1365c436
MD5 4747953a609109c3cc650cb85f5e11ee
BLAKE2b-256 2ccda44988dc4f813b8a1e8b53911a562ff93c2b51ba7976716dee8afdc1a370

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page