UNPKG

782 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
12module.exports = {
13 topic: 'ci',
14 command: 'list',
15 default: true,
16 needsApp: true,
17 needsAuth: true,
18 description: 'show the most recent runs',
19 help: 'display the most recent CI runs for the given pipeline',
20 flags: [
21 {
22 name: 'watch',
23 char: 'w',
24 hasValue: false,
25 description: 'keep running and watch for new and update tests'
26
27 }
28 ],
29 run: cli.command(co.wrap(run))
30}