Skip to content

Commit b2380f0

Browse files
committed
Remove step links to logs
1 parent 811428e commit b2380f0

5 files changed

Lines changed: 2 additions & 36 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
"command": "github-actions.workflow.logs",
119119
"category": "GitHub Actions",
120120
"title": "View logs",
121-
"when": "viewItem =~ /job/ || viewItem =~ /step/",
121+
"when": "viewItem =~ /job/",
122122
"icon": {
123123
"dark": "resources/icons/dark/logs.svg",
124124
"light": "resources/icons/light/logs.svg"

src/commands/openWorkflowJobLogs.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@ import {WorkflowJob} from "../store/WorkflowJob";
99
export interface OpenWorkflowJobLogsCommandArgs {
1010
gitHubRepoContext: GitHubRepoContext;
1111
job: WorkflowJob;
12-
step?: WorkflowStep;
1312
}
1413

1514
export function registerOpenWorkflowJobLogs(context: vscode.ExtensionContext) {
1615
context.subscriptions.push(
1716
vscode.commands.registerCommand("github-actions.workflow.logs", async (args: OpenWorkflowJobLogsCommandArgs) => {
1817
const gitHubRepoContext = args.gitHubRepoContext;
1918
const job = args.job;
20-
const step = args.step;
2119
const uri = buildLogURI(
2220
`%23${job.job.run_id} - ${job.job.name}`,
2321
gitHubRepoContext.owner,
@@ -37,22 +35,6 @@ export function registerOpenWorkflowJobLogs(context: vscode.ExtensionContext) {
3735

3836
// Custom formatting after the editor has been opened
3937
updateDecorations(editor, logInfo);
40-
41-
// Deep linking to steps
42-
if (step) {
43-
let matchingSection = logInfo.sections.find(s => s.name && s.name === step.name);
44-
if (!matchingSection) {
45-
// If we cannot match by name, see if we can try to match by number
46-
matchingSection = logInfo.sections[step.number - 1];
47-
}
48-
49-
if (matchingSection) {
50-
editor.revealRange(
51-
new vscode.Range(matchingSection.start, 0, matchingSection.start, 0),
52-
vscode.TextEditorRevealType.InCenter
53-
);
54-
}
55-
}
5638
})
5739
);
5840
}

src/logs/model.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,7 @@ const groupMarker = "##[group]";
33

44
import {Parser, IStyle} from "./parser";
55

6-
export enum Type {
7-
Setup,
8-
Step
9-
}
10-
116
export interface LogSection {
12-
type: Type;
137
start: number;
148
end: number;
159
name?: string;
@@ -30,7 +24,6 @@ export interface LogInfo {
3024
export function parseLog(log: string): LogInfo {
3125
let firstSection: LogSection | null = {
3226
name: "Setup",
33-
type: Type.Setup,
3427
start: 0,
3528
end: 1
3629
};
@@ -65,7 +58,6 @@ export function parseLog(log: string): LogInfo {
6558

6659
currentRange = {
6760
name,
68-
type: Type.Step,
6961
start: lineIdx,
7062
end: lineIdx + 1
7163
};

src/logs/scheme.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export function parseUri(uri: vscode.Uri): {
1212
owner: string;
1313
repo: string;
1414
jobId: number;
15-
stepName?: string;
1615
} {
1716
if (uri.scheme != LogScheme) {
1817
throw new Error("Uri is not of log scheme");
@@ -21,7 +20,6 @@ export function parseUri(uri: vscode.Uri): {
2120
return {
2221
owner: uri.authority,
2322
repo: uri.path.split("/").slice(0, 2).join(""),
24-
jobId: parseInt(uri.query, 10),
25-
stepName: uri.fragment
23+
jobId: parseInt(uri.query, 10)
2624
};
2725
}

src/treeViews/workflows/workflowStepNode.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ export class WorkflowStepNode extends vscode.TreeItem {
1717
this.contextValue += " completed";
1818
}
1919

20-
this.command = {
21-
title: "Open run",
22-
command: "github-actions.workflow.logs",
23-
arguments: [this]
24-
};
25-
2620
this.iconPath = getIconForWorkflowStep(this.step);
2721
}
2822
}

0 commit comments

Comments
 (0)