1 | const cli = require('heroku-cli-util')
|
2 | const co = require('co')
|
3 | const api = require('../../lib/heroku-api')
|
4 | const RenderTestRuns = require('../../lib/render-test-runs')
|
5 |
|
6 | function* 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 |
|
12 | module.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 | }
|