-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ncu-ci): check for
request-ci
label (#806)
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. Co-authored-by: Mathis Wiehl <mail@mathiswiehl.de>
- Loading branch information
1 parent
9f8df53
commit 6cc2b1a
Showing
11 changed files
with
209 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
query PRLabeledEvents($prid: Int!, $owner: String!, $repo: String!, $after: String) { | ||
repository(owner: $owner, name: $repo) { | ||
pullRequest(number: $prid) { | ||
timelineItems(itemTypes: LABELED_EVENT, after: $after, last: 100) { | ||
nodes { | ||
... on LabeledEvent { | ||
actor { | ||
login | ||
} | ||
label { | ||
name | ||
} | ||
createdAt | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[ | ||
{ | ||
"actor": { "login": "nodejs-github-bot" }, | ||
"label": { "name": "doc" }, | ||
"createdAt": "2024-05-13T15:57:10Z" | ||
}, | ||
{ | ||
"actor": { "login": "nodejs-github-bot" }, | ||
"label": { "name": "test_runner" }, | ||
"createdAt": "2024-05-13T15:57:10Z" | ||
} | ||
] |
12 changes: 12 additions & 0 deletions
12
test/fixtures/labeled_events/old-request-ci-collaborator.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[ | ||
{ | ||
"actor": { "login": "nodejs-github-bot" }, | ||
"label": { "name": "doc" }, | ||
"createdAt": "2024-05-13T15:57:10Z" | ||
}, | ||
{ | ||
"actor": { "login": "foo" }, | ||
"label": { "name": "request-ci" }, | ||
"createdAt": "1999-10-24T11:13:43Z" | ||
} | ||
] |
12 changes: 12 additions & 0 deletions
12
test/fixtures/labeled_events/recent-request-ci-collaborator.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[ | ||
{ | ||
"actor": { "login": "nodejs-github-bot" }, | ||
"label": { "name": "doc" }, | ||
"createdAt": "2024-05-13T15:57:10Z" | ||
}, | ||
{ | ||
"actor": { "login": "foo" }, | ||
"label": { "name": "request-ci" }, | ||
"createdAt": "2024-05-13T15:57:10Z" | ||
} | ||
] |
12 changes: 12 additions & 0 deletions
12
test/fixtures/labeled_events/recent-request-ci-non-collaborator.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[ | ||
{ | ||
"actor": { "login": "nodejs-github-bot" }, | ||
"label": { "name": "doc" }, | ||
"createdAt": "2024-05-13T15:57:10Z" | ||
}, | ||
{ | ||
"actor": { "login": "random-person" }, | ||
"label": { "name": "request-ci" }, | ||
"createdAt": "2024-05-13T15:57:10Z" | ||
} | ||
] |
This file contains 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