Add a ping route for UptimeRobot

This commit is contained in:
Maciej Pędzich 2024-01-18 09:04:43 +01:00
parent 17034ee323
commit 1ec73fe016

View File

@ -1,11 +1,14 @@
import { Probot } from 'probot'; import { ApplicationFunction, Probot } from 'probot';
import getMetaData from 'metadata-scraper'; import getMetaData from 'metadata-scraper';
import { getPlaylistIdFromUrl } from './getPlaylistIdFromUrl'; import { getPlaylistIdFromUrl } from './getPlaylistIdFromUrl';
type ReviewEvent = 'REQUEST_CHANGES' | 'COMMENT' | 'APPROVE'; type ReviewEvent = 'REQUEST_CHANGES' | 'COMMENT' | 'APPROVE';
const appFn = (app: Probot) => { const appFn: ApplicationFunction = (app: Probot, { getRouter }) => {
const router = getRouter!('/ping');
router.get('/pong', (req, res) => res.sendStatus(200));
app.on( app.on(
['pull_request.opened', 'pull_request.synchronize'], ['pull_request.opened', 'pull_request.synchronize'],
async ({ payload, octokit, log }) => { async ({ payload, octokit, log }) => {