Skip to content

A Probot app that makes a comment on a merged PR or closed issue with content you specify in the issue/PR body.

License

Notifications You must be signed in to change notification settings

C-Saunders/comment-when-done

Repository files navigation

comment-when-done

Are there times when you want a reminder to do something once an issue is resolved or a pull request is merged?

This GitHub App automatically comments on issues when they're closed and pull requests when they're merged so you can get a notification when you need it!

Usage

The content of the comment you want the app to make needs to be in the body (description) of the issue or pull request (a comment on the pull request or issue won't work). Also note that pull requests that are closed without merging will not trigger the app to make a comment.

The comment contents should be placed between an opening sentinel- {{whendone}} and closing sentinel- {{/whendone}}.

  • The opening {{whendone}} must be at the beginning of a line
  • Single line comments like this will work
{{whendone}}Tell Sam this bug is fixed{{/whendone}}
  • Multi-line comments like this will also work
{{whendone}}
Set up the new alerts.
Let Pat know they should adjust the dashboards.
{{/whendone}}
{{whendone}}
`/remind` me to set up the new alerts in two weeks.
Let `@this-is-pat` know they should adjust the dashboards.
`/remind` @another-person to stretch 20 minutes.
{{/whendone}}

Running your own instance as a Google Cloud Function

You can run this anywhere or any way you want, but it is set up to make a GCP deployment (hopefully) easy using the serverless framework.

You will need to have node and npm installed.

git clone [email protected]:C-Saunders/comment-when-done.git
cd comment-when-done
npm install
npm run start

npm run start will facilitate the authorization flow that results from probot run and guide you to set up a GitHub app. It will create and populate a local .env file containing the secrets you'll need to be available as environment variables when the bot runs.

You'll also need to set API_PROJECT_ID in .env, as shown in .env.example.

The secrets in the .env file will be read by serverless when you run the deploy command.

Follow the instructions provided by serverless to set up your GCP credentials. Save your credentials JSON file in ~/.gcloud/comment-when-done.json (or update this path in serverless.yml to meet your needs).

npm install -g serverless
serverless deploy // you may want to specify the --region option, depending on your setup

The output of serverless deploy will include the webhook URL you will need to configure your GitHub App. It should be used to replace the smee URL that probot uses to get you started.

Contributing

If you have suggestions for how this application could be improved, want to report a bug, have a question, etc., please open an issue! We love all and any contributions.

For more, check out the Contributing Guide.

License

ISC © 2018 Charlie Saunders [email protected]

About

A Probot app that makes a comment on a merged PR or closed issue with content you specify in the issue/PR body.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •