Skip to content

Setting up Google Sheets

James James edited this page Apr 11, 2021 · 1 revision

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.

  1. Create a google cloud project for oppiabot, and turn on access to the google sheets API (this is free and required no billing).

  2. Create credentials to be used to access the API. Refer to here for information on how to do so.

  3. Add the credentials to the CLIENT_SECRET variable in the .env file.

  4. 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.

  5. In the oppiabot repository, run npm run sheets-setup in the terminal. A URL would be generated for you to use to authenticate oppiabot.

  6. Visit the URL and complete the authentication process, then enter the code gotten from that page into the terminal.

  7. 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!