Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Refactor Dependabot check expression into constant
  • Loading branch information
mbg committed Sep 10, 2026
commit 546c45705d75cdbe46ad3fe8f9a22e4764a92018
11 changes: 9 additions & 2 deletions pr-checks/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,13 @@ function getSetupSteps(checkSpecification: JobSpecification): {
return { inputs: unionAll(inputs), steps };
}

/**
* Condition used to prevent jobs from running for Dependabot PRs
* to avoid unnecessary runs if the "Rebuild" workflow ends up
* changing the JavaScript bundles.
*/
const dependabotCheck = "github.triggering_actor != 'dependabot[bot]'";

/**
* Generates an Actions job from the `checkSpecification`.
*
Expand Down Expand Up @@ -572,7 +579,7 @@ function generateJob(
},
},
name: checkSpecification.name,
if: "github.triggering_actor != 'dependabot[bot]'",
if: dependabotCheck,
permissions: {
contents: "read",
"security-events": "read",
Expand Down Expand Up @@ -622,7 +629,7 @@ function generateValidationJob(

const validationJob: Record<string, any> = {
name: jobSpecification.name,
if: "github.triggering_actor != 'dependabot[bot]'",
if: dependabotCheck,
needs: [checkName],
permissions: {
contents: "read",
Expand Down