Skip to content

Commit

Permalink
feat: add restart message (#1353)
Browse files Browse the repository at this point in the history
  • Loading branch information
FoseFx committed Sep 19, 2020
1 parent dc4cd53 commit a03c610
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/apps/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ export const setupAppFactory = (
app.log.error(error);
}
});
} else {
printRestartMessage(app);
}

res.redirect(`${response}/installations/new`);
Expand All @@ -71,6 +73,7 @@ export const setupAppFactory = (
WEBHOOK_SECRET: webhook_secret,
});
res.end();
printRestartMessage(app);
});

route.get("/probot/success", async (req, res) => {
Expand Down Expand Up @@ -105,6 +108,12 @@ function printWelcomeMessage(
});
}

function printRestartMessage(app: Application) {
app.log.info("");
app.log.info("Probot has been set up, please restart the server!");
app.log.info("");
}

function getBaseUrl(req: Request): string {
const protocols = req.headers["x-forwarded-proto"] || req.protocol;
const protocol =
Expand Down

0 comments on commit a03c610

Please sign in to comment.