File tree 4 files changed +3082
-19
lines changed
4 files changed +3082
-19
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ const semverDiff = require('semver/functions/diff')
3
3
4
4
const { semanticVersionOrder } = require ( './getTargetInput' )
5
5
6
- const expression = / f r o m ( [ ^ \s ] + ) t o ( . + ) $ /
6
+ const expression = / f r o m ( [ ^ \s ] + ) t o ( [ ^ \s ] + ) /
7
7
8
8
const checkTargetMatchToPR = ( prTitle , target ) => {
9
9
const match = expression . exec ( prTitle )
Original file line number Diff line number Diff line change @@ -17,12 +17,16 @@ const preReleaseUpgradePRTitle =
17
17
const preReleaseToPathUpgradePRTitle =
18
18
'chore(deps-dev): bump fastify from 3.18.0-alpha to 3.18.2'
19
19
const sameVersion = 'chore(deps-dev): bump fastify from 3.18.0 to 3.18.0'
20
+ const patchPRTitleInSubDirectory = 'chore(deps-dev): bump fastify from 3.18.0 to 3.18.1 in /packages/a'
20
21
21
22
tap . test ( 'checkTargetMatchToPR' , async t => {
22
23
t . test ( 'should return true when target is major' , async t => {
23
24
t . test ( 'and PR is patch' , async t => {
24
25
t . ok ( checkTargetMatchToPR ( patchPRTitle , targetOptions . major ) )
25
26
} )
27
+ t . test ( 'and PR is patch in a subdirectory' , async t => {
28
+ t . ok ( checkTargetMatchToPR ( patchPRTitleInSubDirectory , targetOptions . major ) )
29
+ } )
26
30
t . test ( 'and PR is patch with pre-release version' , async t => {
27
31
t . ok ( checkTargetMatchToPR ( preReleaseUpgradePRTitle , targetOptions . major ) )
28
32
} )
You can’t perform that action at this time.
0 commit comments