Skip to content

Commit

Permalink
Fix some of the Dangerfile warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Mar 21, 2017
1 parent d03ac40 commit 0993716
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Danger on Node, wonder what's going on? see [VISION.md](VISION.md)
*Welcome!*

So, what's the deal? Well, right now Danger JS does a lot of the simpler parts of [the Ruby version](http://danger.systems).
You can look at [Git](https://github.com/danger/danger-js/blob/master/source/dsl/GitDSL.ts) metadata, or [GitHub](https://github.com/danger/danger-js/blob/master/source/dsl/GitHubDSL.ts) metadata on Travis, Circle, Semaphore, Jenkins, Docker Cloud, Codeship or Drone.
You can look at [Git](https://github.com/danger/danger-js/blob/master/source/dsl/GitDSL.ts) metadata, or [GitHub](https://github.com/danger/danger-js/blob/master/source/dsl/GitHubDSL.ts) metadata on Travis CI, Circle CI, Semaphore, Jenkins, Docker Cloud, surf-build, Codeship or Drone.

Danger can fail your build, write a comment on GitHub, edit it as your PR changes and then delete it once you've passed review. Perfect.

Expand Down
7 changes: 4 additions & 3 deletions dangerfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if (currentDTS !== savedDTS) {
}

// Initial stab at starting a new dependency information rule
// Just starting simple
// Just starting simple by showing `yarn why {dep}` for now

schedule(async () => {
const packageDiff = await danger.git.JSONDiffForFile("package.json")
Expand All @@ -58,10 +58,11 @@ schedule(async () => {
const asJSON = usefulJSONContents.split("}\n{").join("},{")

const whyJSON = JSON.parse(`[${asJSON}]`) as any[]
const messages = whyJSON.filter(msg => typeof msg.data === "string")
markdown(`
### ${dep}
## ${dep}
${whyJSON.map(why => why.data).join("\n\n")}
${messages.join("\n\n - ")}
`)
})
}
Expand Down
2 changes: 1 addition & 1 deletion source/ci_source/providers/Semaphore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export class Semaphore implements CISource {
constructor(private readonly env: Env) {
}

get name(): string { return "Travis CI" }
get name(): string { return "Semaphore" }

get isCI(): boolean {
return ensureEnvKeysExist(this.env, ["SEMAPHORE"])
Expand Down

0 comments on commit 0993716

Please sign in to comment.