UNPKG

826 BJavaScriptView Raw
1const cli = require('heroku-cli-util')
2const co = require('co')
3const api = require('../../lib/heroku-api')
4const RenderTestRuns = require('../../lib/render-test-runs')
5
6function* run (context, heroku) {
7 const coupling = yield api.pipelineCoupling(heroku, context.app)
8
9 return yield RenderTestRuns.render(coupling.pipeline, { heroku, watch: context.flags.watch })
10}
11
12const cmd = {
13 topic: 'ci',
14 needsApp: true,
15 needsAuth: true,
16 description: 'show the most recent runs',
17 help: 'display the most recent CI runs for the given pipeline',
18 flags: [
19 {
20 name: 'watch',
21 char: 'w',
22 hasValue: false,
23 description: 'keep running and watch for new and update tests'
24
25 }
26 ],
27 run: cli.command(co.wrap(run))
28}
29
30module.exports = [
31 cmd,
32 Object.assign({ command: 'list', hidden: true }, cmd)
33]