@toptal/davinci-ci 7.0.1-alpha-FX-4590-tailwind-resolution-58582a9f.8 → 7.0.1-alpha-B2-139-fe-update-config-file-to-accept-b-2-in-p-rs-934a3cee.16

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": "7.0.1-alpha-FX-4590-tailwind-resolution-58582a9f.8+58582a9f",
3
+ "version": "7.0.1-alpha-B2-139-fe-update-config-file-to-accept-b-2-in-p-rs-934a3cee.16+934a3cee",
4
4
  "keywords": [
5
5
  "ci",
6
6
  "docker",
@@ -30,7 +30,7 @@
30
30
  "dependencies": {
31
31
  "@commitlint/cli": "^17.6.7",
32
32
  "@commitlint/config-conventional": "^17.1.0",
33
- "@toptal/davinci-cli-shared": "2.3.10-alpha-FX-4590-tailwind-resolution-58582a9f.36+58582a9f",
33
+ "@toptal/davinci-cli-shared": "2.3.10-alpha-B2-139-fe-update-config-file-to-accept-b-2-in-p-rs-934a3cee.44+934a3cee",
34
34
  "chalk": "^4.1.2",
35
35
  "danger": "^11.2.2",
36
36
  "markdown-table": "^2.0.0"
@@ -41,5 +41,5 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "58582a9fe22cca40d15af20b6582a4fe76d52fc9"
44
+ "gitHead": "934a3ceedf8e9a7e79c8979545517b997db17b73"
45
45
  }
@@ -3,14 +3,15 @@ const WHITELISTED_USERS = [
3
3
  'dependabot[bot]',
4
4
  'toptal-devbot',
5
5
  ]
6
- const VALID_PR_CODE_REGEX = /\[[A-Z]{1,8}-.*]\s/
6
+ const VALID_PR_CODE_REGEX = /\[[A-Z][A-Z0-9]{0,7}-.*]\s/
7
7
  // Valid commit titles:
8
8
  // "Regular commit message"
9
9
  // "Commit with sentence. But does not end with a full-stop"
10
10
  // "[FOO-1234] Commit with prefix"
11
11
  // "[FOO] Prefix numbers can be omitted"
12
12
  // "[FOO][BAR] Prefixes can couple"
13
- const VALID_COMMIT_TITLE_REGEX = /^((\[[A-Z]+(-\d+)?])+ )?[A-Z]\w[^\n]*[^.]$/
13
+ const VALID_COMMIT_TITLE_REGEX =
14
+ /^((\[[A-Z][A-Z0-9]*(-\d+)?])+ )?[A-Z]\w[^\n]*[^.]$/
14
15
  const MAX_COMMIT_LINE_LENGTH = 79
15
16
  const ENGINEERING_DOCS_LINK =
16
17
  'https://toptal-core.atlassian.net/wiki/spaces/ENG/pages/210665897/Commit+Message+Quality'
@@ -112,6 +112,7 @@ describe('commit danger plugin', () => {
112
112
  '[FOO][BAR] Prefixes can couple',
113
113
  '[FOO-1234][BAR] Mixed prefixes',
114
114
  '[FOO-1234][BAR-123][BAZ] Everything. Together',
115
+ '[T1-123] Prefix with number',
115
116
  ])
116
117
  toptalCommits()
117
118
 
@@ -7,6 +7,7 @@ import {
7
7
  } from '../../config.cjs'
8
8
 
9
9
  const VALID_PR_TITLE = '[ASD-123] Hello world'
10
+ const VALID_PR_TITLE_WITH_NUMBER_IN_PREFIX = '[A1-123] Test'
10
11
  const INVALID_PR_TITLE = '[ASD-123] hello world'
11
12
  const NO_TICKET_CODE_PR_TITLE = 'Hello world'
12
13
 
@@ -39,6 +40,12 @@ describe('commit danger plugin', () => {
39
40
  toptalPRTitle()
40
41
 
41
42
  expect(global.fail).toHaveBeenCalledTimes(0)
43
+
44
+ global.danger.github.pr.title = VALID_PR_TITLE_WITH_NUMBER_IN_PREFIX
45
+
46
+ toptalPRTitle()
47
+
48
+ expect(global.fail).toHaveBeenCalledTimes(0)
42
49
  })
43
50
 
44
51
  it('should fail PR title with missing ticket code', () => {