Closed camilamacedo86 closed 3 years ago
Yup that's definitely possible. We can add a parameter alwaysPassCI
just in case people don't want tests failing only because of the title format. Would you like to take it up?
I have no idea how it works. However, shows that it would be an if in https://github.com/thehanimo/pr-title-checker/blob/master/dist/index.js#L221 which should exit with 1. Also, we would need a new release after that.
Ideally, you'd only want to make changes to https://github.com/thehanimo/pr-title-checker/blob/master/index.js. The dist folder is generated by the prepare
script. We can probably have alwaysPassCI
added as a key in the CHECKS object. Then, we can add a parameter to the addLabel function which takes in alwaysPassCI
and if false, run core.setFailed("Fail CI test")
just after core.info("Adding...")
(inside addLabel).
Hey @camilamacedo86! I just released a new version (v1.1) which addresses this issue. Hope it helps you manage pull requests more efficiently!
Thank you so much!
Could it have an option for we make the ci fail instead of just add the label?