Seravo / gnitpick

Automated git commit message nitpicking
GNU Lesser General Public License v3.0
12 stars 2 forks source link

Add support for Gitlab-CI #7

Open ottok opened 4 years ago

ottok commented 4 years ago

Gnitpick was initially written with Github and Travis-CI in mind. But if might also be useful on Gitlab-CI.

We should incorporate checking for CI_MERGE_REQUEST_SOURCE_BRANCH_SHA and CI_MERGE_REQUEST_TARGET_BRANCH_SHA to get the Gitlab-CI Merge Request commit range.

See https://docs.gitlab.com/ee/ci/variables/predefined_variables.html

ottok commented 4 years ago

Tested in https://salsa.debian.org/mariadb-team/mariadb-10.4/-/jobs/657676 - works well! Just need to document this properly and add support for CIMERGE* variables like we have in Travis-CI.

ottok commented 4 years ago

Without the variables, a fork running long behind upstream master will get way too many commits comparing only origin/master..HEAD. See example https://gitlab.com/CsatariGergely/fevermap/-/jobs/516483911