-
Notifications
You must be signed in to change notification settings - Fork 114
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
fix(git-node): ignore all non-gha nodes when checking for GitHub CI #857
Conversation
@@ -374,9 +373,10 @@ export default class PRChecker { | |||
|
|||
// GitHub new Check API | |||
for (const { status, conclusion, app } of checkSuites.nodes) { | |||
if (app && IGNORED_CHECK_SLUGS.includes(app.slug)) { | |||
if (app.slug !== 'github-actions') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (app.slug !== 'github-actions') { | |
if (app && app.slug !== 'github-actions') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (app.slug !== 'github-actions') { | |
if (app?.slug !== 'github-actions') { |
a suggestion upon your suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is needed.
Co-authored-by: Aviv Keller <[email protected]>
Now I don't understand:
|
One way is to apply the following diff and run diff --git a/lib/pr_checker.js b/lib/pr_checker.js
index 064c647..129b9a5 100644
--- a/lib/pr_checker.js
+++ b/lib/pr_checker.js
@@ -381,6 +381,7 @@ export default class PRChecker {
}
if (status !== 'COMPLETED') {
+ console.log(checkSuites.nodes);
cli.error('GitHub CI is still running');
return false;
}
@@ -395,6 +396,7 @@ export default class PRChecker {
if (commit.status) {
const { state } = commit.status;
if (state === 'PENDING') {
+ console.log(checkSuites.nodes);
cli.error('GitHub CI is still running');
return false;
} |
Implements #838 (comment). The problem has come back now that we have a new
jenkins-node-js-ci
(see nodejs/admin#916), and IMO it only makes sense to check for GHA-related jobs only when checking the state of the GitHub CI.