Skip to content

Commit 5b99e4a

Browse files
committed
Disable secret stuff temp to avoid build error
1 parent a75482f commit 5b99e4a

7 files changed

Lines changed: 17 additions & 18 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"main": "./dist/extension.js",
3131
"scripts": {
3232
"rd": "pnpm rolldown --config rolldown.config.ts",
33-
"build": "pnpm clean && pnpm rd --environment PRODUCTION:true",
33+
"build": "pnpm clean && pnpm lint && pnpm format-check && pnpm rd --environment PRODUCTION:true",
3434
"watch": "pnpm rd --watch",
3535
"clean": "git clean -fdX -- ./dist ./out",
3636
"package": "pnpm vsce package --no-dependencies",

src/api/canReachGitHubAPI.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { TTLCache } from "@actions/languageserver/utils/cache"
22

3-
import { getClient } from "~/api/api"
43
import { getSession } from "~/auth/auth"
54
import { logError } from "~/log"
65

@@ -14,9 +13,9 @@ export async function canReachGitHubAPI() {
1413
}
1514
return await cache.get("canReachGitHubAPI", undefined, async () => {
1615
try {
17-
const octokit = getClient(session.accessToken)
16+
// const octokit = getClient(session.accessToken)
1817
// TODO: Add a "slow mode" when the core rate limit goes below 1000
19-
const rateLimit = await octokit.rest.rateLimit.get()
18+
// await octokit.request("GET /")
2019
} catch (e) {
2120
logError(e as Error, "Error getting GitHub context")
2221
return false

src/extension.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,15 @@ export async function activate(context: vscode.ExtensionContext) {
9090
registerUpdateVariable(context)
9191
registerDeleteVariable(context)
9292
registerCopyVariable(context)
93-
registerAddSecret(context)
94-
registerDeleteSecret(context)
95-
registerCopySecret(context)
96-
registerUpdateSecret(context)
9793
registerPinWorkflow(context)
9894
registerUnPinWorkflow(context)
9995

96+
// The secret stuff uses libsodium-wrappers which are notoriously flaky for builds, try disabling these first if you have weird build errors.
97+
// registerAddSecret(context)
98+
// registerDeleteSecret(context)
99+
// registerCopySecret(context)
100+
// registerUpdateSecret(context)
101+
100102
// Log providers
101103
context.subscriptions.push(
102104
vscode.workspace.registerTextDocumentContentProvider(LogScheme, new WorkflowStepLogProvider()),

src/git/repository.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ import { getGitHubApiUri, getRemoteName, useEnterprise } from "~/configuration/c
88
import { Protocol } from "~/external/protocol"
99
import { type RepositoryPermission, getRepositoryPermission } from "~/git/repository-permissions"
1010
import { logDebug, logError } from "~/log"
11-
import type { API, GitExtension, RepositoryState } from "~/typings/git"
12-
import { RefType } from "~/typings/git"
11+
12+
import { type API, type GitExtension, type RefType, type RepositoryState } from "../typings/git"
13+
14+
// HACK: Workaround for the enum from the git extension not being importable directly
15+
const RefTypeHead = 0 as RefType
16+
1317
interface GitHubUrls {
1418
workspaceUri: vscode.Uri
1519
url: string
@@ -48,7 +52,7 @@ export async function getGitHead(): Promise<string | undefined> {
4852
const git = await getGitExtension()
4953
if (git && git.repositories.length > 0) {
5054
const head = git.repositories[0].state.HEAD
51-
if (head && head.name && head.type === RefType.Head) {
55+
if (head && head.name && head.type == RefTypeHead) {
5256
return `refs/heads/${head.name}`
5357
}
5458
}
@@ -281,7 +285,7 @@ export function getCurrentBranch(state: RepositoryState | undefined): string | u
281285
return
282286
}
283287

284-
if (head.type != RefType.Head) {
288+
if (head.type != RefTypeHead) {
285289
return
286290
}
287291

src/treeViews/currentBranch/noRunForBranchNode.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import * as vscode from "vscode"
2-
31
import { GithubActionTreeNode } from "~/treeViews/githubActionTreeDataProvider"
42

53
export class NoRunForBranchNode extends GithubActionTreeNode {

src/treeViews/shared/authenticationNode.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import * as vscode from "vscode"
2-
31
import { GithubActionTreeNode } from "~/treeViews/githubActionTreeDataProvider"
42

53
export class AuthenticationNode extends GithubActionTreeNode {

src/treeViews/shared/noWorkflowJobsNode.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import * as vscode from "vscode"
2-
31
import { GithubActionTreeNode } from "~/treeViews/githubActionTreeDataProvider"
42

53
/**

0 commit comments

Comments
 (0)