Skip to content

Commit

Permalink
Merged by Peril
Browse files Browse the repository at this point in the history
Adds more logs to danger process
  • Loading branch information
peril-staging[bot] committed May 6, 2018
2 parents 438c71b + a52b974 commit f94cc13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -14,6 +14,7 @@
## Master

* Fix setting the status url on bitbucket [@orta][]
* Adds more logs to `danger process` [@orta][]

# 3.6.4

Expand Down
6 changes: 5 additions & 1 deletion source/commands/danger-process.ts
Expand Up @@ -12,6 +12,9 @@ import getRuntimeCISource from "./utils/getRuntimeCISource"
import inlineRunner from "../runner/runners/inline"
import { jsonDSLGenerator } from "../runner/dslGenerator"

import * as debug from "debug"
const d = debug("danger:process")

// Given the nature of this command, it can be tricky to test, so I use a command like this:
//
// env DANGER_GITHUB_API_TOKEN='xxx' DANGER_FAKE_CI="YEP" DANGER_TEST_REPO='artsy/eigen' DANGER_TEST_PR='2408'
Expand Down Expand Up @@ -72,13 +75,14 @@ getRuntimeCISource(app).then(source => {
jsonOnly: false,
dangerID: app.id || "default",
}

d("Config: ", config)
jsonDSLGenerator(platform).then(dangerJSONDSL => {
if (!subprocessName) {
// Just pipe it out to the CLI
const processInput = prepareDangerDSL(dangerJSONDSL)
process.stdout.write(processInput)
} else {
d(`Sending input To ${subprocessName}: `, dangerJSONDSL)
const exec = new Executor(source, platform, inlineRunner, config)
runDangerSubprocess([subprocessName], dangerJSONDSL, exec)
}
Expand Down

0 comments on commit f94cc13

Please sign in to comment.