Skip to content
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

Option to append new body immediately after existing body (no break or space char in between) #158

Closed
ADTC opened this issue Mar 27, 2023 · 5 comments · Fixed by #161
Closed

Comments

@ADTC
Copy link

ADTC commented Mar 27, 2023

The default behavior to add a newline break between the existing comment body and the new body is a good default.

I think it will be nice to have feature if we can disable the added break, or use a space instead. (Could be called append-separator with three options: newline, space, none.)

Example: If the original comment is:

Look out for an update here:

With append-separator: newline (default):

Look out for an update here:
This is the update.

With append-separator: space:

Look out for an update here: This is the update.

With append-separator: none:

Look out for an update here:This is the update.
@peter-evans
Copy link
Owner

Hi @ADTC

Good feature!

Now that you've pointed it out, I'm actually surprised nobody has suggested this before.

Would you like to contribute this feature yourself in a PR?

@ADTC
Copy link
Author

ADTC commented Mar 27, 2023

I actually took a look at the code. It should be possible. I'll give it a shot when I have some free time (unless you did already).

@peter-evans peter-evans mentioned this issue Mar 31, 2023
Merged
@peter-evans
Copy link
Owner

Released this feature in v3.0.0 / v3.

@ADTC
Copy link
Author

ADTC commented Apr 14, 2023

Thank you! Just upgraded to v3 and tested it, working great :) You did it much better than I could have.

BTW if the option isn't present, it will default to newline is that right?

@peter-evans
Copy link
Owner

Yes, it defaults to newline if unspecified.

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 a pull request may close this issue.

2 participants