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

1255 refactor current data into data external #1267

Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/_wins-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: stefanzweifel/[email protected]
with:
# Optional glob pattern of files which should be added to the commit
file_pattern: _data/_wins-data.json
file_pattern: _data/external/_wins-data.json

commit_message: Update contributor and language data

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/vrms-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:

# Use an action (`my-action`) in your repository
- name: Save vrms_data.json
run: curl -o _data/vrms_data.json https://www.vrms.io/api/recurringevents
run: curl -o _data/external/vrms_data.json https://www.vrms.io/api/recurringevents

- uses: stefanzweifel/[email protected]
with:
# Optional glob pattern of files which should be added to the commit
file_pattern: _data/vrms_data.json
file_pattern: _data/external/vrms_data.json

commit_message: Update meeting data

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/wins-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
- uses: actions/checkout@v2

- name: Save wins-data.json
run: curl -o _data/wins-data.json https://sheets.googleapis.com/v4/spreadsheets/1tj6eQlVLFgmskoXouVt87POxYVwR1yWT2vOSQEPyDtg/values/Responses?key=${{ secrets.WINS_API_KEY }}
run: curl -o _data/external/wins-data.json https://sheets.googleapis.com/v4/spreadsheets/1tj6eQlVLFgmskoXouVt87POxYVwR1yWT2vOSQEPyDtg/values/Responses?key=${{ secrets.WINS_API_KEY }}

- uses: stefanzweifel/[email protected]
with:
# Optional glob pattern of files which should be added to the commit
file_pattern: _data/wins-data.json
file_pattern: _data/external/wins-data.json

commit_message: Update wins data

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions github-actions/github-data/get-project-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const octokit = new Octokit({ auth: core.getInput("token") });
* @return {Object} [Contains old project data as "oldGitHubData" and the date this script last ran as "dateLastRan"]
*/
function getLocalData(){
let data = fs.readFileSync('_data/github-data.json', 'utf8');
let data = fs.readFileSync('_data/external/github-data.json', 'utf8');
data = JSON.parse(data);
if(Date.parse(data[0]) > 0){
let date = new Date(data[0]);
Expand Down Expand Up @@ -186,7 +186,7 @@ function writeData(projectData){
projectData.sort(sortById);
// Store the date this script finished running. dateRan is a global variable defined at the beginning of this script
projectData.unshift(dateRan.toString());
fs.writeFileSync('_data/github-data.json', JSON.stringify(projectData, null, 2));
fs.writeFileSync('_data/external/github-data.json', JSON.stringify(projectData, null, 2));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion github-actions/wins-data/clean-and-save-wins-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const axios = require("axios");
const fs = require("fs");
const core = require("@actions/core");

const PATH_TO_WRITE_FILE = "_data/_wins-data.json";
const PATH_TO_WRITE_FILE = "_data/external/_wins-data.json";

const BASE_API_URL = "https://sheets.googleapis.com/v4/spreadsheets";
const SPREAD_SHEET_ID = "1zkr_dEyiT-WTksUkVyL4jYQuYC5_YvJCLrUIfBf1CeE";
Expand Down