github-tools / github-release-notes

Node module to create a release or a changelog from a tag and uses issues or commits to creating the release notes.
https://github-tools.github.io/github-release-notes/
GNU General Public License v3.0
880 stars 325 forks source link

Correctly compare dates for PR retrieval; fix tests #301

Open cjbarth opened 3 years ago

cjbarth commented 3 years ago

The logic for comparing dates tries to compare a string to a Date object. This causes additional pages of PRs to never be retrieved. This has been fixed.

Also, constructing a date used the local-specific date instead of UTC, which means that the tests would only pass if one ran them from a UTC timezone. The code was corrected to build the dates using UTC.

I found this problem when working on https://github.com/node-saml/passport-saml/issues/597

codecov-commenter commented 3 years ago

Codecov Report

Merging #301 (960dbb2) into master (d7ad51a) will decrease coverage by 0.19%. The diff coverage is 10.00%.

:exclamation: Current head 960dbb2 differs from pull request most recent head 0b306da. Consider uploading reports for the commit 0b306da to get more accurate results Impacted file tree graph

@@            Coverage Diff             @@
##           master     #301      +/-   ##
==========================================
- Coverage   39.08%   38.88%   -0.20%     
==========================================
  Files           8        8              
  Lines         394      396       +2     
==========================================
  Hits          154      154              
- Misses        240      242       +2     
Impacted Files Coverage Δ
lib/src/Gren.js 4.72% <0.00%> (-0.05%) :arrow_down:
lib/src/_utils.js 95.71% <100.00%> (ø)

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 ff0ddae...0b306da. Read the comment docs.

cjbarth commented 3 years ago

@alexcanessa , would you be able to take a quick look at this PR? This issue affects node-saml and passport-saml, and I'd love to get this fix landed and released. If there is anything I can do to help the process along, please let me know.