Skip to content

Commit 90e00c6

Browse files
committed
Split long lines up
1 parent 1ae076a commit 90e00c6

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/sync-dataset-json-changes-to-js-utils.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ jobs:
4343
run: |
4444
SHA="${{ github.sha }}"
4545
REPO="${{ github.repository }}"
46-
changed_file=$(gh api repos/$REPO/commits/$SHA | grep -oP '"filename":\s*"\K[^"]+' | grep '\.json$' | head -n 1)
46+
changed_file=$(gh api repos/$REPO/commits/$SHA \
47+
| grep -oP '"filename":\s*"\K[^"]+' \
48+
| grep '\.json$' \
49+
| head -n 1)
4750
changed_file="${changed_file//%2F//}" # decode URL-encoded slashes (%2F → /)
4851
changed_file="${changed_file%%\?*}" # remove any query string (?ref=...)
4952
dataset=$(basename "$changed_file" .json)
@@ -73,7 +76,8 @@ jobs:
7376
dest_dir="${GITHUB_WORKSPACE}/adamlui/js-utils/$dataset"
7477
mkdir -p "$dest_dir"
7578
cp -f "$src_file" "$dest_dir/$dataset.json"
76-
COMMIT_MSG="${RAW_COMMIT_MSG:-Update $dataset.json} ↞ [auto-sync from https://github.com/adamlui/python-utils/tree/main/$dataset]"
79+
COMMIT_MSG="${RAW_COMMIT_MSG:-Update $dataset.json} ↞ \
80+
[auto-sync from https://github.com/adamlui/python-utils/tree/main/$dataset]"
7781
ESCAPED_MSG=$(printf '%q' "$COMMIT_MSG")
7882
cd "${GITHUB_WORKSPACE}/adamlui/js-utils"
7983
git add "$dataset/$dataset.json"

0 commit comments

Comments
 (0)