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: 1 addition & 1 deletion .github/workflows/pr-review-mention.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
pr-review-mention:
permissions:
pull-requests: write
uses: petry-projects/.github/.github/workflows/pr-review-mention-reusable.yml@pr-review-mention/stable # NOSONAR(githubactions:S7637) first-party channel ref
uses: petry-projects/.github/.github/workflows/pr-review-mention-reusable.yml@pr-review-mention/v2-stable # NOSONAR(githubactions:S7637) first-party channel ref
secrets:
GH_PAT_WORKFLOWS: ${{ secrets.GH_PAT_DON_PETRY || secrets.GH_PAT_WORKFLOWS }}
DON_PETRY_BOT_GH_PAT: ${{ secrets.DON_PETRY_BOT_GH_PAT }}
10 changes: 7 additions & 3 deletions scripts/tests/pr-review-mention-workflow.bats
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,19 @@ print('ok')
[[ "$output" == "ok" ]]
}

@test "pr-review-mention still delegates to the org reusable at the stable channel" {
@test "pr-review-mention still delegates to the org reusable at the v2-stable channel" {
# Must pin the major-scoped channel @pr-review-mention/v2-stable, not the bare
# tier @pr-review-mention/stable. The org standard (ci-standards.md →
# centralization tiers) treats a bare tier pin as drift; the canonical stub
# delegates to ...@pr-review-mention/v<M>-stable (#401).
run python3 -c "
import sys, yaml
wf = yaml.safe_load(open(sys.argv[1])) or {}
jobs = wf.get('jobs') or {}
job = jobs.get('pr-review-mention') or {}
uses = job.get('uses', '')
expected = 'petry-projects/.github/.github/workflows/pr-review-mention-reusable.yml@pr-review-mention/stable'
assert uses == expected, f'job must call the org reusable at the stable channel, got: {uses!r}'
expected = 'petry-projects/.github/.github/workflows/pr-review-mention-reusable.yml@pr-review-mention/v2-stable'
assert uses == expected, f'job must call the org reusable at the v2-stable channel, got: {uses!r}'
print('ok')
" "$WORKFLOW"
[ "$status" -eq 0 ]
Expand Down
Loading