Skip to content

Fix Claude rate-limit handling for mixed account states (#103) #360

Fix Claude rate-limit handling for mixed account states (#103)

Fix Claude rate-limit handling for mixed account states (#103) #360

Workflow file for this run

name: Lint
on:
push:
paths:
- '**.swift'
- '.github/workflows/lint.yml'
- '.swiftlint.yml'
pull_request:
paths:
- '**.swift'
- '.github/workflows/lint.yml'
- '.swiftlint.yml'
workflow_dispatch:
jobs:
swiftlint:
name: SwiftLint
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install SwiftLint
run: brew install swiftlint
- name: Run SwiftLint on Changed Files
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
CHANGED_FILES=$(gh pr view ${{ github.event.pull_request.number }} --json files --jq '.files[].path | select(endswith(".swift"))' | tr '\n' ' ')
if [ -n "$CHANGED_FILES" ]; then
echo "Linting changed files: $CHANGED_FILES"
# shellcheck disable=SC2086
swiftlint lint --strict --reporter github-actions-logging $CHANGED_FILES
else
echo "No Swift files changed"
fi
else
echo "Linting all files in CopilotMonitor/CopilotMonitor"
swiftlint lint --reporter github-actions-logging CopilotMonitor/CopilotMonitor
fi
env:
GH_TOKEN: ${{ github.token }}
actionlint:
name: GitHub Actions Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install actionlint
run: |
curl -sL https://github.com/rhysd/actionlint/releases/download/v1.7.7/actionlint_1.7.7_linux_amd64.tar.gz | tar xzv -C /tmp
sudo mv /tmp/actionlint /usr/local/bin/
- name: Run actionlint
run: actionlint -color