mindlesscloud opened a new pull request, #4054:
URL: https://github.com/apache/incubator-devlake/pull/4054
### Summary
The following snippet is taken from the codebase. It looks like it would
result in the `index out of range error`, but the function `FindStringSubmatch`
ensures this will not happen. In this PR, we improved the readability by
changing the expression inside the `if` statement from `len(groups) > 0` to
`len(groups) > 1`
```go
groups := labelTypeRegex.FindStringSubmatch(label)
if len(groups) > 0 {
gitlabMergeRequest.Type = groups[1]
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]