Skip to content

Commit

Permalink
parse org in python script
Browse files Browse the repository at this point in the history
Signed-off-by: Isaac Milarsky <[email protected]>
  • Loading branch information
IsaacMilarky committed Jun 13, 2024
1 parent dbd2132 commit 5daff8a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
git config user.email '[email protected]'
git add -A
timestamp=$(date -u)
git commit -m "update data: ${timestamp}" || exit 0
git commit -m "update ${{ matrix.orgs }} data: ${timestamp}" || exit 0
- name: Push to ${{ github.ref_name }}
uses: CasperWA/push-protected@v2
with:
Expand Down
6 changes: 6 additions & 0 deletions scripts/refresh_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Script to run all metrics collection and update operations
"""
import os
import argparse
from fetch_public_metrics import get_all_data, parse_repos_and_orgs_into_objects
from fetch_public_metrics import parse_tracked_repos_file, read_previous_metric_data

Expand All @@ -10,6 +11,11 @@
if __name__ == "__main__":
os.umask(0)

parser = argparse.ArgumentParser(description='Metrics script to update data')
parser.add_argument('org', type=str, nargs='?',
help='The GitHub Org to update data for.')
args = parser.parse_args()

orgs_urls, repo_urls = parse_tracked_repos_file()

all_orgs, all_repos = parse_repos_and_orgs_into_objects(orgs_urls, repo_urls)
Expand Down
2 changes: 1 addition & 1 deletion update.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
pwd
cd scripts
python3 refresh_metrics.py
python3 refresh_metrics.py $1

0 comments on commit 5daff8a

Please sign in to comment.