We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4c199f commit 8ef1f37Copy full SHA for 8ef1f37
src/api.ts
@@ -113,7 +113,7 @@ export interface Branch {
113
codeSmells?: number
114
}
115
analysisDate: string
116
- commit: {
+ commit?: {
117
sha: string
118
author: {
119
name: string
src/sonarqube.ts
@@ -104,7 +104,7 @@ export function activate(context: sourcegraph.ExtensionContext): void {
104
105
106
const branches = await listBranches({ project, ...apiOptions })
107
- const branch = branches.find(branch => branch.commit.sha === commitID)
+ const branch = branches.find(branch => branch?.commit?.sha === commitID)
108
if (!branch) {
109
console.warn(
110
`No Sonarqube branch found for commit ID ${commitID}, falling back to default branch`
0 commit comments