Skip to content
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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Feat add sync action #165

wants to merge 8 commits into from

Conversation

aditigopalan
Copy link
Contributor

@aditigopalan aditigopalan commented Jan 28, 2025

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:

  1. Daily Automation: Runs on a schedule (cron) or can be triggered manually.
  2. Customizable Inputs:
    • spreadsheet_id: The Google Sheet ID to monitor.
    • stop_day and stop_time: Defines when the action should stop execution.
  3. Branch and PR Management:
    • Creates a branch named RFC-{GoogleSheetName}.
    • Stores the CSV as RFC_DATA/{GoogleSheetName}.csv.
    • Ensures a single pull request (PR) for the branch, reusing it for subsequent changes.
  4. Secure Credentials:
    • Uses RFC_TOKEN (Personal Access Token) and GOOGLE_CREDENTIALS stored securely as GitHub Secrets.

Workflow:

  1. Checks for changes in the Google Sheet.
  2. Updates the CSV file in the RFC_DATA folder on the corresponding branch.
  3. Updates or creates a pull request for the 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

@aditigopalan aditigopalan requested a review from vpchung as a code owner January 28, 2025 21:42
@aditigopalan aditigopalan added priority-high major PR label for a major update and removed priority-high labels Jan 28, 2025
Copy link
Member

@vpchung vpchung left a 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 🙃

@aditigopalan aditigopalan requested a review from vpchung February 4, 2025 17:59
@aditigopalan
Copy link
Contributor Author

LGTM.

I just have some nitpicks 🙃

Thank you so much! Let me know if the fixes make sense :)

@aditigopalan aditigopalan requested a review from vpchung February 13, 2025 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major PR label for a major update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RFC schedule and deployment plan
2 participants