Skip to content

Commit

Permalink
Update danger
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Aug 13, 2018
1 parent 7fa3a0d commit c1d6893
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"cookie": "^0.3.1",
"cookie-parser": "^1.4.3",
"cors": "^2.8.4",
"danger": "^3.8.4",
"danger": "^3.8.6",
"danger-plugin-yarn": "^1.3.0",
"dotenv": "^5.0.1",
"ejs": "^2.5.9",
Expand Down
8 changes: 7 additions & 1 deletion source/danger/append_peril.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import * as NodeGithub from "@octokit/rest"

import { PerilDSL } from "danger/distribution/dsl/DangerDSL"
import { GitHubUtilsDSL } from "danger/distribution/dsl/GitHubDSL"
import GitHubUtils, { createUpdatedIssueWithIDGenerator } from "danger/distribution/platforms/github/GitHubUtils"
import GitHubUtils, {
createOrAddLabel,
createUpdatedIssueWithIDGenerator,
} from "danger/distribution/platforms/github/GitHubUtils"
import { DangerContext } from "danger/distribution/runner/Dangerfile"
import { href, sentence } from "danger/distribution/runner/DangerUtils"

Expand Down Expand Up @@ -72,6 +75,9 @@ const recreateGitHubUtils = (api: NodeGithub): GitHubUtilsDSL => ({
},

createUpdatedIssueWithID: createUpdatedIssueWithIDGenerator(api),
// TODO: Is this right?
// Do I need to move the PR object into here if needed?
createOrAddLabel: createOrAddLabel(undefined as any, api),
})

/**
Expand Down
2 changes: 2 additions & 0 deletions source/danger/peril_platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { GitHubUtilsDSL } from "danger/distribution/dsl/GitHubDSL"

import { GitHubType } from "danger/distribution/platforms/GitHub"
import {
createOrAddLabel,
createUpdatedIssueWithIDGenerator,
fileContentsGenerator,
} from "danger/distribution/platforms/github/GitHubUtils"
Expand All @@ -25,6 +26,7 @@ export const getPerilPlatformForDSL = (type: RunType, github: GitHubType | null,
const utils: GitHubUtilsDSL | null = github && {
fileContents: fileContentsGenerator(github.api.getExternalAPI(), repoSlug, ref),
createUpdatedIssueWithID: createUpdatedIssueWithIDGenerator(github.api.getExternalAPI()),
createOrAddLabel: createOrAddLabel(undefined as any, github.api.getExternalAPI()),
// Not sure what this looks like for non-PR events
fileLinks: (paths, _, __, ___) => paths.join(", "),
}
Expand Down
14 changes: 7 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
core-js "^2.5.3"
regenerator-runtime "^0.11.1"

"@octokit/rest@^15.5.0":
version "15.6.0"
resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-15.6.0.tgz#2d4a9f9efd38513b606f3192d91bac216c1c6d94"
"@octokit/rest@^15.9.5":
version "15.9.5"
resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-15.9.5.tgz#e356d202bd0b517e381f705ad77d98ccb84e0c65"
dependencies:
before-after-hook "^1.1.0"
btoa-lite "^1.0.0"
Expand Down Expand Up @@ -2378,11 +2378,11 @@ danger-plugin-yarn@^1.3.0:
optionalDependencies:
esdoc "^0.5.2"

danger@^3.8.4:
version "3.8.4"
resolved "https://registry.yarnpkg.com/danger/-/danger-3.8.4.tgz#e84b8398a3b7dd5707d7628a833f529efa4d1354"
danger@^3.8.6:
version "3.8.6"
resolved "https://registry.yarnpkg.com/danger/-/danger-3.8.6.tgz#6760e17a191e0b0e5a255cc9389a0f303033950d"
dependencies:
"@octokit/rest" "^15.5.0"
"@octokit/rest" "^15.9.5"
babel-polyfill "^6.23.0"
chalk "^2.3.0"
commander "^2.13.0"
Expand Down

0 comments on commit c1d6893

Please sign in to comment.