fix(extensions): underscores are invalid in prerelease#174
fix(extensions): underscores are invalid in prerelease#174roxspring wants to merge 8 commits intoFigureTechnologies:mainfrom
Conversation
There was a problem hiding this comment.
Hi there! Thank you so much for your contribution and fixing this bug! I just have one tiny ask and I'd be happy to run this through and get a release cut soon. Actually, it looks like I was able to easily make this change. Let me get this run through here and get a new release out!
Looks like there is an issue with cross user branches. I will have to look at this later when I have more time.
| const val R_REMOTES_ORIGIN = "$R_REMOTES$DEFAULT_REMOTE_NAME" | ||
|
|
||
| private val validCharacters: Regex = """[^0-9A-Za-z\-_.]+""".toRegex() | ||
| private val validCharacters: Regex = """[^0-9A-Za-z\-.]+""".toRegex() |
There was a problem hiding this comment.
Could you rename this to invalidSemverCharacters? Reading back over this didn't make much sense to me why we would be trying to replace all "valid characters" with - 😅
| private val validCharacters: Regex = """[^0-9A-Za-z\-.]+""".toRegex() | |
| private val invalidSemverCharacters: Regex = """[^0-9A-Za-z\-.]+""".toRegex() |
There was a problem hiding this comment.
Yeah, I also spent too long trying to figure out whether that was a list of the valid vs invalid characters. Renaming the val should make that a little clearer.
There was a problem hiding this comment.
Actually... validCharacters is referenced again a few lines down which will also need updating to invalidSemverCharacters.
There was a problem hiding this comment.
Good call! I overlooked that. Thanks!
src/main/kotlin/com/figure/gradle/semver/internal/extensions/RefExtensions.kt
Outdated
Show resolved
Hide resolved
|
@roxspring I ended up having to bring this branch (relevant PR) into the repository itself since I'm having issues with cross-repo pull requests at the moment. I have to look into that issue. You can find this fix published in 2.0.4. Thank you again for your contributions! |
When using GitHub Actions & Dependabot I've been hitting the following:
IIUC this boils down to an
_being contributed to the prerelease label which clearly is not a valid character.This PR includes a test demonstrating the problem, a fix, and a required commit to update the copyright headers 🤷