Skip to content

Commit

Permalink
docs: fix 404 links for classes and rel links (#1649)
Browse files Browse the repository at this point in the history
Co-authored-by: Aaron Dewes <aaron.dewes@protonmail.com>
  • Loading branch information
Cybermite and AaronDewes committed Feb 17, 2022
1 parent 5d232e2 commit c34f64d
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion docs/best-practices.md
Expand Up @@ -72,7 +72,7 @@ Apps _should_ allow all settings to be customized for each installation.

### Store configuration in the repository

Any configuration _should_ be stored in the target repository. Unless the app is using files from an established convention, the configuration _should_ be stored in the `.github` directory. See the [API docs for `context.config`](https://probot.github.io/api/latest/classes/context.html#config).
Any configuration _should_ be stored in the target repository. Unless the app is using files from an established convention, the configuration _should_ be stored in the `.github` directory. See the [API docs for `context.config`](https://probot.github.io/api/latest/classes/context.Context.html#config).

`context.config` supports sharing configs between repositories. If configuration for your app is not available in the target repository, it will be loaded from the `.github` directory of the target organization's `.github` repository.

Expand Down
44 changes: 22 additions & 22 deletions docs/configuration.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/deployment.md
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`](./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.md#use-createNodeMiddleware) directly, e.g. for Vercel or Google Cloud Function.

```js
const { Probot, createProbot } = require("probot");
Expand Down
8 changes: 4 additions & 4 deletions docs/development.md
Expand Up @@ -173,7 +173,7 @@ Now you can run `main.js` however you want.
The [`run`](https://github.com/probot/probot/blob/master/src/run.ts) function that gets executed when running `probot run ./index.js` does two main things

1. Read configuration from environment variables and local files
2. Start a [`Server`](https://probot.github.io/api/latest/classes/server.html) instance
2. Start a [`Server`](https://probot.github.io/api/latest/classes/server_server.Server.html) instance

Among other things, using the Server instance permits you to set your own [`Octokit` constructor](https://github.com/octokit/core.js) with custom plugins and a custom logger.

Expand All @@ -196,7 +196,7 @@ async function startServer() {
}
```

The `server` instance gives you access to the express app instance (`server.expressApp`) as well as the [`Probot`](https://probot.github.io/api/latest/classes/probot.html) instance (`server.probotApp`).
The `server` instance gives you access to the express app instance (`server.expressApp`) as well as the [`Probot`](https://probot.github.io/api/latest/classes/probot.Probot.html) instance (`server.probotApp`).

### Use createNodeMiddleware

Expand Down Expand Up @@ -235,7 +235,7 @@ module.exports = createNodeMiddleware(app, {

### Use probot

If you don't use Probot's http handling in order to receive and verify events from GitHub via webhook requests, you can use the [`Probot`](https://probot.github.io/api/latest/classes/probot.html) class directly.
If you don't use Probot's http handling in order to receive and verify events from GitHub via webhook requests, you can use the [`Probot`](https://probot.github.io/api/latest/classes/probot.Probot.html) class directly.

```js
const { Probot } = require("probot");
Expand All @@ -259,7 +259,7 @@ async function example() {
}
```

Using the `Probot` class directly is great for [writing tests](./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.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.

### Use Probot's Octokit

Expand Down
4 changes: 2 additions & 2 deletions docs/github-api.md
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](./webhooks.md), `context.octokit` is _usually_ an authenticated client, but there are a few events that are exceptions:
When [receiving webhook events](/docs/webhooks.md), `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](./development.md#run-probot-programmatically), set the `baseUrl` option for the [`Probot`](https://probot.github.io/api/latest/classes/probot.html) constructor to the full base Url of the REST API
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

```js
const MyProbot = Probot.defaults({
Expand Down
6 changes: 3 additions & 3 deletions docs/hello-world.md
Expand Up @@ -13,9 +13,9 @@ module.exports = (app) => {
};
```

The `app` parameter is an instance of [`Probot`](https://probot.github.io/api/latest/classes/probot.html) and gives you access to all of the GitHub goodness.
The `app` parameter is an instance of [`Probot`](https://probot.github.io/api/latest/classes/probot.Probot.html) and gives you access to all of the GitHub goodness.

`app.on` will listen for any [webhook events triggered by GitHub](./webhooks.md), which will notify you when anything interesting happens on GitHub that your app wants to know about.
`app.on` will listen for any [webhook events triggered by GitHub](/docs/webhooks.md), which will notify you when anything interesting happens on GitHub that your app wants to know about.

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

The [`context`](https://probot.github.io/api/latest/classes/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](./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.md), 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
2 changes: 1 addition & 1 deletion docs/http.md
Expand Up @@ -5,7 +5,7 @@ title: HTTP routes

# HTTP routes

When starting your app using `probot run ./app.js` or using the [`Server`](./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.md#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

0 comments on commit c34f64d

Please sign in to comment.