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

Commit

Permalink
chore: update auto-release script to handle undefined (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephaniewang526 committed Sep 1, 2020
1 parent 942f0a4 commit 5f62d44
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/auto-release.yaml
Expand Up @@ -28,7 +28,6 @@ jobs:
context.payload.pull_request.body.includes("BREAKING CHANGES") ||
context.payload.pull_request.body.includes("Features")
) {
console.log( "Not autoreleasing (not a dependency-update-only release). " );
return;
}
Expand All @@ -39,18 +38,14 @@ jobs:
state: 'open'
});
if (result === null || result === 'undefined' || result.length === 0) {
console.log( "No open pull requests in this repo" );
return;
}
const pulls = await github.paginate(result);
// return if there are open depedency update PRs
for (const pull of pulls) {
if (pull.title.startsWith("deps: update dependency ")) {
console.log( "No open dependency update pull requests in this repo" );
return;
if ( pulls !== 'undefined' ) {
for (const pull of pulls) {
if (pull.title.startsWith("deps: update dependency ")) {
return;
}
}
}
Expand Down

0 comments on commit 5f62d44

Please sign in to comment.