RFR: 1603: Make labels handling consistent in all Issue implementations

Zhao Song duke at openjdk.org
Tue Oct 4 16:53:44 UTC 2022


On Tue, 4 Oct 2022 14:07:04 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

>> Make TestIssue and JiraIssue update the cache when updating labels.
>
> issuetracker/src/main/java/org/openjdk/skara/issuetracker/jira/JiraIssue.java line 287:
> 
>> 285:     @Override
>> 286:     public void setLabels(List<String> labels) {
>> 287:         this.labels = null;
> 
> Both `GitHubPullRequest` and `GitHubMergeRequest` update the internal `labels` field in this method instead of making it null.

I think we update the internal labels in GitHubPullRequest and GitHubMergeRequest because we could get the return value of the update request. However, for Jira Issue, I read the document of Jira REST API, it shows that it wouldn't have return value of the update request, it will just return Status 204.
Reference:
https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/

-------------

PR: https://git.openjdk.org/skara/pull/1387


More information about the skara-dev mailing list