-
Couldn't load subscription status.
- Fork 1
Feat add sync action #165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat add sync action #165
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I just have some nitpicks 🙃
Thank you so much! Let me know if the fixes make sense :) |
Co-authored-by: Verena Chung <[email protected]>
Co-authored-by: Verena Chung <[email protected]>
Merging main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gosh, so sorry I missed this code review request.
Looks good to me!
| from google.oauth2.service_account import Credentials | ||
| from googleapiclient.discovery import build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if you'd find the effort to switch over worth it, but I really like using gspread library to access and edit Google spreadsheets!
It could make some of the functions below a bit more readable and easier to comprehend right away.
| - name: Create Google Credentials File | ||
| env: | ||
| GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }} | ||
| run: | | ||
| echo "${GOOGLE_CREDENTIALS}" > google-credentials.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before merging, let's double-check that this step does not write the credentials to the Action logs. I'm 99.9% sure it won't print to the logs since it's a secret, but better safe than sorry 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK just verified that it does not - we good!
Pulling changes from main
Fixes #97
This GitHub Action automates the process of syncing a specified Google Sheet to a GitHub repository as a CSV file, facilitating RFC integration.
Key Features:
cron) or can be triggered manually.spreadsheet_id: The Google Sheet ID to monitor.stop_dayandstop_time: Defines when the action should stop execution.RFC-{GoogleSheetName}.RFC_DATA/{GoogleSheetName}.csv.RFC_TOKEN(Personal Access Token) andGOOGLE_CREDENTIALSstored securely as GitHub Secrets.Workflow:
RFC_DATAfolder on the corresponding branch.Script is tested and RFC Integration works, but test on actual action pending merge
Note: I used Google credentials from HTAN. Does MC2 have a google service account? If so those credentials should be updated.
The end result will look something like #164