Skip to content

Commit

Permalink
Prepare for release
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed May 19, 2018
1 parent 0f46cea commit 3c0970c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 194 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ matrix:
- node_js: '7'
script:
- echo "This is only for Integration tests on two blank projects"
getReviewInfo = (): Promise<GitHubPRDSL> => this.api.getPullRequestInfo() - yarn build
- yarn build
- mkdir danger_blank_test
- cd danger_blank_test
- yarn init --yes
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

## Master

# 3.7.0

* Adds support for the GH Checks API.

This brings some interesting architectural changes inside Danger, but more important to you dear reader, is that using
Expand Down
17 changes: 0 additions & 17 deletions jsconfig.json

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "danger",
"version": "3.6.6",
"version": "3.7.0",
"description": "Unit tests for Team Culture",
"main": "distribution/danger.js",
"typings": "distribution/danger.d.ts",
Expand Down
166 changes: 0 additions & 166 deletions source/platforms/github/comms/checks/types.ts

This file was deleted.

11 changes: 2 additions & 9 deletions source/platforms/github/comms/checksCommenter.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
// import * as debug from "debug"
import { PlatformCommunicator } from "../../platform"
import { GitHubAPI } from "../GitHubAPI"
import { DangerResults } from "../../../dsl/DangerResults"
import { ExecutorOptions } from "../../../runner/Executor"
import { resultsToCheck } from "./checks/resultsToCheck"
import { getAccessTokenForInstallation } from "./checks/githubAppSupport"

// See https://github.com/auth0/node-jsonwebtoken/issues/162
const JWT_REGEX = /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/

// const d = debug("danger:GitHub::Checks")

export const getAuthWhenUsingDangerJSApp = () => {
const appID = "12316"
const key =
Expand All @@ -37,8 +31,8 @@ export const getCustomAppAuthFromEnv = () => {
}

const canUseChecks = (token: string | undefined) => {
// Is it a JWT from Peril, basically?
if (token && token.match(JWT_REGEX)) {
// An access token for an app looks like: v1.a06e8953d69edf05f06d61ab016ee80ab4b088ca
if (token && token.startsWith("v1.")) {
return true
}
// Are you using a custom GH app manually?
Expand Down Expand Up @@ -70,7 +64,6 @@ export const GitHubChecksCommenter = (api: GitHubAPI): PlatformCommunicator | un
supportsHandlingResultsManually: () => true,

handlePostingResults: async (results: DangerResults, options: ExecutorOptions) => {
console.log("Using Checks")
const pr = await api.getPullRequestInfo()

let octokit
Expand Down

0 comments on commit 3c0970c

Please sign in to comment.