@toptal/davinci-ci 2.0.5-alpha-SP-2807-move-naming-convention-to-overrides.14 → 2.0.5-alpha-SP-2753-add-danger-file-command-option.14
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 +3 -3
- package/src/commands/danger.js +13 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toptal/davinci-ci",
|
|
3
|
-
"version": "2.0.5-alpha-SP-
|
|
3
|
+
"version": "2.0.5-alpha-SP-2753-add-danger-file-command-option.14+317c7dd3",
|
|
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-
|
|
35
|
+
"@toptal/davinci-cli-shared": "1.5.5-alpha-SP-2753-add-danger-file-command-option.14+317c7dd3",
|
|
36
36
|
"danger": "^11.0.5",
|
|
37
37
|
"markdown-table": "^2.0.0"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "317c7dd36d80cc460057a0ceb3b45bf60db3f4bc"
|
|
40
40
|
}
|
package/src/commands/danger.js
CHANGED
|
@@ -15,12 +15,20 @@ const commandOptions = [
|
|
|
15
15
|
label: 'checks commit message quality locally',
|
|
16
16
|
name: '--local',
|
|
17
17
|
},
|
|
18
|
+
{
|
|
19
|
+
label: 'checks commit message quality locally',
|
|
20
|
+
name: '--local',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
label: 'specify custom danger file',
|
|
24
|
+
name: '--dangerfile',
|
|
25
|
+
},
|
|
18
26
|
]
|
|
19
27
|
|
|
20
28
|
const dangerCommand = ({ options }) => {
|
|
21
29
|
print.green('Running danger check...')
|
|
22
30
|
|
|
23
|
-
const { local, ...rest } = options
|
|
31
|
+
const { local, dangerfile, ...rest } = options
|
|
24
32
|
|
|
25
33
|
const conventionalCommitsDangerfilePath = files.getPackageFilePath(
|
|
26
34
|
'@toptal/davinci-ci',
|
|
@@ -31,9 +39,10 @@ const dangerCommand = ({ options }) => {
|
|
|
31
39
|
'src/configs/danger/toptal/dangerfile.js'
|
|
32
40
|
)
|
|
33
41
|
|
|
34
|
-
const dangerfilePath =
|
|
35
|
-
|
|
36
|
-
|
|
42
|
+
const dangerfilePath =
|
|
43
|
+
dangerfile ?? davinciProjectConfig.master.conventionalCommits
|
|
44
|
+
? conventionalCommitsDangerfilePath
|
|
45
|
+
: toptalCommitsDangerfilePath
|
|
37
46
|
|
|
38
47
|
runSync(
|
|
39
48
|
'yarn',
|