# customizable-comments

> A Probot app to auto-reply with customizable comments based on template vars

Latest version **1.0.0** (published 2018-11-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install customizable-comments
pnpm add customizable-comments
yarn add customizable-comments
bun add customizable-comments
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-11-30 |
| First published | 2018-11-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 8.3.0 |
| Dependencies | 4 |
| Unpacked size | 7.9 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Jeremy Gayed |
| Maintainers | tizmagik |
| Keywords | probot, github, probot-app |

## Links

- npm: https://www.npmjs.com/package/customizable-comments
- Repository: https://github.com/tizmagik/customizable-comments
- Issues: https://github.com/tizmagik/customizable-comments/issues
- npm.io page: https://npm.io/package/customizable-comments

## Dependencies (4)

- [probot](https://npm.io/package/probot.md) ^7.4.0
- [lodash.get](https://npm.io/package/lodash.get.md) ^4.4.2
- [probot-config](https://npm.io/package/probot-config.md) ^1.0.0
- [@probot/serverless-gcf](https://npm.io/package/@probot/serverless-gcf.md) ^0.2.0

## Recent versions

- 1.0.0 (latest) — 2018-11-30

## README

# customizable-comments (probot-cc)

> A GitHub App built with [Probot](https://github.com/probot/probot) that auto-replies with customizable comments based on template vars

<img src="./probot-cc-sample.png" />

## Usage

1. Install the [Customizable Comments (probot-cc) GitHub App](https://github.com/apps/probot-cc) into the repo(s) you wish to use it on.
1. Add a `.github/customizable-comments.yml` configuration file to each repo. You can also

Customizable Comments also supports [Probot Config](https://github.com/probot/probot-config), if you want to store your configuration files in a central repository. This allows you to share configurations between projects, and create an organization-wide configuration file by creating a repository named `.github` and file named `customizable-comments.yml`.

## Configuration options

_📒 Currently, this Probot App only supports `pull_request.opened` events._

_I would be happy to add more, just submit a PR or Issue with what you'd find useful._

### Built-in template vars

| name     | value                     | used when      |
| -------- | ------------------------- | -------------- |
| \$BRANCH | The branch name of the PR | `pull_request` |

### Custom template vars

You can configure your own variable replacements using the `vars:` block in the yml file. See the example below:

## Example

```yaml
vars:
  - name: $MY_CUSTOM
    value: my-value

pull_request:
  opened:
    template: |
      Here's a helpful URL based on the branch name: https://$BRANCH.something.example.com
      And here's my custom value: $MY_CUSTOM
```

The above will auto-reply with a comment like so:

```
Here's a helpful URL based on the branch name: https://the-branch.something.example.com
And here's my custom value: my-custom
```

## Local Development

```sh
# Install dependencies
npm install

# Run the bot
npm run dev
```

## Deploying as GCF ☁️

This Probot app supports deploying as a Google Cloud Function out of the box:

```
gcloud beta functions deploy gcf-name --env-vars-file .env.yaml --entry-point probot --runtime nodejs8 --trigger-http
```

Where:

- `gcf-name`: desired name of the GCF
- `.env.yaml`: see [.env.yaml.example](./.env.yaml.example)

See [Probot Deployment docs](https://probot.github.io/docs/deployment/) for other deployment options.

## Contributing

If you have suggestions for how customizable-comments could be improved, or want to report a bug, open an issue! We'd love all and any contributions.

For more, check out the [Contributing Guide](CONTRIBUTING.md).

## License

[ISC](LICENSE) © 2018 Jeremy Gayed <https://twitter.com/tizmagik>

---
_Source: https://npm.io/package/customizable-comments · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
