Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not compare dates to detect new commits #911

Merged
merged 3 commits into from
Mar 28, 2025

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented Mar 27, 2025

NCU was relying on timelineItems to get date for the last push event, but turns out that gives us the commit date (not very relevant for what we're testing as the commit and push can be done at different moment), not the date when the push was received by GH servers. What we can do instead is to use the SHA of the commit, and compare it with the last approving review.
I also take the opportunity to update ncu-ci to pass the now required commit SHA (I reused the --certify-safe flag for that), I didn't mark it as semver-major given that the breaking change was made upstream, so the PR is fixing, rather than breaking, but happy to reconsider.
This will have the effect of making request-ci work only on approved PRs, but currently it is not working at all, so I'd take as an improvement.

Commits should land separately, and it probably makes sense to review them separately as well.

Copy link

codecov bot commented Mar 27, 2025

Codecov Report

Attention: Patch coverage is 85.71429% with 3 lines in your changes missing coverage. Please review.

Project coverage is 79.70%. Comparing base (4a03216) to head (cdf482f).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
lib/pr_checker.js 84.21% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #911      +/-   ##
==========================================
- Coverage   79.86%   79.70%   -0.17%     
==========================================
  Files          39       39              
  Lines        4684     4641      -43     
==========================================
- Hits         3741     3699      -42     
+ Misses        943      942       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aduh95
Copy link
Contributor Author

aduh95 commented Mar 27, 2025

/cc @nodejs/node-core-utils

aduh95 added 3 commits March 28, 2025 09:10
Changes have been made on Jenkins side, tip of the PR head must be sent
to Jenkins in order to start a PR. This commit adapts ncu-ci CLI to pass
that information – or get the SHA from the latest review if not passed.
...to display commits pushed since last approving review. It would only
matter if time on the comitter machine is very different from GitHub's
own time.
That allows us to skip quering for `timelineItems`.
@aduh95 aduh95 force-pushed the do-not-rely-timelineItems branch from 9c7f488 to cdf482f Compare March 28, 2025 08:14
@aduh95 aduh95 merged commit cdf482f into nodejs:main Mar 28, 2025
11 checks passed
@aduh95 aduh95 temporarily deployed to github-pages March 28, 2025 08:15 — with GitHub Pages Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants