From fb5a978260589befdc358d883ed6eb449516191a Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Fri, 31 Oct 2025 15:09:46 +0200 Subject: [PATCH] fix(pr-lint): add token fallback, fix shellspec checksum (#326) --- _tests/run-tests.sh | 2 +- generate_listing.cjs | 2 +- package-lock.json | 1 + pr-lint/action.yml | 9 +++++++-- 4 files changed, 10 insertions(+), 4 deletions(-) mode change 100644 => 100755 generate_listing.cjs diff --git a/_tests/run-tests.sh b/_tests/run-tests.sh index dc60439..798a4d5 100755 --- a/_tests/run-tests.sh +++ b/_tests/run-tests.sh @@ -203,7 +203,7 @@ install_shellspec() { # Pinned SHA256 checksum for ShellSpec 0.28.1 # Source: https://github.com/shellspec/shellspec/archive/refs/tags/0.28.1.tar.gz - local checksum="351e7a63b8df47c07b022c19d21a167b85693f5eb549fa96e64f64844b680024" + local checksum="400d835466429a5fe6c77a62775a9173729d61dd43e05dfa893e8cf6cb511783" # Ensure cleanup of the downloaded file # Use ${tarball:-} to handle unbound variable when trap fires after function returns diff --git a/generate_listing.cjs b/generate_listing.cjs old mode 100644 new mode 100755 index ec03534..5a639f1 --- a/generate_listing.cjs +++ b/generate_listing.cjs @@ -430,4 +430,4 @@ function main() { } // Run the script -main(); \ No newline at end of file +main(); diff --git a/package-lock.json b/package-lock.json index b715814..029c684 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1079,6 +1079,7 @@ "integrity": "sha512-/4Osri9QFGCZOCTkfA8qJF+XGjKYERSHkXzxSyS1hd3ZERJGjvsUao2h4wdnvpHp6Tu2Jh/bPHM0FE9JJza6ng==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "globby": "14.1.0", "js-yaml": "4.1.0", diff --git a/pr-lint/action.yml b/pr-lint/action.yml index 3ca1072..1855845 100644 --- a/pr-lint/action.yml +++ b/pr-lint/action.yml @@ -66,7 +66,7 @@ runs: id: git-config uses: ivuorinen/actions/set-git-config@0fa9a68f07a1260b321f814202658a6089a43d42 with: - token: ${{ inputs.token }} + token: ${{ inputs.token || github.token }} username: ${{ inputs.username }} email: ${{ inputs.email }} @@ -264,7 +264,12 @@ runs: - name: Set APPLY_FIXES_IF var shell: bash env: - APPLY_FIXES_CONDITION: ${{ steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) }} + APPLY_FIXES_CONDITION: >- + ${{ + steps.ml.outputs.has_updated_sources == 1 && + (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && + (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) + }} run: | set -euo pipefail