@toptal/davinci-ci 7.3.0 → 7.3.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +10 -0
- package/package.json +1 -1
- package/src/commands/danger.js +15 -19
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 7.3.1
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- [#2332](https://github.com/toptal/davinci/pull/2332) [`52995862`](https://github.com/toptal/davinci/commit/529958625a8bda2e74ef281a5ed0e6bfea109526) Thanks [@augustobmoura](https://github.com/augustobmoura)!
|
8
|
+
|
9
|
+
### davinci-ci danger
|
10
|
+
|
11
|
+
- check danger against `origin/master`
|
12
|
+
|
3
13
|
## 7.3.0
|
4
14
|
|
5
15
|
### Minor Changes
|
package/package.json
CHANGED
package/src/commands/danger.js
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
import {
|
2
2
|
davinciProjectConfig,
|
3
|
-
runSync,
|
4
3
|
print,
|
5
4
|
convertToCLIParameters,
|
6
5
|
files,
|
6
|
+
$,
|
7
|
+
echo,
|
8
|
+
chalk,
|
7
9
|
} from '@toptal/davinci-cli-shared'
|
8
|
-
import chalk from 'chalk'
|
9
10
|
|
10
|
-
export const dangerCommand = options => {
|
11
|
+
export const dangerCommand = async options => {
|
11
12
|
print.header('Running danger check')
|
12
13
|
const { local, dangerfile, ...rest } = options
|
13
14
|
const dangerfilePath =
|
@@ -18,25 +19,20 @@ export const dangerCommand = options => {
|
|
18
19
|
)
|
19
20
|
|
20
21
|
if (davinciProjectConfig.master.conventionalCommits) {
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
Convention commits are now discouraged, support for it on davinci have been removed. Please use toptal commits instead
|
22
|
+
const UNSUPPORTED = chalk.red('[UNSUPPORTED]')
|
23
|
+
|
24
|
+
echo(`${UNSUPPORTED} Since https://toptal-core.atlassian.net/wiki/x/YQFawQ`)
|
25
|
+
echo(
|
26
|
+
'Convention commits are now discouraged, support for it on davinci have been removed. Please use toptal commits instead.'
|
27
|
+
)
|
26
28
|
process.exit(10)
|
27
29
|
}
|
28
30
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
local ? '--failOnErrors' : undefined,
|
35
|
-
'--dangerfile',
|
36
|
-
`${dangerfilePath}`,
|
37
|
-
...convertToCLIParameters(rest),
|
38
|
-
].filter(Boolean)
|
39
|
-
)
|
31
|
+
const scope = local ? 'local' : 'ci'
|
32
|
+
const extraArgs = convertToCLIParameters(rest)
|
33
|
+
|
34
|
+
// We use --base origin/master in case local master is not up to date, or diverging from remote
|
35
|
+
await $`yarn -s danger ${scope} --dangerfile ${dangerfilePath} --base origin/master ${extraArgs}`
|
40
36
|
}
|
41
37
|
|
42
38
|
export const createDangerCommand = program => {
|