add /builds/:pr/refresh for just re-rendering the comment

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2018-12-13 09:42:11 +01:00
parent 4860fb4a59
commit 50c8879a6f
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020

View File

@ -34,6 +34,11 @@ const App = (ghc) => {
}
})
router.post('/builds/:pr/refresh', async (ctx) => {
/* just re-render the comment */
await ghc.update(ctx.params.pr)
})
router.get('/builds/:pr', async (ctx) => {
/* TODO add validation of id parameter */
const builds = await ghc.db.getBuilds(ctx.params.pr)