RFR: 1258: Add review link/details to comments section
Erik Joelsson
erikj at openjdk.java.net
Fri Dec 3 14:21:11 UTC 2021
On Fri, 3 Dec 2021 12:55:03 GMT, Guoxiong Li <gli at openjdk.org> wrote:
> Hi all,
>
> This patch adds a comment to the jira issue when the corresponding PR is submitted. Because currently, the class `Issue` has no an api to remove a comment. So I need to create and implement it, too. And the test cases are added.
>
> Thanks for taking the time to review.
>
> Best Regards,
> -- Guoxiong
If you look in JiraIssue::addWebLink, it already uses a comment instead of a link in certain cases (specifically when the link is considered confidential). This is the behavior we now wish to emulate all the time, but in addition to the weblink. IMO, we just need to change this method a bit, so that it always calls ::addWebLinkAsComment and then skips the weblink part if needsSecurity is true.
I don't think we should remove comments when removing links. Issue comments are meant to represent a log of things happening to an Issue. The links section is meant to represent the current valid/relevant links. Removing the link when it's not relevant is good, but removing comments is like editing history and should only be done rare cases. In this situation, I would leave it to the user to clean up if they think it's needed.
Also, if you add new API calls to various REST providers, those need thorough testing which can be hard to perform. We unfortunately do not have any automated way of testing the interaction between Skara and Github/Gitlab/Jira.
-------------
PR: https://git.openjdk.java.net/skara/pull/1250
More information about the skara-dev
mailing list