-
Notifications
You must be signed in to change notification settings - Fork 72
Setting up Google Sheets
While contributing to oppiabot, you might find that you need to make some changes to the CLA functionality.
Oppia stores the contributors who have signed the CLA sheet in a google spreadsheet. Oppiabot searches the spreadsheet to check if the author of the pull request has signed the CLA.
In order to do this locally(your deployed instance of oppiabot), you will need to go through the following steps.
-
Create a google cloud project for oppiabot, and turn on access to the google sheets API (this is free and required no billing).
-
Create credentials to be used to access the API. Refer to here for information on how to do so.
-
Add the credentials to the
CLIENT_SECRET
variable in the.env
file. -
Create a new spreadsheet to be used as the CLA sheet and add the sheet ID to the
SPREADSHEET_ID
in the.env
file. Check here for information on how to get the spreadsheet ID. -
In the oppiabot repository, run
npm run sheets-setup
in the terminal. A URL would be generated for you to use to authenticate oppiabot. -
Visit the URL and complete the authentication process, then enter the code gotten from that page into the terminal.
-
Copy the generated JSON string into the
CREDENTIALS
env variable.
You have successfully set up your instance of oppiabot to use the google sheets API!