Skip to content

Commit

Permalink
feat: probot v11
Browse files Browse the repository at this point in the history
BREAKING CHANGE: TBD
  • Loading branch information
gr2m committed Dec 15, 2020
1 parent 42b043e commit 15e4b00
Show file tree
Hide file tree
Showing 44 changed files with 1,862 additions and 5,249 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Expand Up @@ -30,8 +30,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build
- run: npx tsd
- run: npx jest --forceExit
- run: npx jest

# separate job to set as required in branch protection,
# as the above change each time the Node versions change
Expand All @@ -44,8 +43,9 @@ jobs:
- run: npm ci
- run: npm run lint
- run: npm run build
- run: npx tsd
- run: npx jest --coverage --force-exit
# See https://github.com/probot/probot/issues/1439
# - run: npx tsd
- run: npx jest
- name: codecov
run: npx codecov
env:
Expand Down
25 changes: 12 additions & 13 deletions docs/configuration.md
Expand Up @@ -20,18 +20,17 @@ For more on the set up of these items, check out [Configuring a GitHub App](./de

Some less common environment variables are:

| Variable | Description |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `DISABLE_WEBHOOK_EVENT_CHECK` | Set to `true` to disable Probot's webhook-event-check feature. While the feature is enabled, Probot will warn you when your application is attempting to listen to an event that your GitHub App is not subscribed to. <br> Note: webhook-event-check is automatically disabled when `NODE_ENV` is set to `production`. <p>_(Default: `false`)_</p> |
| `GHE_HOST` | The hostname of your GitHub Enterprise instance. <p>_(Example: `github.mycompany.com`)_</p> |
| `GHE_PROTOCOL` | The protocol of your GitHub Enterprise instance. Defaults to HTTPS. Do not change unless you are certain. <p>_(Example: `https`)_</p> |
| `LOG_FORMAT` | By default, logs are formatted for readability in development. You can set this to `json` in order to disable the formatting |
| `LOG_LEVEL` | The verbosity of logs to show when running your app, which can be `fatal`, `error`, `warn`, `info`, `debug`, `trace` or `silent`. Default: `info` |
| `LOG_LEVEL_IN_STRING` | By default, when using the `json` format, the level printed in the log records is an int (`10`, `20`, ..). This option tells the logger to print level as a string: `{"level": "info"}`. Default `false` |
| `SENTRY_DSN` | Set to a [Sentry](https://sentry.io/) DSN to report all errors thrown by your app. <p>_(Example: `https://1234abcd@sentry.io/12345`)_</p> |
| `PORT` | The port to start the local server on. Default: `3000` |
| `HOST` | The host to start the local server on. |
| `WEBHOOK_PATH` | The URL path which will receive webhooks. Default: `/` |
| `REDIS_URL` | Set to a `redis://` url as connection option for [ioredis](https://github.com/luin/ioredis#connect-to-redis) in order to enable [cluster support for request throttling](https://github.com/octokit/plugin-throttling.js#clustering). <p>_(Example: `redis://:secret@redis-123.redislabs.com:12345/0`)_</p> |
| Variable | Description |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `GHE_HOST` | The hostname of your GitHub Enterprise instance. <p>_(Example: `github.mycompany.com`)_</p> |
| `GHE_PROTOCOL` | The protocol of your GitHub Enterprise instance. Defaults to HTTPS. Do not change unless you are certain. <p>_(Example: `https`)_</p> |
| `LOG_FORMAT` | By default, logs are formatted for readability in development. You can set this to `json` in order to disable the formatting |
| `LOG_LEVEL` | The verbosity of logs to show when running your app, which can be `fatal`, `error`, `warn`, `info`, `debug`, `trace` or `silent`. Default: `info` |
| `LOG_LEVEL_IN_STRING` | By default, when using the `json` format, the level printed in the log records is an int (`10`, `20`, ..). This option tells the logger to print level as a string: `{"level": "info"}`. Default `false` |
| `SENTRY_DSN` | Set to a [Sentry](https://sentry.io/) DSN to report all errors thrown by your app. <p>_(Example: `https://1234abcd@sentry.io/12345`)_</p> |
| `PORT` | The port to start the local server on. Default: `3000` |
| `HOST` | The host to start the local server on. |
| `WEBHOOK_PATH` | The URL path which will receive webhooks. Default: `/` |
| `REDIS_URL` | Set to a `redis://` url as connection option for [ioredis](https://github.com/luin/ioredis#connect-to-redis) in order to enable [cluster support for request throttling](https://github.com/octokit/plugin-throttling.js#clustering). <p>_(Example: `redis://:secret@redis-123.redislabs.com:12345/0`)_</p> |

For more information on the formatting conventions and rules of `.env` files, check out [the npm `dotenv` module's documentation](https://www.npmjs.com/package/dotenv#rules).
57 changes: 0 additions & 57 deletions docs/summer-of-code.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/testing.md
Expand Up @@ -30,7 +30,7 @@ describe("My Probot app", () => {
throttle: { enabled: false },
}),
});
myProbotApp({ app: probot });
myProbotApp(probot);
});

test("creates a passing check", async () => {
Expand Down
2 changes: 1 addition & 1 deletion docs/webhooks.md
Expand Up @@ -45,7 +45,7 @@ You can also use `app.webhooks.onAny()` to listen for any event that your app is
```js
module.exports = (app) => {
app.webhooks.onAny(async (context) => {
context.log.info({ event: context.event, action: context.payload.action });
context.log.info({ event: context.name, action: context.payload.action });
});
};
```
Expand Down

0 comments on commit 15e4b00

Please sign in to comment.