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

refactor: spreadsheet/get prepare for future schema #26

Merged
merged 8 commits into from
Mar 20, 2021
Merged

refactor: spreadsheet/get prepare for future schema #26

merged 8 commits into from
Mar 20, 2021

Conversation

azu
Copy link
Owner

@azu azu commented Mar 20, 2021

@vercel vercel bot temporarily deployed to Preview March 20, 2021 14:00 Inactive
@vercel vercel bot temporarily deployed to Preview March 20, 2021 14:02 Inactive
@vercel vercel bot temporarily deployed to Preview March 20, 2021 15:31 Inactive
@azu azu changed the title test: add spreadsheet get refactor: spreadsheet/get prepare for next schema Mar 20, 2021
@vercel vercel bot temporarily deployed to Preview March 20, 2021 15:34 Inactive
throw new Error("statsRow is not defined");
}
const README = statsRow?.values?.[3]?.formattedValue! ?? "";
// TODO: stats should be different by year
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, the "budget" sheet is not defined yet.

{
year: currentYear,
stats,
README,
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

README will be moved to top-level?

@@ -5,9 +5,11 @@
"scripts": {
"dev": "npm-run-all -p dev:next",
"dev:next": "next --port 3000",
"dev:prod": "ENABLE_PRODUCTION_DATA=1 next --port 3000",
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

start with production data.
It is useful for debug.

export const TEST_SPREADSHEET_URL =
"https://docs.google.com/spreadsheets/d/1gmVOU7Zi_g6fV7aWPUnZhgKLd5EdltxeWbwlufM3Plc/edit";
export const hasTestCredential = () => {
return Boolean(process.env.TEST_GOOGLE_CREDENTIAL_BASE64);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TEST_GOOGLE_CREDENTIAL_BASE64 is just base64 of credentials object.

@azu azu changed the title refactor: spreadsheet/get prepare for next schema refactor: spreadsheet/get prepare for future schema Mar 20, 2021
@vercel vercel bot temporarily deployed to Preview March 20, 2021 15:49 Inactive
@vercel vercel bot temporarily deployed to Preview March 20, 2021 23:40 Inactive
@vercel vercel bot temporarily deployed to Preview March 20, 2021 23:43 Inactive
@azu azu merged commit d35a0ef into main Mar 20, 2021
@azu azu deleted the test branch March 20, 2021 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant