When investigating SKARA-1602, I realized that the way labels are handled in the new TestIssue/TestPullRequest is consistent with JiraIssue, but not with GitHubPullRequest and GitLabMergeRequest. This discrepancy may be hiding buggy behavior, or will at least risk introducing bugs in the future.
In JiraIssue, the add/remove/set label methods only updates the server through a REST call, but the locally cached value does not change. This is also how TestIssue was implemented. But in the PullRequest implementations, add/remove/set label also updates the local cache, so that future labels/labelNames calls will reflect those updates.
I think the most consistent behavior would be to make all implementations update the cache so that added or removed labels are properly reflected. This should cause the least confusion.
In JiraIssue, the add/remove/set label methods only updates the server through a REST call, but the locally cached value does not change. This is also how TestIssue was implemented. But in the PullRequest implementations, add/remove/set label also updates the local cache, so that future labels/labelNames calls will reflect those updates.
I think the most consistent behavior would be to make all implementations update the cache so that added or removed labels are properly reflected. This should cause the least confusion.
- relates to
-
SKARA-1589 Improve TestIssue and TestPullRequest
- Resolved
-
SKARA-1602 Fix labels handling in GitLabMergeRequest
- Resolved