Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

Commit 5f62d44

Browse files
chore: update auto-release script to handle undefined (#124)
1 parent 942f0a4 commit 5f62d44

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

.github/workflows/auto-release.yaml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ jobs:
2828
context.payload.pull_request.body.includes("BREAKING CHANGES") ||
2929
context.payload.pull_request.body.includes("Features")
3030
) {
31-
console.log( "Not autoreleasing (not a dependency-update-only release). " );
3231
return;
3332
}
3433
@@ -39,18 +38,14 @@ jobs:
3938
state: 'open'
4039
});
4140
42-
if (result === null || result === 'undefined' || result.length === 0) {
43-
console.log( "No open pull requests in this repo" );
44-
return;
45-
}
46-
4741
const pulls = await github.paginate(result);
4842
4943
// return if there are open depedency update PRs
50-
for (const pull of pulls) {
51-
if (pull.title.startsWith("deps: update dependency ")) {
52-
console.log( "No open dependency update pull requests in this repo" );
53-
return;
44+
if ( pulls !== 'undefined' ) {
45+
for (const pull of pulls) {
46+
if (pull.title.startsWith("deps: update dependency ")) {
47+
return;
48+
}
5449
}
5550
}
5651

0 commit comments

Comments
 (0)