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
The problem is that regexes does not work for types, because types.includes(result.type) is used for the check.
Describe the solution you'd like
I would want to treat types as regexes:
functionisUnknownType(type){for(typeoftypes){constregex=newRegExp(type);if(regex.test(result.type)){returnfalse;}}returntrue;}...if(isUnknownType(result.type)){raiseError(`Unknown release type "${result.type}" found in pull request title "${prTitle}". \n\n${printAvailableTypes()}`);}
Is your feature request related to a problem? Please describe.
I am using custom regex for allowed types:
As I understand I need to list all available types. But some of the types are regexes. The list looks like this:
The problem is that regexes does not work for types, because
types.includes(result.type)
is used for the check.Describe the solution you'd like
I would want to treat types as regexes:
I have a working code in forked repository:
https://github.com/amannn/action-semantic-pull-request/compare/main...sidlatau:regex-title?expand=1
Would it be possible/useful for others to add such functionality in this action? Or maybe there is an other way how to do it without code changes?
The text was updated successfully, but these errors were encountered: