Commit 5906c829 authored by Tabakhase's avatar Tabakhase

Support location.positions in code climate MR-widget

https://github.com/codeclimate/spec/blob/master/SPEC.md#locations
parent d390f8f7
...@@ -153,7 +153,15 @@ export default class MergeRequestStore extends CEMergeRequestStore { ...@@ -153,7 +153,15 @@ export default class MergeRequestStore extends CEMergeRequestStore {
if (issue.location.lines && issue.location.lines.begin) { if (issue.location.lines && issue.location.lines.begin) {
parsedIssue.line = issue.location.lines.begin; parsedIssue.line = issue.location.lines.begin;
parseCodeQualityUrl += `#L${issue.location.lines.begin}`; parseCodeQualityUrl += `#L${issue.location.lines.begin}`;
} else if (
issue.location.positions &&
issue.location.positions.begin &&
issue.location.positions.begin.line
) {
parsedIssue.line = issue.location.positions.begin.line;
parseCodeQualityUrl += `#L${issue.location.positions.begin.line}`;
} }
parsedIssue.urlPath = parseCodeQualityUrl; parsedIssue.urlPath = parseCodeQualityUrl;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment