Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 0 additions & 2 deletions .github/workflows/pr-auto-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/pr-auto-milestone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/pr-auto-semver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/pr-content.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)(\\([^()]+\\))?): .+$`
Expand All @@ -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) {
Expand Down Expand Up @@ -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)(\\([^()]+\\))?): .+$`
Expand Down