Files
SwiftFormat/.github/workflows/validate_pr.yml
2026-03-03 08:09:28 -08:00

26 lines
659 B
YAML

name: "validate"
on:
pull_request:
types: [opened, edited, synchronize, reopened]
jobs:
check-pr-base:
name: "Pull request base is 'develop'"
runs-on: ubuntu-latest
steps:
- name: Fail if PR base is not 'develop'
if: github.event.pull_request.base.ref != 'develop'
run: |
echo "❌ Pull request must target the 'develop' branch. Current base: '${{ github.event.pull_request.base.ref }}'"
exit 1
lint:
name: "Lint"
runs-on: macos-15
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Lint
run: CommandLineTool/swiftformat . --cache ignore --lint