You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: action.yml
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,9 @@ inputs:
17
17
requireScope:
18
18
description: "Configure that a scope must always be provided."
19
19
required: false
20
+
disallowScopes:
21
+
description: 'Configure which scopes are disallowed in PR titles.'
22
+
required: false
20
23
subjectPattern:
21
24
description: "Configure additional validation for the subject based on a regex. E.g. '^(?![A-Z]).+$' ensures the subject doesn't start with an uppercase character."
Copy file name to clipboardExpand all lines: src/validatePrTitle.js
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ module.exports = async function validatePrTitle(
11
11
types,
12
12
scopes,
13
13
requireScope,
14
+
disallowScopes,
14
15
subjectPattern,
15
16
subjectPatternError,
16
17
headerPattern,
@@ -46,6 +47,10 @@ module.exports = async function validatePrTitle(
46
47
returnscopes&&!scopes.includes(s);
47
48
}
48
49
50
+
functionisDisallowedScope(s){
51
+
returndisallowScopes&&disallowScopes.includes(s);
52
+
}
53
+
49
54
if(!result.type){
50
55
thrownewError(
51
56
`No release type found in pull request title "${prTitle}". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/\n\n${printAvailableTypes()}`
@@ -76,6 +81,7 @@ module.exports = async function validatePrTitle(
0 commit comments