Skip to content

Commit 5c91c07

Browse files
committed
address PR comments
1 parent 6b76235 commit 5c91c07

File tree

6 files changed

+8
-81
lines changed

6 files changed

+8
-81
lines changed

.github/actions/setup-pnpm/action.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ inputs:
77
required: false
88
default: 'true'
99

10-
frozen-lockfile:
11-
description: 'Use frozen lockfile for install (default: true)'
12-
required: false
13-
default: 'true'
14-
1510
runs:
1611
using: 'composite'
1712
steps:
@@ -27,9 +22,4 @@ runs:
2722
- name: Install dependencies
2823
if: inputs.install == 'true'
2924
shell: bash
30-
run: |
31-
if [ "${{ inputs.frozen-lockfile }}" == "true" ]; then
32-
pnpm install --frozen-lockfile --prefer-offline
33-
else
34-
pnpm install --prefer-offline
35-
fi
25+
run: pnpm install --frozen-lockfile --prefer-offline

.github/workflows/auto-merge.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,6 @@ jobs:
2020
app-id: ${{ secrets.AUTOMERGE_APP_ID }}
2121
private-key: ${{ secrets.AUTOMERGE_PRIVATE_KEY }}
2222

23-
# Security: Checkout PR code to review before auto-merging
24-
# This ensures we're working with the actual PR content
25-
- name: Checkout PR
26-
uses: actions/checkout@v6
27-
with:
28-
ref: ${{ github.event.pull_request.head.sha }}
29-
fetch-depth: 1
30-
3123
- name: Check Dependabot metadata
3224
if: github.actor == 'dependabot[bot]'
3325
id: metadata

.github/workflows/changelog-updater.yml

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -22,39 +22,18 @@ jobs:
2222
with:
2323
install: 'false' # Don't need dependencies for this script
2424

25-
# Process commits and generate changelog with proper error handling
25+
# Process commits and generate changelog
2626
- name: Update changelog from commits
27-
id: changelog
2827
env:
2928
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3029
GITHUB_REPOSITORY: ${{ github.repository }}
3130
COMMIT_SHAS: ${{ join(github.event.commits.*.id, ' ') }}
3231
run: |
3332
set -e
34-
35-
# Generate new changelog
36-
if node build/update-changelog.js $COMMIT_SHAS > docs/CHANGELOG.md.new; then
37-
# Only update if the script succeeded
38-
mv docs/CHANGELOG.md.new docs/CHANGELOG.md
39-
echo "updated=true" >> $GITHUB_OUTPUT
40-
else
41-
echo "::error::Failed to update changelog"
42-
rm -f docs/CHANGELOG.md.new
43-
echo "updated=false" >> $GITHUB_OUTPUT
44-
exit 1
45-
fi
46-
47-
- name: Check for actual changes
48-
id: check-changes
49-
run: |
50-
if git diff --quiet docs/CHANGELOG.md; then
51-
echo "changed=false" >> $GITHUB_OUTPUT
52-
else
53-
echo "changed=true" >> $GITHUB_OUTPUT
54-
fi
33+
node build/update-changelog.js $COMMIT_SHAS > docs/CHANGELOG.md.new
34+
mv docs/CHANGELOG.md.new docs/CHANGELOG.md
5535
5636
- name: Commit files
57-
if: steps.check-changes.outputs.changed == 'true'
5837
uses: stefanzweifel/git-auto-commit-action@v7
5938
with:
6039
commit_message: Apply changelog updates

.github/workflows/i18n-bot-download.yml

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,29 +34,11 @@ jobs:
3434
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
3535
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3636

37-
# Sort all locale files with proper error handling
3837
- name: Sort locale JSON files
3938
run: |
40-
set -e # Exit immediately if a command fails
41-
4239
allLocales=("en" "de" "es" "esMX" "fr" "it" "ja" "ko" "pl" "ptBR" "ru" "zhCHS" "zhCHT")
43-
44-
for lang in "${allLocales[@]}"; do
45-
file="src/locale/$lang.json"
46-
if [ -f "$file" ]; then
47-
echo "Sorting $file..."
48-
# Use atomic operations with temp file
49-
if jq -S . "$file" > "$file.tmp"; then
50-
mv "$file.tmp" "$file"
51-
echo "✅ Sorted $file"
52-
else
53-
echo "::error::Failed to sort $file"
54-
rm -f "$file.tmp"
55-
exit 1
56-
fi
57-
else
58-
echo "::warning::File $file not found, skipping"
59-
fi
40+
for lang in ${allLocales[@]}; do
41+
jq -S . src/locale/$lang.json > src/locale/sorted_$lang.json && mv src/locale/sorted_$lang.json src/locale/$lang.json
6042
done
6143
6244
- name: Build browsercheck utils

.github/workflows/i18n-bot-upload.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ jobs:
1717
uses: actions/checkout@v6
1818

1919
- name: Sort en.json
20-
run: |
21-
sorted=$(jq -S . src/locale/en.json)
22-
echo "$sorted" > src/locale/en.json
20+
run: dimJSON="$(jq -S . src/locale/en.json)" && echo "${dimJSON}" > src/locale/en.json
2321

2422
- name: Upload en.json to Crowdin
2523
uses: crowdin/[email protected]

.github/workflows/pr-validation.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -206,18 +206,4 @@ jobs:
206206
if: ${{ github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }}
207207
id: deploy-url
208208
run: |
209-
echo "url=https://pr.dim.gg/${{ github.event.number }}/" >> $GITHUB_OUTPUT
210-
211-
validation-complete:
212-
needs: [test, lint, build]
213-
runs-on: ubuntu-latest
214-
timeout-minutes: 5
215-
if: always()
216-
steps:
217-
- name: Check validation results
218-
run: |
219-
if [[ "${{ needs.test.result }}" == "failure" ]] || [[ "${{ needs.lint.result }}" == "failure" ]] || [[ "${{ needs.build.result }}" == "failure" ]]; then
220-
echo "::error::PR validation failed"
221-
exit 1
222-
fi
223-
echo "::notice::✅ All PR validations passed successfully!"
209+
echo "url=https://pr.dim.gg/${{ github.event.number }}/" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)