christophebedard / dco-check

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

Support github enterprise using compare_url #110

Closed akomakom closed 3 years ago

akomakom commented 3 years ago

Removes hardcoded api.github.com and relies on the compare url provided in json file.

This works in GitHub Enterprise, eg:

 "compare_url": "https://github.MYCOMPANY.com/api/v3/repos/MY-ORG/MY-REPO/compare/{base}...{head}",

Only tested in enterprise.

codecov[bot] commented 3 years ago

Codecov Report

Merging #110 (87b2bbd) into master (5fee1b5) will decrease coverage by 2.13%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #110      +/-   ##
==========================================
- Coverage   69.40%   67.26%   -2.14%     
==========================================
  Files           2        2              
  Lines         500      498       -2     
  Branches       85       85              
==========================================
- Hits          347      335      -12     
- Misses        124      136      +12     
+ Partials       29       27       -2     
Impacted Files Coverage Δ
dco_check/dco_check.py 67.13% <100.00%> (-2.15%) :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 5fee1b5...87b2bbd. Read the comment docs.

christophebedard commented 3 years ago

Well it seems that doing a squash merge can change the email of the commit author to a different email. In this case it doesn't match the sign-off email :laughing:

christophebedard commented 3 years ago

This was released as part of 0.2.0.

akomakom commented 3 years ago

Well it seems that doing a squash merge can change the email of the commit author to a different email. In this case it doesn't match the sign-off email

My pre-commit hook was supposed to set it on first commit to this repo, but it failed, so I did it later in a squash/amend. They should match though.

christophebedard commented 3 years ago

Yeah it matched here; the CI jobs for this PR passed. The commit author and sign-off are both Signed-off-by: akomakom <regs@akom.net>.

However, the commit I pushed to master has akomakom <akomakom@users.noreply.github.com> as the commit author but still the same sign-off, so they don't match. I assume it's because I squashed it (that's just my default option) and maybe it took your default GitHub email as the commit author email? In any case, it doesn't really matter.

akomakom commented 3 years ago

Confirming that 0.2.0 works in a private GitHub Enterprise env, thanks for the quick merge!