In my opinion, we don't need to know the IP addresses, at least not in their complete form.
Maybe if those addresses are already blacklisted, and the OP doesn't know it, we could tell with some confidence that they are probably being used to carry out some attack, as opposed to be (for example) the addresses of normal users who entered the wrong password.
But usually, after the third or so login attempt, we can already say that an attack is going on. As far as DDoS attacks are concerned, they most likely use botnets, and if a regular user is caught in the crosshairs of an anti-DDoS IP ban, a successful DDoS defence may be well worth it. In all other situations (SQL injections, port scanning, etc.), the knowledge of the IP address is - in my opinion - useless for the purpose of an answer, and could only be useful if the OP decided to file a report to the police.
Another possible reason could be geolocation. Once in a while, questions arise on whether to block or not IP addresses based on geolocation. Sometimes this might be useful (e.g. to protect SSH servers from Chinese IP addresses, if it is only used by devices in the USA, without the need of a VPN, etc.), but sometimes it is not. In any case, the last octet is of no use, and in most cases the last two octets are irrelevant, since most country-level IP blocks are defined by the first two octets.
In the end, I think we should at least redact the last octet, and possibly the last two octets.
By the way, Lasagna pointed out that the edit history is visible. I don't think this is a serious issue, given that IP addresses are not meant to be secret, and that they cannot be easily tied to an individual. Even if that was a problem, moderators can intervene and redact the history.