Comparing version 11.3.0 to 11.3.1
@@ -57,2 +57,22 @@ import { Env, CISource } from "../ci_source"; | ||
* | ||
* If you are using DangerJS on GitHub Enteprise, you will need to set the Danger user ID to | ||
* the GitHub Actions bot. This will enable Danger to correctly comment and update on PRs. | ||
* | ||
* * ```yml | ||
* name: "Danger JS" | ||
* on: [pull_request] | ||
* | ||
* jobs: | ||
* build: | ||
* name: Danger JS | ||
* runs-on: ubuntu-latest | ||
* steps: | ||
* - uses: actions/checkout@v1 | ||
* - name: Danger | ||
* uses: danger/danger-js@9.1.6 | ||
* env: | ||
* GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
* DANGER_GHE_ACTIONS_BOT_USER_ID: *user_id* | ||
* ``` | ||
* | ||
* <!-- !JS --!> | ||
@@ -59,0 +79,0 @@ * <!-- Swift --!> |
@@ -62,2 +62,22 @@ "use strict"; | ||
* | ||
* If you are using DangerJS on GitHub Enteprise, you will need to set the Danger user ID to | ||
* the GitHub Actions bot. This will enable Danger to correctly comment and update on PRs. | ||
* | ||
* * ```yml | ||
* name: "Danger JS" | ||
* on: [pull_request] | ||
* | ||
* jobs: | ||
* build: | ||
* name: Danger JS | ||
* runs-on: ubuntu-latest | ||
* steps: | ||
* - uses: actions/checkout@v1 | ||
* - name: Danger | ||
* uses: danger/danger-js@9.1.6 | ||
* env: | ||
* GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
* DANGER_GHE_ACTIONS_BOT_USER_ID: *user_id* | ||
* ``` | ||
* | ||
* <!-- !JS --!> | ||
@@ -64,0 +84,0 @@ * <!-- Swift --!> |
@@ -91,2 +91,3 @@ #! /usr/bin/env node | ||
foundDSL = true; | ||
clearTimeout(missingDSLTimeout); | ||
dangerFile = (0, fileUtils_1.dangerfilePath)(commander_1.default); | ||
@@ -129,5 +130,5 @@ return [4 /*yield*/, (0, jsonToContext_1.jsonToContext)(jsonString, commander_1.default, source)]; | ||
// Add a timeout so that CI doesn't run forever if something has broken. | ||
setTimeout(function () { | ||
var missingDSLTimeout = setTimeout(function () { | ||
if (!foundDSL) { | ||
console.error(chalk_1.default.red("Timeout: Failed to get the Danger DSL after 1 second")); | ||
console.error(chalk_1.default.red("Timeout: Failed to get the Danger DSL after 10 second")); | ||
process.exitCode = 1; | ||
@@ -134,0 +135,0 @@ process.exit(1); |
@@ -1464,4 +1464,9 @@ // | ||
repo: string | ||
/** | ||
* The PR number | ||
* @deprecated use `pull_number` instead | ||
*/ | ||
number: number | ||
/** The PR number */ | ||
number: number | ||
pull_number: number | ||
} | ||
@@ -1565,3 +1570,3 @@ | ||
/** | ||
* Fails a build, outputting a specific reason for failing into a HTML table. | ||
* Highlights critical issues. Message is shown inside a HTML table. | ||
* | ||
@@ -1575,4 +1580,3 @@ * @param {MarkdownString} message the String to output | ||
/** | ||
* Highlights low-priority issues, but does not fail the build. Message | ||
* is shown inside a HTML table. | ||
* Highlights low-priority issues. Message is shown inside a HTML table. | ||
* | ||
@@ -1579,0 +1583,0 @@ * @param {MarkdownString} message the String to output |
@@ -390,4 +390,9 @@ import { GitCommit } from "./Commit"; | ||
repo: string; | ||
/** | ||
* The PR number | ||
* @deprecated use `pull_number` instead | ||
*/ | ||
number: number; | ||
/** The PR number */ | ||
number: number; | ||
pull_number: number; | ||
} | ||
@@ -394,0 +399,0 @@ export interface GitHubReviewers { |
@@ -66,2 +66,3 @@ "use strict"; | ||
number: pr.number, | ||
pull_number: pr.number, | ||
repo: pr.base.repo.name, | ||
@@ -68,0 +69,0 @@ owner: pr.base.repo.owner.login, |
@@ -187,3 +187,3 @@ "use strict"; | ||
this.getUserID = function () { return __awaiter(_this, void 0, void 0, function () { | ||
var perilID, info, useGitHubActionsID; | ||
var perilID, info, useGitHubActionsID, gheActionsID; | ||
return __generator(this, function (_a) { | ||
@@ -204,2 +204,6 @@ switch (_a.label) { | ||
if (useGitHubActionsID) { | ||
gheActionsID = process.env["DANGER_GHE_ACTIONS_BOT_USER_ID"]; | ||
if (gheActionsID) { | ||
return [2 /*return*/, parseInt(gheActionsID)]; | ||
} | ||
// This is the user.id of the github-actions app (https://github.com/apps/github-actions) | ||
@@ -210,2 +214,3 @@ // that is used to comment when using danger in a GitHub Action | ||
} | ||
this.d("Danger user ID is undefined."); | ||
return [2 /*return*/, undefined]; | ||
@@ -212,0 +217,0 @@ } |
@@ -24,3 +24,3 @@ import { DangerRuntimeContainer } from "../dsl/DangerResults"; | ||
/** | ||
* Fails a build, outputting a specific reason for failing into a HTML table. | ||
* Highlights critical issues. Message is shown inside a HTML table. | ||
* | ||
@@ -33,4 +33,3 @@ * @param {MarkdownString} message the String to output | ||
/** | ||
* Highlights low-priority issues, but does not fail the build. Message | ||
* is shown inside a HTML table. | ||
* Highlights low-priority issues. Message is shown inside a HTML table. | ||
* | ||
@@ -37,0 +36,0 @@ * @param {MarkdownString} message the String to output |
{ | ||
"name": "danger", | ||
"version": "11.3.0", | ||
"version": "11.3.1", | ||
"description": "Unit tests for Team Culture", | ||
@@ -5,0 +5,0 @@ "main": "distribution/danger.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1378721
21189
122