Skip to content

Commit

Permalink
Update update-prs.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mfranzke authored Sep 16, 2024
1 parent 1005d22 commit f7bd793
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/scripts/update-prs.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ const updatePrs = async ({ github, context }) => {
per_page: 100
});

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

if (nonDraftPulls?.length > 0) {
for (const pr of nonDraftPulls) {
if (nonDraftAndDependabotPulls?.length > 0) {
for (const pr of nonDraftAndDependabotPulls) {
try {
await github.rest.pulls.updateBranch({
owner,
Expand All @@ -28,7 +28,7 @@ const updatePrs = async ({ github, context }) => {
}
}

return `Updated branches: ${updatedBranches}/${nonDraftPulls.length}`;
return `Updated branches: ${updatedBranches}/${nonDraftAndDependabotPulls.length}`;
};

export default updatePrs;

0 comments on commit f7bd793

Please sign in to comment.