[Feature] Trim spaces from signature comment
See original GitHub issueIs your feature request related to a problem? Please describe. When users copy the signing line into a comment (“'I have read the CLA Document…”), it is often copied with extra spaces or new lines. Since the action is comparing the comment’s content strictly to the expected line, it is not recognized as a signing. We sometimes have to ask the users to try again multiple times until they get it right.
Describe the solution you’d like It would be nice if the action would know to trim extra lines and spaces when comparing to the expected line. I know the comparison happens in my own workflow and that the solution should probably be there, but I’m reaching out to see maybe someone run into the same problem and has a solution.
Describe alternatives you’ve considered
- Github Action offers a
contains()
function, but then it ignores extra words that might make the signing invalid. - Make the comparison inside the Action step itself and not in the workflow (would mean the step will run on every comment, which might be a waste)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:5 (4 by maintainers)
Top GitHub Comments
Thanks @yahavi.
@ibakshay, @AndrewGable, Just to clarify, the solution only works if both #69 & @yahavi’s above comment are used together. The regex makes the CLA action accept comments with spaces (i.e not strict as
==
), and thetrim()
in #69 handles those spaces inside the CLA action.This works for me, closing the issue.
I would recommend using action-regex-match to better deal with newlines: