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
4 changes: 2 additions & 2 deletions .github/workflows/org-quality-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ permissions:
jobs:
quality-gate:
name: quality-gate
uses: agiletec-inc/github-actions/.github/workflows/quality-gate.yml@f6d083035f7501b3385790f95c9f344cab1038e3
uses: agiletec-inc/github-actions/.github/workflows/quality-gate.yml@7c4b4d724552e277559a094ddd4536f9592c6e8a
with:
source-ref: f6d083035f7501b3385790f95c9f344cab1038e3
source-ref: 7c4b4d724552e277559a094ddd4536f9592c6e8a
linux-runs-on: ${{ github.event.repository.private && 'org-shared-ci-light' || 'ubuntu-latest' }}
swift-runs-on: macos-latest
2 changes: 1 addition & 1 deletion .github/workflows/quality-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ jobs:
GH_TOKEN: ${{ github.token }}
REPOSITORY: ${{ github.repository }}
REQUIRED_CONTEXTS: ${{ needs.detect.outputs.required_contexts }}
TARGET_SHA: ${{ github.sha }}
TARGET_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
run: |
set -uo pipefail
deadline=$((SECONDS + 900))
Expand Down
7 changes: 7 additions & 0 deletions tests/test_workflow_wiring.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ def test_native_gate_pending_status_is_captured_under_errexit(self) -> None:
source,
)

def test_native_gate_checks_pr_head_and_merge_group_sha(self) -> None:
source = QUALITY_GATE.read_text()
self.assertIn(
"TARGET_SHA: ${{ github.event.pull_request.head.sha || github.sha }}",
source,
)


if __name__ == "__main__":
unittest.main()