Socket
Socket
Sign inDemoInstall

danger

Package Overview
Dependencies
Maintainers
3
Versions
320
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

danger - npm Package Compare versions

Comparing version 11.3.0 to 11.3.1

20

distribution/ci_source/providers/GitHubActions.d.ts

@@ -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 --!>

5

distribution/commands/danger-runner.js

@@ -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);

12

distribution/danger.d.ts

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc