-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow extra whitespace in merge commands #108
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I left a small idea for improvement, but it's nothing critical so feel free to disregard it :)
src/Logic.hs
Outdated
@@ -396,7 +396,7 @@ isSuccess _ = False | |||
parseMergeCommand :: TriggerConfiguration -> Text -> ParseResult (ApprovedFor, MergeWindow) | |||
parseMergeCommand config message = | |||
let | |||
messageCaseFold = Text.toCaseFold $ Text.strip message | |||
messageCaseFold = Text.toCaseFold $ Text.unwords $ filter (not . Text.null) $ Text.words message |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nitpick: it might be nice to make a normalize
function to group these transformations in (and maybe rename messageCaseFold
to messageNormalized
since case folding is not the only operation applied to it anymore) but that comes down to stylistic preference.
@OpsBotPrime merge! |
Your merge request has been denied, because merging on Fridays is not recommended. To override this behaviour use the command |
@OpsBotPrime merge! |
Pull request approved for merge by @ReinierMaas, rebasing now. |
Rebased as 6f1b2a3, waiting for CI … |
Approved-by: ReinierMaas Auto-deploy: false
Abandoning this pull request because it was closed. |
@OpsBotPrime merge and for real this time. @ReinierMaas the CI was never started due to Semaphore issues, I'll retry this for you. |
Pull request approved for merge by @bertptrs, rebasing now. |
* Frees disk space on Semaphore * Error on `nix-build` failures
Approved-by: bertptrs Auto-deploy: false
Rebased as 8cc81f5, waiting for CI … |
e3641a0
to
8cc81f5
Compare
XRef: #102
Yes, that is definitely more user-friendly!
Allowing extra whitespace in the merge commands to overcome the (somewhat) common double whitespace.