Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: danger/danger-js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4418fe3adfc0614f3664f82652f2119d6915f4b7
Choose a base ref
...
head repository: danger/danger-js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 54f7f7af44288b077fd3f8a29b9865a2d515dc91
Choose a head ref

Commits on Nov 19, 2021

  1. extend github api to send complete reviews

    Signed-off-by: Jonathan Burke <jonathan.burke@codecentric.de>
    Rouby committed Nov 19, 2021
    Copy the full SHA
    fb630ec View commit details

Commits on Jan 7, 2022

  1. Copy the full SHA
    68ab2e9 View commit details
  2. Copy the full SHA
    38a963e View commit details
  3. Copy the full SHA
    4804f80 View commit details
  4. Merge pull request #1176 from Rouby/patch-1

    Fix: [Github] Multiple Inline Comments on the same file/line should all be posted
    fbartho authored Jan 7, 2022
    Copy the full SHA
    d896baf View commit details

Commits on Jan 14, 2022

  1. Don't crash when danger.git.JSONDiffForFile encounters a moved JSON file

    Notably affects danger-plugin-yarn, when a package.json is moved
    
    Fixes: #1181
    Related: #481
    fbartho committed Jan 14, 2022
    Copy the full SHA
    99e19f7 View commit details

Commits on Jan 15, 2022

  1. Cleanup debug log

    Co-authored-by: Orta Therox <orta.therox@gmail.com>
    fbartho and orta authored Jan 15, 2022
    Copy the full SHA
    3411074 View commit details
  2. Merge pull request #1197 from danger/fb/fix-moved-json-crash

    Fix: [git] JSONDiffForFile when passed the path of a JSON File that was moved, crashes
    fbartho authored Jan 15, 2022
    Copy the full SHA
    a7355a3 View commit details

Commits on Jan 24, 2022

  1. Resolve node-fetch to 2.6.7

    jonny133 committed Jan 24, 2022
    Copy the full SHA
    ab77e3c View commit details
  2. Copy the full SHA
    0b5865f View commit details

Commits on Jan 25, 2022

  1. Copy the full SHA
    dc54972 View commit details

Commits on Jan 29, 2022

  1. Merge pull request #1198 from jonny133/jonny133-node-fetch-2_6_7

    Resolve node-fetch@^2.3.0 to 2.6.7 to fix security vulnerability GHSA-r683-j2x4-v87g
    orta authored Jan 29, 2022
    Copy the full SHA
    9049848 View commit details
  2. Copy the full SHA
    6303c88 View commit details
  3. Merge pull request #1201 from berlysia/adjust-structured-diff-return-…

    …value
    
    make structuredDiffForFile for BitBucketServer the same as the others
    orta authored Jan 29, 2022
    Copy the full SHA
    fb66c81 View commit details
  4. Copy the full SHA
    06928e3 View commit details
  5. Prepare for release

    orta committed Jan 29, 2022
    Copy the full SHA
    34fe471 View commit details
  6. Release 10.9.0

    orta committed Jan 29, 2022
    Copy the full SHA
    202d727 View commit details

Commits on Feb 1, 2022

  1. Copy the full SHA
    e22faa1 View commit details
  2. Bump TypeScript from v3.9.7 to v4.5.5

    I intended to use 'type' imports & optional-chaining / null coalescing features, so I upgraded TS, but unfortunately, those features can't be used in this repo until tslint is replaced with ESLint
    fbartho committed Feb 1, 2022
    Copy the full SHA
    0253cf2 View commit details
  3. Copy the full SHA
    50ae51c View commit details
  4. Use published memfs

    orta committed Feb 1, 2022
    Copy the full SHA
    248f8c1 View commit details
  5. Copy the full SHA
    fbac092 View commit details
  6. Merge pull request #1204 from danger/fb/bump-octokit-rest

    Upgrade @octokit/rest from v16.43.1 to v18.12.0 - Fixes #1202
    orta authored Feb 1, 2022
    Copy the full SHA
    fff2201 View commit details
  7. Prepare for release

    orta committed Feb 1, 2022
    Copy the full SHA
    65130b5 View commit details
  8. Release 11.0.0

    orta committed Feb 1, 2022
    Copy the full SHA
    0dd1379 View commit details
  9. Copy the full SHA
    8655391 View commit details
  10. Copy the full SHA
    d1119d3 View commit details
  11. More version faff

    orta committed Feb 1, 2022
    Copy the full SHA
    91c0c94 View commit details
  12. Release 11.0.2

    orta committed Feb 1, 2022
    Copy the full SHA
    5d5db62 View commit details
  13. Create SECURITY.md

    orta authored Feb 1, 2022
    Copy the full SHA
    1047571 View commit details
  14. chore: Switch from tslint to eslint

    tslint is end-of-life, and warns when you install it. Additionally, the version we were on didn't support 'import type' expressions, as well as optional-chaining & null coalescing when I tried to use those in #1204
    
    This PR does update a bunch of tslint-disable comments, but otherwise tries to minimally change runtime source in danger-js. If we want to tighten the eslint rules, I'd be super supportive, but I didn't want to cause a ton of thrash, so mostly the rules that are enabled are the ones that don't trigger on tons of existing code.
    fbartho committed Feb 1, 2022
    Copy the full SHA
    3cee6a0 View commit details
  15. Copy the full SHA
    bc614e7 View commit details
  16. Copy the full SHA
    b66f86f View commit details
  17. Copy the full SHA
    8322ffa View commit details

Commits on Feb 2, 2022

  1. Merge pull request #1205 from danger/fb/eslint

    chore: Switch from tslint to eslint
    orta authored Feb 2, 2022
    Copy the full SHA
    a6b40e9 View commit details

Commits on Feb 5, 2022

  1. Copy the full SHA
    e5445e4 View commit details
  2. Merge pull request #1206 from majd/fix/packaging

    Build package after bumping version
    orta authored Feb 5, 2022
    Copy the full SHA
    1822fe1 View commit details

Commits on Mar 15, 2022

  1. Print default base branch for danger local

    This uses commander default argument value
    glensc authored Mar 15, 2022
    Copy the full SHA
    c12bab1 View commit details
  2. Merge pull request #1251 from danger/glensc-patch-1

    Print default base branch for danger local
    orta authored Mar 15, 2022
    Copy the full SHA
    d313d16 View commit details

Commits on Mar 16, 2022

  1. Copy the full SHA
    3d5a96e View commit details
  2. Merge pull request #1252 from glensc/package-engine.node

    Specify engine required by this package
    orta authored Mar 16, 2022
    Copy the full SHA
    9337fac View commit details

Commits on Mar 18, 2022

  1. Remove implict git add when running pre-commit hooks

    This breaks intended behavior of adding to commit unstaged changes
    glensc committed Mar 18, 2022
    Copy the full SHA
    16145a4 View commit details
  2. Update lint staged to 12

    glensc committed Mar 18, 2022
    Copy the full SHA
    b5134fb View commit details
  3. Bump node engine to 14

    glensc committed Mar 18, 2022
    Copy the full SHA
    56e6dd5 View commit details
  4. Copy the full SHA
    c657a92 View commit details
  5. Copy the full SHA
    a2b7623 View commit details
  6. Copy the full SHA
    57b69c2 View commit details
  7. Copy the full SHA
    253f8db View commit details
  8. Fix broken linking in changelog

    The used syntax override the linking, but it was intended to list there
    multiple user handles
    
    verified this by inspecting commit messages in the version range
    glensc committed Mar 18, 2022
    Copy the full SHA
    de086ba View commit details

Commits on Mar 22, 2022

  1. Merge pull request #1257 from glensc/node-14-engine

    Bump node engine to 14
    orta authored Mar 22, 2022
    Copy the full SHA
    6fc510f View commit details
Showing with 144,537 additions and 3,218 deletions.
  1. +3 −1 .babelrc
  2. +0 −24 .circleci/config.yml
  3. +2 −0 .eslintignore
  4. +66 −0 .eslintrc.js
  5. +6 −2 .github/workflows/CI.yml
  6. +56 −0 .github/workflows/release.yml
  7. +1 −0 .gitignore
  8. +1 −0 .prettierignore
  9. +7 −6 .release-it.json
  10. +0 −10 .travis-just-danger.yml
  11. +0 −75 .travis.yml
  12. +1 −0 .vscode/extensions.json
  13. +154 −30 CHANGELOG.md
  14. +2 −2 CONTRIBUTING.md
  15. +1 −1 Dockerfile
  16. +3 −3 README.md
  17. +9 −0 SECURITY.md
  18. +1 −1 VISION.md
  19. +1 −1 appveyor.yml
  20. +4 −2 dangerfile.ts
  21. +3 −3 docs/guides/the_dangerfile.html.md
  22. +1 −1 docs/issue_template.md
  23. +7 −12 docs/tutorials/dependencies.html.md
  24. +7 −11 docs/tutorials/node-library.html.md
  25. +2 −2 docs/tutorials/transpilation.html.md
  26. +1 −1 docs/usage/danger-process.html.md
  27. +5 −0 docs/usage/gitlab.html.md
  28. +46 −38 package.json
  29. +1 −1 scripts/create-danger-dts.ts
  30. +43 −14 scripts/create-homebrew-tap-pr.sh
  31. +10 −13 scripts/danger-dts.ts
  32. +10 −10 scripts/run-fixtures.js
  33. +0 −2 source/ambient.d.ts
  34. +6 −6 source/api/_tests/fetch.test.ts
  35. +6 −6 source/api/fetch.ts
  36. +2 −1 source/ci_source/get_ci_source.ts
  37. +24 −22 source/ci_source/providers/Bamboo.ts
  38. +3 −3 source/ci_source/providers/CodeBuild.ts
  39. +1 −1 source/ci_source/providers/GitHubActions.ts
  40. +1 −1 source/ci_source/providers/GitLabCI.ts
  41. +1 −0 source/ci_source/providers/_tests/_bamboo.test.ts
  42. +1 −0 source/ci_source/providers/_tests/_buddyWorks.test.ts
  43. +15 −3 source/ci_source/providers/_tests/_codebuild.test.ts
  44. +4 −2 source/ci_source/providers/_tests/_gitHubActions.test.ts
  45. +47 −0 source/ci_source/providers/_tests/_gitlab.test.ts
  46. +1 −0 source/commands/ci/_tests/runner.test.ts
  47. +2 −2 source/commands/ci/runner.ts
  48. +2 −2 source/commands/danger-local.ts
  49. +2 −2 source/commands/danger-process.ts
  50. +5 −7 source/commands/danger-runner.ts
  51. +3 −3 source/commands/init/default-dangerfile.ts
  52. +3 −3 source/commands/init/interfaces.ts
  53. +2 −2 source/commands/init/state-setup.ts
  54. +8 −2 source/commands/utils/_tests/dangerRunToRunnerCLI.test.ts
  55. +12 −6 source/commands/utils/runDangerSubprocess.ts
  56. +139,121 −0 source/danger-incoming-process-schema.json
  57. +83 −0 source/danger-outgoing-process-schema.json
  58. +44 −18 source/danger.d.ts
  59. +33 −15 source/dsl/DangerResults.ts
  60. +2 −1 source/dsl/GitDSL.ts
  61. +12 −0 source/dsl/GitHubDSL.ts
  62. +11 −15 source/dsl/GitLabDSL.ts
  63. +2 −2 source/dsl/_tests/DangerResults.test.ts
  64. +3 −1 source/dsl/_tests/__snapshots__/DangerResults.test.ts.snap
  65. +0 −24 source/https-proxy-agent.d.ts
  66. +1 −1 source/platforms/BitBucketCloud.ts
  67. +3 −1 source/platforms/BitBucketServer.ts
  68. +5 −0 source/platforms/FakePlatform.ts
  69. +8 −1 source/platforms/GitHub.ts
  70. +76 −41 source/platforms/GitLab.ts
  71. +2 −1 source/platforms/LocalGit.ts
  72. +1 −0 source/platforms/_tests/_bitbucket_cloud.test.ts
  73. +2 −1 source/platforms/_tests/_bitbucket_server.test.ts
  74. +2 −1 source/platforms/_tests/_github.test.ts
  75. +132 −0 source/platforms/_tests/_gitlab.test.ts
  76. +1 −2 source/platforms/_tests/_platform.test.ts
  77. +2 −2 source/platforms/_tests/_pull_request_parser.test.ts
  78. +5 −5 source/platforms/bitbucket_cloud/BitBucketCloudAPI.ts
  79. +3 −3 source/platforms/bitbucket_cloud/_tests_/_bitbucket_cloud_api.test.ts
  80. +9 −5 source/platforms/bitbucket_cloud/_tests_/_bitbucket_cloud_git.test.ts
  81. +4 −4 source/platforms/bitbucket_server/BitBucketServerAPI.ts
  82. +44 −11 source/platforms/bitbucket_server/BitBucketServerGit.ts
  83. +37 −22 source/platforms/bitbucket_server/_tests/__snapshots__/_bitbucket_server_git.test.ts.snap
  84. +73 −1 source/platforms/bitbucket_server/_tests/_bitbucket_server_api.test.ts
  85. +9 −5 source/platforms/bitbucket_server/_tests/_bitbucket_server_git.test.ts
  86. +1 −1 source/platforms/git/_tests/localLogGitCommits.test.ts
  87. +1 −0 source/platforms/git/_tests/local_dangerfile_example.ts
  88. +32 −37 source/platforms/git/gitJSONToGitDSL.ts
  89. +11 −11 source/platforms/git/localGetCommits.ts
  90. +8 −7 source/platforms/git/localGetDiff.ts
  91. +4 −4 source/platforms/git/localLogGitCommits.ts
  92. +42 −18 source/platforms/github/GitHubAPI.ts
  93. +32 −9 source/platforms/github/GitHubUtils.ts
  94. +3 −3 source/platforms/github/_tests/_customGitHubRequire.test.ts
  95. +23 −6 source/platforms/github/_tests/_github_api.test.ts
  96. +3 −2 source/platforms/github/_tests/_github_git.test.ts
  97. +6 −6 source/platforms/github/_tests/_github_utils.test.ts
  98. +1 −1 source/platforms/github/_tests/fixturedGitHubDSL.ts
  99. +1 −1 source/platforms/github/comms/checks/resultsToCheck.ts
  100. +14 −0 source/platforms/github/comms/issueCommenter.ts
  101. +55 −71 source/platforms/gitlab/GitLabAPI.ts
  102. +67 −3 source/platforms/gitlab/_tests/_gitlab_api.test.ts
  103. +1 −0 source/platforms/gitlab/_tests/_gitlab_git.test.ts
  104. +30 −0 source/platforms/gitlab/_tests/fixtures/getFileContents.json
  105. +92 −0 source/platforms/gitlab/_tests/fixtures/getMergeRequestDiscussions.json
  106. +341 −0 source/platforms/gitlab/_tests/fixtures/updateMergeRequestInfo.json
  107. +2 −0 source/platforms/platform.ts
  108. +75 −27 source/runner/Executor.ts
  109. +75 −12 source/runner/_tests/_executor.test.ts
  110. +0 −2 source/runner/_tests/fixtures/__DangerfileAsync.ts
  111. +2 −2 source/runner/_tests/fixtures/__DangerfileTypeScript.ts
  112. +1 −0 source/runner/dangerDSLJSON.ts
  113. +1 −1 source/runner/jsonToDSL.ts
  114. +1 −1 source/runner/runners/inline.ts
  115. +2 −1 source/runner/runners/utils/_tests/_transpiler.test.ts
  116. +8 −8 source/runner/runners/utils/transpiler.ts
  117. +4 −0 tsconfig.spec.json
  118. +3,263 −2,461 yarn.lock
4 changes: 3 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"presets": [["@babel/preset-env", { "targets": { "node": "6" }, "useBuiltIns": "usage" }]],
"presets": [
["@babel/preset-env", { "useBuiltIns": "usage", "corejs": "3.8", "exclude": ["transform-typeof-symbol"] }]
],
"plugins": ["@babel/plugin-transform-flow-strip-types"]
}
24 changes: 0 additions & 24 deletions .circleci/config.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source/danger.d.ts
source/runner/_tests/fixtures/*.ts
66 changes: 66 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
module.exports = {
env: {
browser: true,
es6: true,
node: true,
},
extends: ["plugin:@typescript-eslint/recommended", "plugin:jest/recommended", "prettier"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: "tsconfig.spec.json",
sourceType: "module",
},
plugins: ["eslint-plugin-jest", "eslint-plugin-jsdoc", "@typescript-eslint"],
rules: {
"@typescript-eslint/naming-convention": "error",
"@typescript-eslint/no-empty-function": "error",
"@typescript-eslint/no-unused-expressions": "error",

// Something is grumpy about these rules re: node imports - TODO
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-var-requires": "off",

curly: "error",
"jsdoc/check-alignment": "error",
"jsdoc/check-indentation": "off",
"jsdoc/newline-after-description": "off",
"no-empty": "error",
// This is used intentionally in a bunch of ci_source/providers
"no-empty-function": "off",
"no-redeclare": "error",
"no-var": "error",
// There are a bunch of existing uses of 'let' where this rule would trigger
"prefer-const": "off",

// This project has a ton of interacting APIs, and sometimes it's helpful to be explicit, even if the type is trivial
"@typescript-eslint/no-inferrable-types": "off",

"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": "error",

"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
// Allow function args to be unused
args: "none",
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],

"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/prefer-to-have-length": "off",
"jest/valid-expect": "error",
"@typescript-eslint/no-non-null-assertion": "off",
// Tons of violations in the codebase
"@typescript-eslint/naming-convention": "off",
// Used liberally in the codebase
"@typescript-eslint/no-explicit-any": "off",
// This has value in communicating with other Developers even if it has no functional effect.
"@typescript-eslint/no-empty-interface": "off",
},
}
8 changes: 6 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-node@v2
with:
node-version: '14'
node-version: "14"

# Get local dependencies & test
- run: yarn install
@@ -27,7 +27,11 @@ jobs:
# if it becomes an issue.
- run: echo "Testing Flow definition file"
- run: yarn build:flow-types
# - run: yarn flow check

- run: echo "Running built Danger"
- run: node distribution/commands/danger-ci.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- run: 'echo "This is only for Integration tests on two blank projects"'

56 changes: 56 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Release executable files for macOS

on:
workflow_dispatch:
inputs:
version:
description: "Version to deploy assets for"
required: true

jobs:
release:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_DEPLOY_SECRET_KEY: ${{ secrets.HOMEBREW_TAP_DEPLOY_SECRET_KEY }}
permissions: write-all
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Install ldid
uses: MOZGIII/install-ldid-action@v1
with:
tag: v2.1.5-procursus6

- name: Check out repository code
uses: actions/checkout@v3

- name: Use node
uses: actions/setup-node@v3
with:
node-version: "14"

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Tell release-it to do the GitHub release here
run:
node -e 'const fs = require("fs"); const a = JSON.parse(fs.readFileSync("./.release-it.json", "utf8"));
a.github.release = true; a.hooks["after:bump"] = a.hooks["_after:bump"]; a.hooks["after:release"] =
a.hooks["_after:release"]; fs.writeFileSync("./.release-it.json", JSON.stringify(a))'

- name: Package
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
npm run release -- ${{ github.event.inputs.version }} --no-npm --ci
- name: Update homebrew/tap repo for new release
shell: bash
run: scripts/create-homebrew-tap-pr.sh
env:
VERSION: ${{ env.VERSION }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -58,3 +58,4 @@ tests.json
.idea

/*.sh
.DS_Store
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -2,3 +2,4 @@ source/danger-outgoing-process-schema.json
source/danger-incoming-process-schema.json
source/platforms/_tests/fixtures/bbs-dsl-input.json
source/platforms/_tests/fixtures/bbc-dsl-input.json
CHANGELOG.md
13 changes: 7 additions & 6 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"github": {
"release": true,
"assets": "brew-distribution/*.zip"
},
"buildCommand": "yarn package",
"_": "CI will switch the release here to true",
"github": { "release": false, "assets": "brew-distribution/*.zip" },
"buildCommand": "yarn package:x64; yarn package:arm64",
"hooks": {
"before:bump": "yarn declarations; yarn build:schemas",
"after:release": "VERSION=${version} scripts/create-homebrew-tap-pr.sh"
"after:release": "gh workflow run .github/workflows/release.yml version=${version}",
"_": "CI will remove the _ from both of the below lines",
"_after:bump": "yarn package:x64; yarn package:arm64",
"_after:release": "export VERSION=${version}; echo 'VERSION=${version}' >> $GITHUB_ENV"
}
}
10 changes: 0 additions & 10 deletions .travis-just-danger.yml

This file was deleted.

75 changes: 0 additions & 75 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
"recommendations": [
"Orta.vscode-jest",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"christian-kohler.path-intellisense",
"wayou.vscode-todo-highlight"
]
Loading