Skip to content

Commit

Permalink
chore: Merge latest master into beta (#1915)
Browse files Browse the repository at this point in the history
Co-authored-by: Aaron Dewes <aaron.dewes@protonmail.com>
Co-authored-by: Sangwon Kim <hello@kdby.io>
Co-authored-by: scon.io <iam@scon.io>
Co-authored-by: David Brodski <129956+kammerjaeger@users.noreply.github.com>
Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
  • Loading branch information
6 people authored Nov 15, 2023
1 parent 8dc41a9 commit 97cc1bc
Show file tree
Hide file tree
Showing 18 changed files with 72 additions and 90 deletions.
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
next: docs/hello-world.md
next: hello-world
title: Introduction
layout: docs.liquid
---
Expand Down
4 changes: 2 additions & 2 deletions docs/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ The [uncanny valley](https://en.wikipedia.org/wiki/Uncanny_valley) is the hypoth

Your app should be empathetic, but it shouldn't pretend to be human. It is an app and everyone that interacts with it knows that.

> - :smile: "Latest build failures: _{listing of build failures}_…"
> - :cry: "Hey there! You asked for the build failures, so I went and dug them up for you: _{listing of build failures}_ … Have a fantastic day!"
> - 😄 "Latest build failures: _{listing of build failures}_…"
> - 😢 "Hey there! You asked for the build failures, so I went and dug them up for you: _{listing of build failures}_ … Have a fantastic day!"
## Autonomy

Expand Down
46 changes: 23 additions & 23 deletions docs/configuration.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/deployment.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
next: docs/http.md
next: http
title: Deployment
---

Expand Down Expand Up @@ -123,7 +123,7 @@ Probot runs like [any other Node app](https://devcenter.heroku.com/articles/depl

### As serverless function

When deploying your Probot app to a serverless/function environment, you don't need to worry about handling the http webhook requests coming from GitHub, the platform takes care of that. In many cases you can use [`createNodeMiddleware`](/docs/development.md#use-createNodeMiddleware) directly, e.g. for Vercel or Google Cloud Function.
When deploying your Probot app to a serverless/function environment, you don't need to worry about handling the http webhook requests coming from GitHub, the platform takes care of that. In many cases you can use [`createNodeMiddleware`](/docs/development/#use-createNodeMiddleware) directly, e.g. for Vercel or Google Cloud Function.

```js
const { Probot, createProbot } = require("probot");
Expand Down
4 changes: 2 additions & 2 deletions docs/development.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
next: docs/webhooks.md
next: webhooks
title: Developing an app
---

Expand Down Expand Up @@ -259,7 +259,7 @@ async function example() {
}
```

Using the `Probot` class directly is great for [writing tests](/docs/testing.md) for your Probot app function. It permits you to pass a custom logger to test for log output, disable throttling, request retries, and much more.
Using the `Probot` class directly is great for [writing tests](/docs/testing) for your Probot app function. It permits you to pass a custom logger to test for log output, disable throttling, request retries, and much more.

### Use Probot's Octokit

Expand Down
2 changes: 1 addition & 1 deletion docs/extensions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
next: docs/persistence.md
next: persistence
title: Extensions
---

Expand Down
6 changes: 3 additions & 3 deletions docs/github-api.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
next: docs/configuration.md
next: configuration
title: Interacting with GitHub
---

Expand Down Expand Up @@ -86,7 +86,7 @@ Check out the [GitHub GraphQL API docs](https://docs.github.com/en/graphql) to l

## Unauthenticated Events

When [receiving webhook events](/docs/webhooks.md), `context.octokit` is _usually_ an authenticated client, but there are a few events that are exceptions:
When [receiving webhook events](/docs/webhooks), `context.octokit` is _usually_ an authenticated client, but there are a few events that are exceptions:

- [`installation.deleted` & `installation.suspend`](https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#installation) - The installation was _just_ deleted or suspended, so we can't authenticate as the installation.

Expand All @@ -102,7 +102,7 @@ If you want to run a Probot App against a GitHub Enterprise instance, you'll nee
GHE_HOST=fake.github-enterprise.com
```

When [using Probot programmatically](/docs/development.md#run-probot-programmatically), set the `baseUrl` option for the [`Probot`](https://probot.github.io/api/latest/classes/probot.Probot.html) constructor to the full base Url of the REST API
When [using Probot programmatically](/docs/development/#run-probot-programmatically), set the `baseUrl` option for the [`Probot`](https://probot.github.io/api/latest/classes/probot.Probot.html) constructor to the full base Url of the REST API

```js
const MyProbot = Probot.defaults({
Expand Down
4 changes: 2 additions & 2 deletions docs/hello-world.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
next: docs/development.md
next: development
title: Hello World
---

Expand All @@ -26,7 +26,7 @@ module.exports = (app) => {
};
```

The [`context`](https://probot.github.io/api/latest/classes/context.Context.html) passed to the event handler includes everything about the event that was triggered, as well as some helpful properties for doing something useful in response to the event. `context.octokit` is an authenticated GitHub client that can be used to [make REST API and GraphQL calls](/docs/github-api.md), and allows you to do almost anything programmatically that you can do through a web browser on GitHub.
The [`context`](https://probot.github.io/api/latest/classes/context.Context.html) passed to the event handler includes everything about the event that was triggered, as well as some helpful properties for doing something useful in response to the event. `context.octokit` is an authenticated GitHub client that can be used to [make REST API and GraphQL calls](/docs/github-api), and allows you to do almost anything programmatically that you can do through a web browser on GitHub.

Here is an example of an autoresponder app that comments on opened issues:

Expand Down
4 changes: 2 additions & 2 deletions docs/http.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
next: docs/pagination.md
next: pagination
title: HTTP routes
---

# HTTP routes

When starting your app using `probot run ./app.js` or using the [`Server`](/docs/development.md#use-server) class, your Probot app function will receive the `options.getRouter` function as its 2nd argument.
When starting your app using `probot run ./app.js` or using the [`Server`](/docs/development/#use-server) class, your Probot app function will receive the `options.getRouter` function as its 2nd argument.

Calling `getRouter('/my-app')` will return an [express](http://expressjs.com/) router that you can use to expose custom HTTP endpoints from your app.

Expand Down
2 changes: 1 addition & 1 deletion docs/logging.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
next: docs/deployment.md
next: deployment
title: Logging
---

Expand Down
2 changes: 1 addition & 1 deletion docs/pagination.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
next: docs/extensions.md
next: extensions
title: Pagination
---

Expand Down
2 changes: 1 addition & 1 deletion docs/persistence.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
next: docs/best-practices.md
next: best-practices
title: Persistence
---

Expand Down
2 changes: 1 addition & 1 deletion docs/simulating-webhooks.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
next: docs/logging.md
next: logging
title: Simulate receiving webhooks
---

Expand Down
2 changes: 1 addition & 1 deletion docs/testing.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
next: docs/simulating-webhooks.md
next: simulating-webhooks
title: Testing
---

Expand Down
2 changes: 1 addition & 1 deletion docs/webhooks.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
next: docs/github-api.md
next: github-api
title: Receiving webhooks
---

Expand Down
62 changes: 22 additions & 40 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
"dependencies": {
"@octokit/core": "^5.0.1",
"@octokit/plugin-enterprise-compatibility": "^4.0.1",
"@octokit/plugin-paginate-rest": "^9.1.3",
"@octokit/plugin-rest-endpoint-methods": "^10.1.3",
"@octokit/plugin-paginate-rest": "^9.1.4",
"@octokit/plugin-rest-endpoint-methods": "^10.1.5",
"@octokit/plugin-retry": "^6.0.1",
"@octokit/plugin-throttling": "^8.1.2",
"@octokit/types": "^12.2.0",
"@octokit/webhooks": "^12.0.3",
"@probot/get-private-key": "^1.1.1",
"@octokit/types": "^12.3.0",
"@octokit/webhooks": "^12.0.4",
"@probot/get-private-key": "^1.1.2",
"@probot/octokit-plugin-config": "^2.0.1",
"@probot/pino": "^2.3.5",
"@types/express": "^4.17.21",
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export type ApplicationFunctionOptions = {
export type ApplicationFunction = (
app: Probot,
options: ApplicationFunctionOptions,
) => void;
) => void | Promise<void>;

export type ServerOptions = {
cwd?: string;
Expand Down

0 comments on commit 97cc1bc

Please sign in to comment.