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
pr-automerge: pluralize message only when needed #8362
Conversation
@@ -49,7 +49,7 @@ def pr_automerge | |||
return | |||
end | |||
|
|||
ohai "#{prs.size} matching pull requests:" | |||
ohai "#{prs.size} matching pull #{"request".pluralize(prs.size)}:" |
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.
ohai "#{prs.size} matching pull #{"request".pluralize(prs.size)}:" | |
ohai "#{prs.count} matching pull #{"request".pluralize(prs.count)}:" |
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.
I don't mind changing, but why is count
preferred to size
?
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.
It reads nicer. 😉
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.
It reads nicer. 😉
It sounds like a personal preference that we shouldn't be casting on other maintainers.
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.
I'd rather not change existing code if there isn't a good reason, so I'll leave it as is.
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.
It's not really a personal preference: You can count
multiple PRs, but you can't measure their size
.
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.
I think it's fine to suggest personal preference. I agree this is easier to read. It'd fine to me either way so I'm approving but I'd rather see "comment and approve" than maintainers such as @reitermarkus being encouraged to not leave these sort of (useful) comments.
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.
I think it's fine to suggest personal preference.
It is sure fine to make suggestions based on personal preferences, but they should be explained (initial comment had no accompanying explanation) and provide at least some reasoning. I agree with the explanation provided later that one can count PRs but can't measure their size but I disagree with "it reads nicer".
@@ -49,7 +49,7 @@ def pr_automerge | |||
return | |||
end | |||
|
|||
ohai "#{prs.size} matching pull requests:" | |||
ohai "#{prs.size} matching pull #{"request".pluralize(prs.size)}:" |
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.
I think it's fine to suggest personal preference. I agree this is easier to read. It'd fine to me either way so I'm approving but I'd rather see "comment and approve" than maintainers such as @reitermarkus being encouraged to not leave these sort of (useful) comments.
31cf609
to
420e8fd
Compare
Prior to the more in-depth explanation from @reitermarkus, it wasn't clear to me why |
brew style
with your changes locally?brew tests
with your changes locally?Don't pluralize message when there is only one matching pull request.