mirror of
https://github.com/maciejpedzich/playlist-entry-validator.git
synced 2024-11-28 00:15:48 +01:00
Add a ping route for UptimeRobot
This commit is contained in:
parent
17034ee323
commit
1ec73fe016
7
appFn.ts
7
appFn.ts
@ -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 }) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user