Skip to content

Commit

Permalink
Add comprehensive JSON file monitoring
Browse files Browse the repository at this point in the history
Closes #113.
  • Loading branch information
vladh committed Oct 14, 2024
1 parent fe5c1c2 commit 85b6a75
Show file tree
Hide file tree
Showing 15 changed files with 883 additions and 88 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")
61 changes: 0 additions & 61 deletions bin/update-member

This file was deleted.

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"
2 changes: 1 addition & 1 deletion members.csv
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ speakeasy,https://raw.githubusercontent.com/speakeasy-api/oss-pledge/refs/heads/
pydantic,https://pydantic.dev/assets/for-external/oss-pledge.json
vlt,https://vlt.sh/osspledge.json
platformatic,https://raw.githubusercontent.com/platformatic/.github/refs/heads/main/osspledge.json
laravel,https://laravel.com/assets/files/opensourcepledge.json
laravel,https://laravel.com/assets/files/opensourcepledge.json
Loading

0 comments on commit 85b6a75

Please sign in to comment.