Add new field webUrl to Code Quality APIs
What does this MR do and why?
Adds a new field webUrl
to the Code Quality's GraphQL and private API (codequality_reports.json) response. This will help move the logic of building the path from the frontend to the backend.
Relevant issue: #355426 (closed)
Screenshots or screen recordings
How to set up and validate locally
- Start Gitlab (
gdk start
) - Create a repository, add some code and enable Code Quality
- Create an MR and check the response:
-
<group>/<repository>/-/merge_requests/<mr_id>/codequality_reports.json
. Alternatively, open the MR page and append/codequality_reports.json
to the URL - Use the below GraphQL query in the GraphQL Explorer (
-/graphql-explorer
)
-
GraphQL Query
query {
project(fullPath: "<group>/<repository>") {
pipeline(iid: <mr_iid>) {
codeQualityReports(first: 2, after: "") {
count
edges {
node {
line
description
path
fingerprint
severity
webUrl
}
}
pageInfo {
startCursor
endCursor
hasNextPage
}
}
}
}
}
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Arpit Gogia