A slack app backend to track self-assigned writing goals.
The goalkeeper is a web app for the Google Apps Script platform. To set up your development environment:
- Clone this repository:
$ git clone https://github.com/cnuahs/goalkeeper.git ./goalkeeper.git && cd goalkeeper.git
- Install clasp (https://github.com/google/clasp), the Google Command Line Apps Script Projects tool:
$ sudo npm i @google/clasp -g
Note: this assumes you have Node and the Node Package Manager (npm) installed. If not, download and install Node for your platform from https://nodejs.org/.
-
Enable the Apps Script API on your Google account at https://script.google.com/home/usersettings.
-
Create a new Apps Script project at https://script.google.com/home.
-
Authenticate clasp with Google Apps Script
$ clasp login
- Create a new clasp project:
$ clasp create docId
where docId
is the Google Docs ID of the project created in Step 4.
- Push the code to the Google Apps Script platform:
$ clasp push
- Modify the code as you see fit. To deploy your changes:
$ clasp push
$ clasp version "A short description."
$ clasp deploy <n>
where n is the version number of the version you want to deploy, likely the one printed by clasp.
Note:
The file config.js
is a template configuration file. You need to edit it's contents to provide your slack verification token etc. Don't commit it to git! To avoid doing so I have git 'ignore' changes to config.js as follows:
$ git update-index --assume-unchanged config.js
if you later need/want to extent the template, you need to start tracking it again,
$ git update-index --no-assume-unchanged config.js
You can then modify the template and git add
and git commit
it.
Be careful not to commit your auth or verification tokens to git!