From 3ff0e57982a7301a6430064cbd092a19b84c8747 Mon Sep 17 00:00:00 2001 From: Marcel Clausen Date: Thu, 17 Sep 2026 08:21:46 +0200 Subject: [PATCH] fix: stop required checks staying pending for dependabot PRs Skipping the pr-content.yml caller job with an if condition prevented the reusable workflow from ever starting, so its required child checks (Validate PR title, Validate PR description, Validate commit messages) never reported a status and stayed pending indefinitely on Dependabot PRs. The dependabot skip is now applied inside each job of pr-content.yml instead, so the jobs still run and report a completed (skipped) status, and the caller workflows no longer skip the content job itself. --- .github/workflows/pr-auto-infra.yml | 2 -- .github/workflows/pr-auto-milestone.yml | 3 +-- .github/workflows/pr-auto-semver.yml | 3 +-- .github/workflows/pr-content.yml | 16 ++++++++++++++++ 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr-auto-infra.yml b/.github/workflows/pr-auto-infra.yml index 052cf7d..9425cc0 100644 --- a/.github/workflows/pr-auto-infra.yml +++ b/.github/workflows/pr-auto-infra.yml @@ -33,8 +33,6 @@ on: jobs: content: - # Skip dependency-update automation branches, same as the milestone and semver workflows. - if: ${{ !startsWith(github.head_ref, 'dependabot/') }} uses: ./.github/workflows/pr-content.yml labels: diff --git a/.github/workflows/pr-auto-milestone.yml b/.github/workflows/pr-auto-milestone.yml index 225b4aa..30b7ac3 100644 --- a/.github/workflows/pr-auto-milestone.yml +++ b/.github/workflows/pr-auto-milestone.yml @@ -132,8 +132,7 @@ jobs: content: # Do not validate PR content for release PR (develop -> master or develop-* -> master) - # and avoid dependency bot PRs, which follow automation-generated branch naming. - if: ${{ !((github.head_ref == 'develop' || startsWith(github.head_ref, 'develop-')) && github.base_ref == 'master') && !startsWith(github.head_ref, 'dependabot/') }} + if: ${{ !((github.head_ref == 'develop' || startsWith(github.head_ref, 'develop-')) && github.base_ref == 'master') }} uses: ./.github/workflows/pr-content.yml labels: diff --git a/.github/workflows/pr-auto-semver.yml b/.github/workflows/pr-auto-semver.yml index d814c7f..f0b9acf 100644 --- a/.github/workflows/pr-auto-semver.yml +++ b/.github/workflows/pr-auto-semver.yml @@ -145,8 +145,7 @@ jobs: content: # Do not validate PR content for release PR (develop -> master) - # and skip dependency-update automation branches. - if: ${{ !(github.head_ref == 'develop' && github.base_ref == 'master') && !startsWith(github.head_ref, 'dependabot/') }} + if: ${{ !(github.head_ref == 'develop' && github.base_ref == 'master') }} uses: ./.github/workflows/pr-content.yml labels: diff --git a/.github/workflows/pr-content.yml b/.github/workflows/pr-content.yml index 34d8caa..9fe538b 100644 --- a/.github/workflows/pr-content.yml +++ b/.github/workflows/pr-content.yml @@ -48,6 +48,12 @@ jobs: // ❌ GPS-123: Add feature X (wip) const title = context.payload.pull_request.title; + + if (context.payload.pull_request.head.ref.startsWith('dependabot/')) { + core.notice(`Skipping PR title validation for Dependabot PR "${title}"`); + return; + } + const jiraProjectKeys = JSON.parse(process.env.JIRA_PROJECT_KEYS); const titlePattern = new RegExp( `^(((${jiraProjectKeys.join("|")})-\\d+)+|(chore|fix|feat|revert|docs)(\\([^()]+\\))?): .+$` @@ -73,6 +79,11 @@ jobs: uses: actions/github-script@v9 with: script: | + if (context.payload.pull_request.head.ref.startsWith('dependabot/')) { + core.notice('Skipping PR description check for Dependabot PR'); + return; + } + const body = (context.payload.pull_request.body || "").trim(); if (body.length === 0) { @@ -103,6 +114,11 @@ jobs: return; } + if (context.payload.pull_request.head.ref.startsWith('dependabot/')) { + core.notice('Skipping commit message check for Dependabot PR'); + return; + } + const jiraProjectKeys = JSON.parse(process.env.JIRA_PROJECT_KEYS); const titlePattern = new RegExp( `^(((${jiraProjectKeys.join("|")})-\\d+)+|(chore|fix|feat|revert|docs)(\\([^()]+\\))?): .+$`