feat(ncu-ci): check for request-ci label#806
Merged
aduh95 merged 5 commits intonodejs:mainfrom May 21, 2024
Merged
Conversation
When running `ncu-ci` without the `--certify-safe` CLI flag, if something was pushed to a PR since the last approving review, check if the last time the `request-ci` label was added, it was done by a Collaborator and after the last push event on the PR.
fix for when there are no request-ci labels
Contributor
Author
Tests would be great, I'd prefer if someone else could contribute that, I'm not sure when I'd have time to work on that |
lib/pr_data.js
Outdated
| ]); | ||
| } | ||
|
|
||
| async getLabels() { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
lib/pr_checker.js
Outdated
| async checkCommitsAfterReviewOrLabel() { | ||
| if (this.checkCommitsAfterReview()) return true; | ||
|
|
||
| await Promise.all([this.data.getLabels(), this.data.getCollaborators()]); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Contributor
Author
There was a problem hiding this comment.
How would that change the testability? Making extra requests will make it more likely that the bot will reach its quota of requests and be rate limited, making the requests lazilly seems like a low-hanging fruit.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Contributor
|
I created a PR against this branch on your fork (aduh95#1) 🙂 |
Contributor
Author
|
/cc @nodejs/node-core-utils |
targos
approved these changes
May 21, 2024
aduh95
added a commit
to aduh95/node-core-utils
that referenced
this pull request
Mar 27, 2025
This reverts commit 6cc2b1a.
aduh95
added a commit
to aduh95/node-core-utils
that referenced
this pull request
Mar 28, 2025
This reverts commit 6cc2b1a.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When commits were pushed to a PR since the last approving review, check if the last time a
request-cilabel was added, it was done by a Collaborator and after the last push event on the PR.I don't really like the fact
"request-ci"is hard-coded, and also it might make sense to enable this check only in the GHA workflow (as the code doesn't search for'unlabeled'events, so if someone adds the label and removes it, it would still still count), so if you have suggestions regarding that, I'd be interested.Fixes: #801