Skip to content

Commit dea1c80

Browse files
Copilotpelikhan
andauthored
fix: use Array.isArray guard for safer prs check
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
1 parent 1af72f2 commit dea1c80

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

actions/setup/js/merge_pull_request.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ async function getOpenPullRequestForBranch(githubClient, owner, repo, branch) {
159159
per_page: 1,
160160
})
161161
);
162-
if (!prs || prs.length === 0) {
162+
if (!Array.isArray(prs) || prs.length === 0) {
163163
core.info(`No open pull request found for head branch "${branch}"`);
164164
return null;
165165
}

0 commit comments

Comments
 (0)