File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -4,15 +4,15 @@ const github = require('@actions/github');
4
4
try {
5
5
const issuekey = core . getInput ( 'issuekey' ) . toLowerCase ( ) . replace ( / / g, '' )
6
6
const keyarr = issuekey . split ( ',' )
7
+ if ( github . context . payload && github . context . payload . pull_request ) {
8
+ var title = github . context . payload . pull_request . title
9
+ title = title . toLowerCase ( )
10
+ }
11
+ core . info ( title )
7
12
var passed = false
8
13
for ( let i = 0 ; i < keyarr . length ; i ++ ) {
9
14
const pattern = '^(build|ci|chore|docs|feat|fix|perf|refactor|revert|style|task|test)(.*)(:\\s)(' + keyarr [ i ] + '-\\d+\\s*|none)+(:)'
10
15
const regex = new RegExp ( pattern )
11
- if ( github . context . payload && github . context . payload . pull_request ) {
12
- var title = github . context . payload . pull_request . title
13
- title = title . toLowerCase ( )
14
- }
15
- core . info ( title )
16
16
if ( regex . test ( title ) ) {
17
17
passed = true
18
18
}
You can’t perform that action at this time.
0 commit comments