christophebedard / dco-check

Simple DCO check script to be used in any CI
Apache License 2.0
12 stars 6 forks source link

Fallback to get_common_ancestor_commit_hash for manual GL pipelines #93

Closed alpianon closed 3 years ago

alpianon commented 3 years ago

Workaround/fallback for undocumented GitLab behaviour: if a pipeline is manually run against any branch (i.e. it is not triggered by a commit or by a MR or PR), CI_COMMIT_BEFORE_SHA is set to a string of 40 zeros. In such case, to avoid that commit range check fails with error, we need to fallback to get_common_ancestor_commit_hash

Solves #92

codecov[bot] commented 3 years ago

Codecov Report

Merging #93 (78dee73) into master (cc6cb61) will decrease coverage by 4.86%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #93      +/-   ##
==========================================
- Coverage   73.12%   68.25%   -4.87%     
==========================================
  Files           2        2              
  Lines         480      482       +2     
  Branches       77       78       +1     
==========================================
- Hits          351      329      -22     
- Misses         98      129      +31     
+ Partials       31       24       -7     
Impacted Files Coverage Δ
dco_check/dco_check.py 68.12% <0.00%> (-4.89%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update cc6cb61...78dee73. Read the comment docs.

alpianon commented 3 years ago

some more tests required, I'm closing this PR and I will open another one