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
I am willing to provide a simple pull request to fix the following issue, and am opening an issue to get some initial feedback.
The default values used for the release_branches parameter are matched as substrings by default instead of an exact string and so in some cases where the letters "main" or "master" appear in a branch name, a release tag will be generated. An example would be the word "maintenance" which contains the word "main".
Although issues have a low chance of occurrence, it has occurred and has lead to wasted time troubleshooting.
Workaround and Solution
A workaround is possible by passing in the argument ^main$,^master$ when invoking the action, but we would prefer keeping as much default behaviour as possible.
The proposed solution is to change the default value of the parameter from "main,master" to "^main$,^master$".
Does this seem acceptable?
The text was updated successfully, but these errors were encountered:
I am willing to provide a simple pull request to fix the following issue, and am opening an issue to get some initial feedback.
The default values used for the
release_branches
parameter are matched as substrings by default instead of an exact string and so in some cases where the letters "main" or "master" appear in a branch name, a release tag will be generated. An example would be the word "maintenance" which contains the word "main".This is the referenced parameter: https://github.com/mathieudutour/github-tag-action/blob/master/action.yml#L42-L45
The described behaviour is due to the fact that the String.match method used to match branch names matches for a substring by default: https://github.com/mathieudutour/github-tag-action/blob/master/src/action.ts#L55-L57
Although issues have a low chance of occurrence, it has occurred and has lead to wasted time troubleshooting.
Workaround and Solution
A workaround is possible by passing in the argument
^main$,^master$
when invoking the action, but we would prefer keeping as much default behaviour as possible.The proposed solution is to change the default value of the parameter from
"main,master"
to"^main$,^master$"
.Does this seem acceptable?
The text was updated successfully, but these errors were encountered: