#535 Add support for editing comments on tickets and pull-requests
Merged by pingou. Opened by pingou.
editing  into  master

Download 535.patch
no initial comment

Maybe make this file a bit more in sync with issue_comments with regards the the filename and summary, so it's easier to see they do almost the same thing but for different parts?

Unless I'm mistaken, this leaks info if the issue is private, not? Since I can't see any limit to public/private here?

Good point

Seems this is moot since the SSE server will be doing the auth checking before sending the info on private issues.

If we send this, we should also update the client javascript so that when we fix private issue SEE we don't update all comments to the text "private".

Now we need to keep this in sync with the SSE server doing auth or not. Maybe just get rid of this so it's all just on the SSE side?

I see what you did there!
Trying to sneak other fixes in, are we? ^^

It's there :)

Just to see if you were carefully reviewing ;-)

Please note that this will break if I were to deploy pagure in myhost.com/pagure-1/ as root. (not that that's likely, but there's nothing stopping me from doing that, is there?)

Indeed, but I do not have a better idea for this, do you?

Not sure what you mean here

I don't, not without breaking some other random URL I could come up with.
Although it would probably be best to make this a slightly more tricky thing.
Maybe use "issue_id_placeholder" or something?
That would prevent it from also working on mydomain-1.com. (which I find more plausible than mydomain.com/pagure-1/ anyway)/

That is issue_id_placeholder with underscores in front and at the back, to make the chance smaller, but any more complicated url would work for me.

Scratch this, was based on a misunderstanding by me, and me reviewing things ahead of where I was.

Oh! A sneaky .parent()^4!
Maybe another place for another DOM traversal function?

I'm still slightly unsure about this, as this means that repo owners can edit other people's comments.
That would give repo owners the power to change someone's comment to say something else than they originally meant.
While I am totally fine with repo owners deleting other users' comments, this is taking it a bit too far for my liking with the impersonation.

The idea was to allow maintainers to fix things like formatting in a comment.

Note: it'll say that the comment was edited by someone else than the author.

Right, why did I forget that? I asked for that info myself...

Maybe an idea to add tests on editing issue comments?

Good idea

Perhaps change the names to (pr|issue)_comment_editing.py to get it grammatically correct?

Ack, looks good to me.

(With the sneaked in patch! :D )

Metadata