fix sync script bugs, remove auto-merge workflow (#36)

- Fix jq pipe precedence: wrap uris length check in parens so
  `length` applies to the array, not the boolean and-chain
- Fix while-loop subshell: use process substitution so counter
  variables persist to the final summary line
- Remove auto-merge workflow: GITHUB_TOKEN merges do not trigger
  push events, so deploy-netty never ran on auto-merged PRs
This commit is contained in:
Hari 2026-04-02 00:06:14 -04:00 committed by GitHub
parent e634a3e233
commit 92b13153e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 24 deletions

View file

@ -34,7 +34,7 @@ login_items="$(printf '%s' "${items_json}" | jq -c '
.login.username != "" and
.login.password != null and
.login.password != "" and
(.login.uris // []) | length > 0
((.login.uris // []) | length) > 0
)]
')"
@ -45,7 +45,7 @@ imported=0
skipped=0
failed=0
printf '%s' "${login_items}" | jq -c '.[]' | while IFS= read -r item; do
while IFS= read -r item; do
name="$(printf '%s' "${item}" | jq -r '.name')"
username="$(printf '%s' "${item}" | jq -r '.login.username')"
password="$(printf '%s' "${item}" | jq -r '.login.password')"
@ -82,6 +82,6 @@ printf '%s' "${login_items}" | jq -c '.[]' | while IFS= read -r item; do
printf 'FAIL: %s (%s)\n' "${safe_name}" "${uri}" >&2
failed=$((failed + 1))
fi
done
done < <(printf '%s' "${login_items}" | jq -c '.[]')
printf '\nDone. imported=%d skipped=%d failed=%d\n' "${imported}" "${skipped}" "${failed}"