-
-
Notifications
You must be signed in to change notification settings - Fork 12
Updating PR closing message #47
Conversation
|
Great, thank you very much! |
| *If you believe I commented on this pull request incorrectly, please report | ||
| this [here](https://github.com/astropy/astropy-bot/issues).* | ||
| """ |
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.
Since you wrapped the text, you need to add, after the """:
""".replace(os.linesep, ' ').strip()
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.
Oh, sorry I wasn't aware. Would you prefer them being unwrapped?
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.
No it's easier to read like this, but we need to unwrap it programmatically
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.
Or don't use """. Maybe something like
PULL_REQUESTS_CLOSE_WARNING = (
"line1\n"
"\n"
"line2\n")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 prefer with the """ and the replace(...) stuff as then it's easy to re-wrap text automatically when adding more words.
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.
Yes, fair point.
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.
OK, done. It had to be done with re as we want to keep some whitespace between the paragraphs.
|
@astrofrog - Can we merge this? Though probably it's not urgent again as the cron has already run just now. |
| *If you believe I commented on this pull request incorrectly, please report | ||
| this [here](https://github.com/astropy/astropy-bot/issues).* | ||
| """).strip() |
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.
You need to get rid of the wrapping here, so .replace(os.linesep, ' ') - also below
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.
Ah wait you did it with a regular expression, oops - any reason why not just use replace?
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.
As it then replaces all new lines, and everything ends up in one line.
…ge_update Updating PR closing message
This would add a note about rebasing to reset the clock.
cc @olebole