Skip to content

Commit c145a27

Browse files
ci: support VRT snapshots and fix 403/ambiguous workflow errors
- Added strategy to `.github/conflict-resolver.yml` to automatically resolve Playwright snapshots (`**/*.spec.ts-snapshots/*.png`) using 'theirs'. - Updated `.github/workflows/conflict-resolver.yml` with: - Token fallback sequence `PAT_TOKEN || ARI_PAT || GITHUB_TOKEN` to resolve 403 Forbidden errors when pushing to protected branches. - Switched `gh workflow run` to use `pr-orchestrator.yml` filename instead of workflow name to avoid 'could not resolve to unique workflow' errors. Co-authored-by: arii <342438+arii@users.noreply.github.com>
1 parent 4090c4b commit c145a27

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

.github/conflict-resolver.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,7 @@ rules:
1616
strategy: 'ours'
1717
- paths: '*.generated.js'
1818
strategy: 'ours'
19+
20+
# For Playwright VRT snapshots, prefer the incoming version from the feature branch
21+
- paths: '**/*.spec.ts-snapshots/*.png'
22+
strategy: 'theirs'

.github/workflows/conflict-resolver.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
with:
5858
ref: ${{ env.SOURCE }}
5959
fetch-depth: 0
60-
token: ${{ secrets.ARI_PAT || secrets.GITHUB_TOKEN }}
60+
token: ${{ secrets.PAT_TOKEN || secrets.ARI_PAT || secrets.GITHUB_TOKEN }}
6161

6262
- name: Validate branches
6363
id: validate_branches
@@ -118,11 +118,11 @@ jobs:
118118
- name: Trigger Gemini Orchestrator
119119
if: steps.validate_branches.outputs.skipped != 'true' && steps.resolve.outputs.unresolved-files == '' && env.PR_NUMBER && env.PR_NUMBER != '0'
120120
env:
121-
GH_TOKEN: ${{ secrets.ARI_PAT || secrets.GITHUB_TOKEN }}
121+
GH_TOKEN: ${{ secrets.PAT_TOKEN || secrets.ARI_PAT || secrets.GITHUB_TOKEN }}
122122
HEAD_SHA: ${{ steps.commit_push.outputs.resolved_sha }}
123123
BASE_SHA: ${{ steps.validate_branches.outputs.base_sha }}
124124
run: |
125-
gh workflow run "Gemini Orchestrator" --ref "$SOURCE" -f pr_number="$PR_NUMBER" -f base_ref="$BASE_SHA" -f head_ref="$HEAD_SHA" -f base_branch="$TARGET"
125+
gh workflow run "pr-orchestrator.yml" --ref "$SOURCE" -f pr_number="$PR_NUMBER" -f base_ref="$BASE_SHA" -f head_ref="$HEAD_SHA" -f base_branch="$TARGET"
126126
127127
- name: Update comment on success
128128
if: steps.validate_branches.outputs.skipped != 'true' && success() && steps.resolve.outputs.unresolved-files == '' && env.PR_NUMBER && env.PR_NUMBER != '0'

0 commit comments

Comments
 (0)