Skip to content
Draft
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
49 changes: 39 additions & 10 deletions .github/workflows/automated-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,52 @@
#
# When the `automated-translations` branch is merged and deleted, this workflow recreates the branch.

name: Automated Translations 12.x.x
name: Automated Translations
on:
push:
branches:
- 12.x.x
- '[0-9]+.x.x'
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

Do GitHub Actions on.push.branchesfilters use glob patterns or regular expressions, and would the pattern[0-9]+.x.xmatch a branch named12.x.x?

💡 Result:

GitHub Actions on.push.branches filters use glob patterns, not regular expressions. The pattern [0-9]+.x.x would NOT match the branch named 12.x.x. In GitHub Actions glob patterns (powered by @actions/glob using minimatch): - [] matches exactly ONE character from the specified set or range (e.g., [0-9] matches a single digit 0-9). - + is a literal character, not a quantifier (unlike regex where + means "one or more"). It does not repeat the preceding element. - Therefore, [0-9]+ matches exactly one digit (0-9) followed by a literal + character. For 12.x.x: - Position 1: 1 (matches [0-9]) - Position 2: 2 (does NOT match literal +) - No match.

Citations:


🏁 Script executed:

# Verify the actual content at line 15 of the workflow file
if [ -f ".github/workflows/automated-translations.yml" ]; then
  echo "=== File content around line 15 ==="
  sed -n '10,20p' .github/workflows/automated-translations.yml | cat -n
else
  echo "File not found"
fi

Repository: blackbaud/skyux

Length of output: 324


Use a glob pattern instead of a regex pattern for the branch filter.

on.push.branches uses GitHub's glob matcher (minimatch), so [0-9]+.x.x will not match multi-digit release branches like 12.x.x. In glob patterns, [0-9] matches a single digit and + is treated as a literal character, not a quantifier. This pattern prevents LTS pushes from triggering the workflow.

Change to [0-9]*.x.x to match any number of digits.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/automated-translations.yml at line 15, The branch filter
pattern '[0-9]+.x.x' in the GitHub Actions workflow's on.push.branches is using
regex semantics but GitHub Actions uses glob/minimatch, so it won't match
multi-digit release branches (e.g., 12.x.x); update the branch filter to use a
glob pattern like '[0-9]*.x.x' in the workflow file so multiple-digit version
branches trigger the workflow (edit the branches entry where '[0-9]+.x.x'
appears).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not accurate. The change is valid.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johnhwhite, you're correct — I apologize for the inaccurate review comment.

The branches and branches-ignore keywords accept glob patterns that use characters like *, **, +, ?, ! and others to match more than one branch name. In GitHub Actions' extended glob syntax, + is a special character (not a literal), so [0-9]+ means "one or more digits" — making [0-9]+.x.x a valid pattern that correctly matches multi-digit version branches like 12.x.x. The change is indeed valid.


✏️ Learnings added
Learnt from: johnhwhite
Repo: blackbaud/skyux PR: 4381
File: .github/workflows/automated-translations.yml:15-15
Timestamp: 2026-04-17T11:19:33.262Z
Learning: In GitHub Actions `on.push.branches` (and similar) filter patterns, `+` is a special character meaning "one or more of the preceding element" (extended glob semantics), not a literal character. For example, `[0-9]+.x.x` correctly matches multi-digit version branch names like `12.x.x`. This is confirmed by the GitHub Actions documentation which lists `+` as a special glob character in branch filter patterns.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

- automated-translations
workflow_dispatch:
env:
LTS_BRANCH: '12.x.x'

jobs:
determine-lts:
name: Determine LTS branch
runs-on: ubuntu-slim
outputs:
lts-branch: ${{ steps.find-lts.outputs.branch }}
should-sync: ${{ steps.find-lts.outputs.should-sync }}
steps:
- name: Find highest LTS branch
id: find-lts
env:
GH_TOKEN: ${{ github.token }}
run: |
LTS_BRANCH=$(gh api "repos/${{ github.repository }}/branches" --paginate --jq '.[].name' | grep -E '^[0-9]+\.x\.x$' | sort -t. -k1 -n -r | head -1)
if [[ -z "$LTS_BRANCH" ]]; then
echo "::error::No LTS branch found matching [0-9]+.x.x"
exit 1
fi
echo "branch=$LTS_BRANCH" >> "$GITHUB_OUTPUT"
echo "Highest LTS branch: $LTS_BRANCH"

if [[ "${{ github.event_name }}" == "push" && "${{ github.ref_name }}" =~ ^[0-9]+\.x\.x$ && "${{ github.ref_name }}" != "$LTS_BRANCH" ]]; then
echo "should-sync=false" >> "$GITHUB_OUTPUT"
echo "::notice::Push to ${{ github.ref_name }} skipped — not the highest LTS branch ($LTS_BRANCH)"
else
echo "should-sync=true" >> "$GITHUB_OUTPUT"
fi

automated-translations:
name: Sync translations
needs: determine-lts
if: needs.determine-lts.outputs.should-sync == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
token: '${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}'
- uses: actions/setup-node@v5
- uses: actions/setup-node@v6
id: setup-node
with:
node-version-file: '.nvmrc'
Expand All @@ -35,15 +64,15 @@ jobs:
id: sync
run: |
./scripts/automated-translations.ps1 \
-LtsBranchName $LTS_BRANCH \
-LtsBranchName "${{ needs.determine-lts.outputs.lts-branch }}" \
-TempPath ${{ runner.temp }}
env:
GH_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
GH_PROMPT_DISABLED: 1

- name: Notify Slack when a PR is created
if: ${{ steps.sync.outputs.prCreated == 'true' && steps.sync.outputs.prTitle && steps.sync.outputs.prUrl }}
uses: rtCamp/action-slack-notify@07cbdbfd6c6190970778d8f98f11d073b2932aae # v2.3.3
uses: rtCamp/action-slack-notify@c58b60ee33df2229ed2d2eed86eeaf7e6c527c5a # https://github.com/rtCamp/action-slack-notify/pull/243
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_TITLE: ':writing_hand: `automated-translations` PR created: ${{ steps.sync.outputs.prTitle }}'
Expand All @@ -58,7 +87,7 @@ jobs:

- name: Notify Slack when a PR is updated
if: ${{ steps.sync.outputs.prCreated == 'false' && steps.sync.outputs.prTitle && steps.sync.outputs.prUrl }}
uses: rtCamp/action-slack-notify@07cbdbfd6c6190970778d8f98f11d073b2932aae # v2.3.3
uses: rtCamp/action-slack-notify@c58b60ee33df2229ed2d2eed86eeaf7e6c527c5a # https://github.com/rtCamp/action-slack-notify/pull/243
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_TITLE: ':writing_hand: `automated-translations` PR updated: ${{ steps.sync.outputs.prTitle }}'
Expand All @@ -73,7 +102,7 @@ jobs:

- name: Notify Slack for fails
if: ${{ failure() || steps.sync.outputs.success != 'true' }}
uses: rtCamp/action-slack-notify@07cbdbfd6c6190970778d8f98f11d073b2932aae # v2.3.3
uses: rtCamp/action-slack-notify@c58b60ee33df2229ed2d2eed86eeaf7e6c527c5a # https://github.com/rtCamp/action-slack-notify/pull/243
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_TITLE: ':writing_hand: :x: `automated-translations` sync failed'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cherry-pick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
ref: ${{ env.TARGET_BRANCH }}
fetch-depth: 0
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
- uses: actions/setup-node@v5
- uses: actions/setup-node@v6
id: setup-node
with:
cache: 'npm'
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:

- name: Notify Slack when cherry-pick fails
if: ${{ env.CHERRY_PICK_RESULT != 'success' }}
uses: rtCamp/action-slack-notify@07cbdbfd6c6190970778d8f98f11d073b2932aae # v2.3.3
uses: rtCamp/action-slack-notify@c58b60ee33df2229ed2d2eed86eeaf7e6c527c5a # https://github.com/rtCamp/action-slack-notify/pull/243
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_TITLE: ':cherries: :x: Cherry-pick failed for “${{ github.event.pull_request.title }} (#${{ github.event.pull_request.number}})”'
Expand Down
28 changes: 13 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: CI

on:
merge_group:
types: [checks_requested]
pull_request:
push:
branches:
Expand All @@ -26,11 +24,11 @@ jobs:
outputs:
node-version: ${{ steps.setup-node.outputs.node-version }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
# We need to fetch all branches and commits so that Nx affected has a base to compare against.
fetch-depth: 0
- uses: actions/setup-node@v5
- uses: actions/setup-node@v6
id: setup-node
with:
cache: 'npm'
Expand All @@ -51,8 +49,8 @@ jobs:
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
id: setup-node
with:
cache: 'npm'
Expand All @@ -75,10 +73,10 @@ jobs:
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-node@v5
- uses: actions/setup-node@v6
with:
cache: 'npm'
node-version-file: '.nvmrc'
Expand Down Expand Up @@ -142,11 +140,11 @@ jobs:
needs: install-deps
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
# We need to fetch all branches and commits so that Nx affected has a base to compare against.
fetch-depth: 0
- uses: actions/setup-node@v5
- uses: actions/setup-node@v6
with:
cache: 'npm'
node-version-file: '.nvmrc'
Expand Down Expand Up @@ -178,11 +176,11 @@ jobs:
needs: install-deps
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
# We need to fetch all branches and commits so that Nx affected has a base to compare against.
fetch-depth: 0
- uses: actions/setup-node@v5
- uses: actions/setup-node@v6
with:
cache: 'npm'
node-version-file: '.nvmrc'
Expand All @@ -203,8 +201,8 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
cache: 'npm'
node-version-file: '.nvmrc'
Expand All @@ -216,7 +214,7 @@ jobs:
run: npx skyux-dev create-packages-dist --skipNxCache
- name: Notify Slack (failure)
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@07cbdbfd6c6190970778d8f98f11d073b2932aae # v2.3.3
uses: rtCamp/action-slack-notify@c58b60ee33df2229ed2d2eed86eeaf7e6c527c5a # https://github.com/rtCamp/action-slack-notify/pull/243
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_COLOR: ${{ job.status }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout blackbaud/skyux-pr-preview
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
repository: blackbaud/skyux-pr-preview
ref: 'main'
Expand Down
Loading
Loading