Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 484b6eb423 | |||
| dd8930fd74 | |||
| 2449e5cea1 | |||
| dba3cf5d96 | |||
| 804f83828f |
@@ -3,6 +3,9 @@ import {Octokit} from "@octokit/rest";
|
|||||||
export function getClient(token: string, userAgent?: string): Octokit {
|
export function getClient(token: string, userAgent?: string): Octokit {
|
||||||
return new Octokit({
|
return new Octokit({
|
||||||
auth: token,
|
auth: token,
|
||||||
userAgent: userAgent || `GitHub Actions Language Server`
|
userAgent: userAgent || `GitHub Actions Language Server`,
|
||||||
|
request: {
|
||||||
|
insecure_ssl: 1
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import {File} from "@actions/workflow-parser/workflows/file";
|
|||||||
import {FileProvider} from "@actions/workflow-parser/workflows/file-provider";
|
import {FileProvider} from "@actions/workflow-parser/workflows/file-provider";
|
||||||
import {fileIdentifier} from "@actions/workflow-parser/workflows/file-reference";
|
import {fileIdentifier} from "@actions/workflow-parser/workflows/file-reference";
|
||||||
import {Octokit} from "@octokit/rest";
|
import {Octokit} from "@octokit/rest";
|
||||||
import path from "path";
|
|
||||||
import {TTLCache} from "./utils/cache";
|
import {TTLCache} from "./utils/cache";
|
||||||
|
import vscodeURI from "vscode-uri/lib/umd";
|
||||||
|
|
||||||
export function getFileProvider(
|
export function getFileProvider(
|
||||||
client: Octokit | undefined,
|
client: Octokit | undefined,
|
||||||
@@ -31,7 +31,10 @@ export function getFileProvider(
|
|||||||
throw new Error("Local file references are not supported with this configuration");
|
throw new Error("Local file references are not supported with this configuration");
|
||||||
}
|
}
|
||||||
|
|
||||||
const file = await readFile(path.join(workspace, ref.path));
|
const workspaceURI = vscodeURI.URI.parse(workspace);
|
||||||
|
const refURI = vscodeURI.Utils.joinPath(workspaceURI, ref.path);
|
||||||
|
const file = await readFile(refURI.toString());
|
||||||
|
|
||||||
if (!file) {
|
if (!file) {
|
||||||
throw new Error(`File not found: ${ref.path}`);
|
throw new Error(`File not found: ${ref.path}`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
## This script syncs all five repositories to the current state of main.
|
|
||||||
## It will stash changes on the current branch, switch to main, pull and remain on main.
|
|
||||||
|
|
||||||
echo "Syncing all repositories to main"
|
|
||||||
|
|
||||||
# for each folder in the above directory
|
|
||||||
cd ..
|
|
||||||
for d in */ ; do
|
|
||||||
cd $d
|
|
||||||
echo "Syncing $d"
|
|
||||||
echo "current branch: $(git rev-parse --abbrev-ref HEAD)"
|
|
||||||
git stash
|
|
||||||
git checkout main
|
|
||||||
git pull
|
|
||||||
cd ..
|
|
||||||
done
|
|
||||||
Reference in New Issue
Block a user