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
Add a collapse-after
option for categories
#1095
Conversation
@robbinjanssen Please use using |
lib/releases.js
Outdated
|
||
if ( | ||
!category.collapse || | ||
(category.collapse && category.pullRequests.length < 4) |
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.
If you think this needs to be configurable, feel free to add it :)
Please follow the current config naming with word-another-word
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.
We could, but I have no idea what to name it 🙈 Any suggestions?
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.
collapse-at
is fine it will go together with collapse
. The readme would have to document whether it is greater than or less than that is used.
The default may be greater than 3?
Potentially could move the condition to outside the if statement.
So the if statement might say if (shouldCollapse)
or if (shouldNotCollapse)
Co-authored-by: Joseph Petersen <josephp90@gmail.com>
@rnorth @bsideup @kiview This might be interesting for you :) I see you used If you have any input that would be appreciated 😅 |
Wow this is great! I've been doing this by hand and it's such a pain. Thank you! The only input I'd offer would be around I wonder if having both Would it be too radical to suggest having only If not set, the behaviour would be to never collapse (use |
Only having Instead of using const shouldCollapse = collapseAt != 0 && category.pullRequests.length > collapseAt whether it is |
Great suggestions! collapse-at definitely makes sense, i'll try to update the pr as soon as i got some spare time! |
one more suggestion, perhaps |
collapse
option for categoriescollapse-after
option for categories
@jetersen done! Let me know if you want any more changes :-) |
41b8bf1 great addition 😄 |
@rnorth do you mind reviewing it? |
@rnorth any concerns or do you think I can go ahead and merge? If your too busy just let me know 😅 |
Sorry I'm off sick at the moment. I'm sure if you've reviewed then it's going to be fine. Thank you! |
@rnorth thanks and get well. |
@robbinjanssen thank you for your contribution. |
This implements a new feature as discussed in #1093
Add the
collapse-after
integer to a category to make it hide the PRs if there are more than the given int.