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:

  - test
  - build
  - release
  - tested

< ... snip ... >

    - branches
  stage: tested
  image: python:3
    - 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.

Built Distribution

gitlab_ci_mr_tested-1.1-py3-none-any.whl (3.7 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page