Skip to content

Modify Octokit retry options #1768

Answered by gr2m
marcos-arranz asked this question in Q&A
Nov 25, 2022 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

when you start probot prorgamatically, you don't start it with probot run ./lib/index.js. Just do node ./lib/index.js.

And instead of exporting the async function, run the code directly

import { Server, Probot, ProbotOctokit } from "probot";
import { default as app } from "./app";

const server = new Server({
  Probot: Probot.defaults({
    appId: process.env.APP_ID,
    privateKey: process.env.PRIVATE_KEY_PATH,
    Octokit: ProbotOctokit.defaults({
      retry: {
        doNotRetry: [400, 401, 403, 422],
      },
    }),
  }),
});

server.load(app).then(() => server.start())

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@marcos-arranz
Comment options

@austinpray-mixpanel
Comment options

@gr2m
Comment options

Answer selected by marcos-arranz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants