Skip to content

Commit de341a6

Browse files
committed
chore: remove .contributorsignore file and references
1 parent 34b0f1a commit de341a6

File tree

2 files changed

+19
-22
lines changed

2 files changed

+19
-22
lines changed

docs/.contributorsignore

Whitespace-only changes.

scripts/update-contributors.sh

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ if [[ -n "${GITHUB_TOKEN:-}" ]]; then
1616
AUTH_HEADER=(-H "Authorization: token $GITHUB_TOKEN")
1717
fi
1818

19-
EXCLUDED_FILE="./docs/.contributorsignore"
2019
SINCE_FILE="./docs/.contributorssince"
2120

2221
# disabled for now, we'd need to append to the list instead of write
@@ -73,28 +72,26 @@ while :; do
7372
continue
7473
fi
7574

76-
if ! grep -Fxq "$login" "$EXCLUDED_FILE"; then
77-
if ! printf '%s\n' "${USERS[@]}" | grep -qx "$login"; then
78-
CACHE_FILE="$CACHE_DIR/$login.json"
79-
if [ -f "$CACHE_FILE" ]; then
80-
USER_JSON=$(<"$CACHE_FILE")
81-
else
82-
echo "Fetching user $login"
83-
USER_JSON=$(curl -s "${AUTH_HEADER[@]}" "https://api.github.com/users/$login")
84-
echo "$USER_JSON" > "$CACHE_FILE"
85-
fi
86-
87-
SANITIZED_JSON=$(echo "$USER_JSON" | tr -d '\000-\037')
88-
89-
USER_TYPE=$(jq -r '.type // "User"' <<< "$SANITIZED_JSON")
90-
if [[ "$USER_TYPE" == "Bot" ]]; then
91-
continue
92-
fi
93-
94-
USERS+=("$login")
95-
NAME=$(jq -r '.name // empty' <<< "$SANITIZED_JSON")
96-
echo "$login|$NAME" >> "$TMP_USERS"
75+
if ! printf '%s\n' "${USERS[@]}" | grep -qx "$login"; then
76+
CACHE_FILE="$CACHE_DIR/$login.json"
77+
if [ -f "$CACHE_FILE" ]; then
78+
USER_JSON=$(<"$CACHE_FILE")
79+
else
80+
echo "Fetching user $login"
81+
USER_JSON=$(curl -s "${AUTH_HEADER[@]}" "https://api.github.com/users/$login")
82+
echo "$USER_JSON" > "$CACHE_FILE"
9783
fi
84+
85+
SANITIZED_JSON=$(echo "$USER_JSON" | tr -d '\000-\037')
86+
87+
USER_TYPE=$(jq -r '.type // "User"' <<< "$SANITIZED_JSON")
88+
if [[ "$USER_TYPE" == "Bot" ]]; then
89+
continue
90+
fi
91+
92+
USERS+=("$login")
93+
NAME=$(jq -r '.name // empty' <<< "$SANITIZED_JSON")
94+
echo "$login|$NAME" >> "$TMP_USERS"
9895
fi
9996
done < "$TMP_LOGINS"
10097

0 commit comments

Comments
 (0)