Skip to content

Commit 45764d9

Browse files
committed
Clean up opening variant analysis on GitHub
This removes a comment and makes the test lines shorter.
1 parent 847cb13 commit 45764d9

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

extensions/ql-vscode/src/query-history.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,6 @@ export class QueryHistoryManager extends DisposableObject {
12131213
) {
12141214
const { finalSingleItem, finalMultiSelect } = this.determineSelection(singleItem, multiSelect);
12151215

1216-
// Remote queries only
12171216
if (!this.assertSingleQuery(finalMultiSelect) || !finalSingleItem) {
12181217
return;
12191218
}

extensions/ql-vscode/test/pure-tests/query-history-info.test.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,21 @@ describe('Query history info', () => {
155155
it('should get the run url for remote query history items', () => {
156156
const actionsWorkflowRunUrl = getActionsWorkflowRunUrl(remoteQueryHistoryItem);
157157

158-
expect(actionsWorkflowRunUrl).to.equal(`https://github.com/${remoteQueryHistoryItem.remoteQuery.controllerRepository.owner}/${remoteQueryHistoryItem.remoteQuery.controllerRepository.name}/actions/runs/${remoteQueryHistoryItem.remoteQuery.actionsWorkflowRunId}`);
158+
const remoteQuery = remoteQueryHistoryItem.remoteQuery;
159+
const fullName = `${remoteQuery.controllerRepository.owner}/${remoteQuery.controllerRepository.name}`;
160+
expect(actionsWorkflowRunUrl).to.equal(
161+
`https://github.com/${fullName}/actions/runs/${remoteQuery.actionsWorkflowRunId}`
162+
);
159163
});
160164

161165
it('should get the run url for variant analysis history items', () => {
162166
const actionsWorkflowRunUrl = getActionsWorkflowRunUrl(variantAnalysisHistoryItem);
163167

164-
expect(actionsWorkflowRunUrl).to.equal(`https://github.com/${variantAnalysisHistoryItem.variantAnalysis.controllerRepo.fullName}/actions/runs/${variantAnalysisHistoryItem.variantAnalysis.actionsWorkflowRunId}`);
168+
const variantAnalysis = variantAnalysisHistoryItem.variantAnalysis;
169+
const fullName = variantAnalysis.controllerRepo.fullName;
170+
expect(actionsWorkflowRunUrl).to.equal(
171+
`https://github.com/${fullName}/actions/runs/${variantAnalysis.actionsWorkflowRunId}`
172+
);
165173
});
166174
});
167175
});

0 commit comments

Comments
 (0)