Skip to content

Commit

Permalink
Merge pull request #213 from vladh/vladh/add-better-json-monitoring
Browse files Browse the repository at this point in the history
Add comprehensive JSON file monitoring
  • Loading branch information
chadwhitacre authored Oct 24, 2024
2 parents eb28aa6 + 51b08cd commit 236d6c0
Show file tree
Hide file tree
Showing 13 changed files with 884 additions and 28 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/update-all-members.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
permissions:
contents: write
id-token: write
issues: write

jobs:
build:
Expand All @@ -19,5 +20,7 @@ jobs:
run: npm install
- name: Update all changed member files
run: bash ./bin/update-all-members
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Commit member changes, if any
run: bash ./bin/commit-member-changes
8 changes: 5 additions & 3 deletions bin/update-all-members
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
# This script fetches the JSON files specified in `members.csv` for all
# members. Must be run in the repo's root.

while IFS= read -r line; do
members=$(cat members.csv)

while IFS= read -r line || [[ -n $line ]]; do
line_parts=(${line//,/ })
./bin/update-member ${line_parts[0]} ${line_parts[1]}
done < members.csv
./src/memberData/bin/updateMember.ts ${line_parts[0]} ${line_parts[1]}
done < <(printf '%s' "$members")
2 changes: 1 addition & 1 deletion bin/update-new-members
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ new_member_lines=$(
while IFS= read -r line; do
line_parts=(${line//,/ })
if [ ${#line_parts[@]} -ne 0 ]; then
./bin/update-member ${line_parts[0]} ${line_parts[1]}
./src/memberData/bin/updateMember.ts ${line_parts[0]} ${line_parts[1]}
fi
done <<< "$new_member_lines"
Loading

0 comments on commit 236d6c0

Please sign in to comment.