fix(ci): evaluate all Dependabot pull requests

This commit is contained in:
xixu-me committed 2026-08-14 18:15:00 +08:00
1 parent 1a68a20b1f
commit b576042581
1 file changed
+1 -19
+1 -19
View File
@@ -23,7 +23,7 @@ permissions:
jobs: jobs:
merge: merge:
name: Auto-merge Dependabot PRs name: Auto-merge Dependabot PRs
if: github.event_name == 'workflow_dispatch' || (github.event.workflow_run.conclusion == 'success' && startsWith(github.event.workflow_run.head_branch, 'dependabot/')) if: github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 10 timeout-minutes: 10
steps: steps:
@@ -53,24 +53,6 @@ jobs:
}; };
const findCandidatePulls = async () => { const findCandidatePulls = async () => {
const branch = context.payload.workflow_run?.head_branch;
if (context.eventName === "workflow_run") {
if (!String(branch || "").startsWith("dependabot/")) {
core.info("Workflow run was for " + (branch || "an unknown branch") + "; skipping non-Dependabot branch.");
return [];
}
const { data: pulls } = await github.rest.pulls.list({
owner,
repo,
state: "open",
head: owner + ":" + branch,
per_page: 10,
});
return pulls.filter((pr) => pr.user?.login === "dependabot[bot]");
}
const pulls = await github.paginate(github.rest.pulls.list, { const pulls = await github.paginate(github.rest.pulls.list, {
owner, owner,
repo, repo,