Skip to content

Conversation

@lukealbao
Copy link

There's a small bug in the rule parser that is replicated in the test here. Trailing whitespace is insignificant in Github's implementation.

const createMatcherCodeownersRule = (rule: string): FileOwnershipMatcher => {
// Split apart on spaces
const parts = rule.split(/\s+/);
const parts = rule.split(/\s+/).filter(Boolean);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just use .trim(), makes it more readable

@nadavsinai-philips
Copy link

we also had this problem, I wanted to make a PR and found this one already exists
thanks for your work

@github-louis-yvelin
Copy link

Same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants