A tiny feedback form to make reviews more frequent.
functions | ||
public | ||
scripts | ||
src | ||
.editorconfig | ||
.eslintrc | ||
.gitignore | ||
.npmrc | ||
config.js | ||
import-map.json | ||
netlify.toml | ||
package-lock.json | ||
package.json | ||
README.md |
Setup
- Create an Application which requires
read_user
scope in your GitLab account.- Copy the Secret somewhere safe for now.
- Create an access token in your GitLab account with
api
access.- Copy the token somewhere safe for now.
- Decide on an environment variable name for the Application Secret
- Decide on an environment variable name for the API Access Token.
- Create a new snippet in your GitLab account with a file in it. This file will receive new feedback entries.
- Push your fork to a hosted repository.
- Create a new site on Netlify that deploys from the repository you pushed to in Step 6.
- In your site's Build & Deploy section, add the two environment variables you decided on in Steps 3 and 4. Fill in the values you saved from Steps 1 and 2.
- In your GitLab Application that you created in Step 1, update the Redirect URI field to be the deployed site name plus
/?provider=gitlab
.- For example, if your site is deployed to
vibrant-mihara-0358.netlify.app
, your Redirect URI field should behttps://vibrant-mihara-0358.netlify.app/?provider=gitlab
.
- For example, if your site is deployed to
- After updating your copy of
config.js
(see table below), push everything again to trigger a new Netlify deploy.
config.js
Key | Instructions |
---|---|
appId |
Use the Application ID from the application you created in Step 1. |
appSecretVar |
Update the name property of this object to be the environment variable name you picked in Step 3. |
snippetTokenVar |
Update the name property of this object to be the environment variable name you picked in Step 4. |
snippetId |
Use the snippet ID that you created in Step 5. |
feedbackFile |
Use the filename of the file in the snippet you created in Step 5 |
extraEmails |
Update to allow feedback from non-GitLab team member accounts |