upsidr / merge-gatekeeper

Get better merge control
MIT License
85 stars 14 forks source link

Support newlines and spaces in ignored jobs #49

Closed Jrc356 closed 1 year ago

Jrc356 commented 1 year ago

This PR should close #46. It adds the necessary logic to support newlines

rytswd commented 1 year ago

I think this is a duplicate of #45? #45 has some test case tuning, so we may go with that instead unless you see some specific case that it cannot handle?

Jrc356 commented 1 year ago

I think this is a duplicate of #45? #45 has some test case tuning, so we may go with that instead unless you see some specific case that it cannot handle?

@rytswd it does not appear that #45 supports newlines which is more what this PR was attempting to add

rytswd commented 1 year ago

@Jrc356 I used strings.TrimSpace which also handles the line breaks - as long as it's not in the middle of the item (ref). With the original example you shared with us, I think #45 should be able to handle that - do you have some specific use case, where the newline could be introduced elsewhere?

Jrc356 commented 1 year ago

@Jrc356 I used strings.TrimSpace which also handles the line breaks - as long as it's not in the middle of the item (ref). With the original example you shared with us, I think #45 should be able to handle that - do you have some specific use case, where the newline could be introduced elsewhere?

I never realized strings.TrimSpace handled newlines as well 😅 I'll close this then, sorry about that

rytswd commented 1 year ago

NP at all, thanks very much for your support! 🥰