@toptal/davinci-ci 2.0.5-alpha-SP-2807-move-naming-convention-to-overrides.17 → 2.0.5-alpha-SP-2753-add-danger-file-command-option.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toptal/davinci-ci",
3
- "version": "2.0.5-alpha-SP-2807-move-naming-convention-to-overrides.17+e8b07018",
3
+ "version": "2.0.5-alpha-SP-2753-add-danger-file-command-option.15+4d4e5fa5",
4
4
  "description": "Continuos integrations tools for frontend projects",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -32,9 +32,9 @@
32
32
  "dependencies": {
33
33
  "@commitlint/cli": "^17.0.2",
34
34
  "@commitlint/config-conventional": "^17.0.2",
35
- "@toptal/davinci-cli-shared": "1.5.5-alpha-SP-2807-move-naming-convention-to-overrides.17+e8b07018",
35
+ "@toptal/davinci-cli-shared": "1.5.5-alpha-SP-2753-add-danger-file-command-option.15+4d4e5fa5",
36
36
  "danger": "^11.0.5",
37
37
  "markdown-table": "^2.0.0"
38
38
  },
39
- "gitHead": "e8b07018e30fc654d7f6d3f84987ab7884fc4dbd"
39
+ "gitHead": "4d4e5fa56e5775c65a8da7456c9979516428bc51"
40
40
  }
@@ -15,12 +15,16 @@ const commandOptions = [
15
15
  label: 'checks commit message quality locally',
16
16
  name: '--local',
17
17
  },
18
+ {
19
+ label: 'specify custom danger file',
20
+ name: '--dangerfile',
21
+ },
18
22
  ]
19
23
 
20
24
  const dangerCommand = ({ options }) => {
21
25
  print.green('Running danger check...')
22
26
 
23
- const { local, ...rest } = options
27
+ const { local, dangerfile, ...rest } = options
24
28
 
25
29
  const conventionalCommitsDangerfilePath = files.getPackageFilePath(
26
30
  '@toptal/davinci-ci',
@@ -31,9 +35,15 @@ const dangerCommand = ({ options }) => {
31
35
  'src/configs/danger/toptal/dangerfile.js'
32
36
  )
33
37
 
34
- const dangerfilePath = davinciProjectConfig.master.conventionalCommits
35
- ? conventionalCommitsDangerfilePath
36
- : toptalCommitsDangerfilePath
38
+ let dangerfilePath = dangerfile
39
+
40
+ print.green(`Display danger file dangerfilePath -- : ${dangerfilePath}`)
41
+
42
+ if (!dangerfilePath) {
43
+ dangerfilePath = davinciProjectConfig.master.conventionalCommits
44
+ ? conventionalCommitsDangerfilePath
45
+ : toptalCommitsDangerfilePath
46
+ }
37
47
 
38
48
  runSync(
39
49
  'yarn',