Skip to content

Commit e7984d6

Browse files
committed
ci: fix hashFiles expressions & validate project sync workflow
1 parent 74b6e8f commit e7984d6

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,10 @@ jobs:
6969
folder-path: '.'
7070
swift-lint:
7171
runs-on: macos-14
72+
if: ${{ hashFiles('Package.swift') != '' }}
7273
steps:
7374
- uses: actions/checkout@v4
74-
- name: Skip if no Package.swift
75-
if: ${{ hashFiles('Package.swift') == '' }}
76-
run: echo 'No Package.swift present; skipping Swift lint job.' && exit 0
7775
- name: Install SwiftFormat (placeholder)
78-
if: ${{ hashFiles('Package.swift') != '' }}
7976
run: brew install swiftformat || true
8077
- name: Dry run format check
81-
if: ${{ hashFiles('Package.swift') != '' }}
8278
run: swiftformat . --lint || true

.github/workflows/project-sync.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212
contents: read
1313
issues: write
1414
pull-requests: read
15-
repository-projects: write
15+
projects: write
1616

1717
env:
1818
# Set these to match your environment.
@@ -179,7 +179,7 @@ jobs:
179179
run: |
180180
gh auth status || gh auth login --with-token <<<"${GITHUB_TOKEN}"
181181
LOGIN=${{ env.GITHUB_USER }}
182-
PROJECT_NUM=${{ env.PROJECT_NUMBER }}
182+
PROJECT_NUM=${{ env.PROJECT_NUMBER }}
183183
projectQuery='query($login:String!,$number:Int!){ user(login:$login){ projectV2(number:$number){ id fields(first:50){ nodes { __typename ... on ProjectV2SingleSelectField { id name options { id name } } } } items(first:200){ nodes { id content { __typename ... on Issue { number id state } } } } } } }'
184184
resp=$(gh api graphql -f query="$projectQuery" -F login="$LOGIN" -F number=$PROJECT_NUM)
185185
projectId=$(echo "$resp" | jq -r '.data.user.projectV2.id')

0 commit comments

Comments
 (0)