Skip to content

Commit f7bd793

Browse files
authored
Update update-prs.js
1 parent 1005d22 commit f7bd793

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/scripts/update-prs.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ const updatePrs = async ({ github, context }) => {
1010
per_page: 100
1111
});
1212

13-
const nonDraftPulls = pulls?.data?.filter((pr) => !pr.draft && pr.user.login !== "dependabot[bot]");
13+
const nonDraftAndDependabotPulls = pulls?.data?.filter((pr) => !pr.draft && pr.user.login !== "dependabot[bot]");
1414
let updatedBranches = 0;
1515

16-
if (nonDraftPulls?.length > 0) {
17-
for (const pr of nonDraftPulls) {
16+
if (nonDraftAndDependabotPulls?.length > 0) {
17+
for (const pr of nonDraftAndDependabotPulls) {
1818
try {
1919
await github.rest.pulls.updateBranch({
2020
owner,
@@ -28,7 +28,7 @@ const updatePrs = async ({ github, context }) => {
2828
}
2929
}
3030

31-
return `Updated branches: ${updatedBranches}/${nonDraftPulls.length}`;
31+
return `Updated branches: ${updatedBranches}/${nonDraftAndDependabotPulls.length}`;
3232
};
3333

3434
export default updatePrs;

0 commit comments

Comments
 (0)