Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 49b80c3ef0 |
@@ -3,9 +3,6 @@ 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,10 +31,7 @@ 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 workspaceURI = vscodeURI.URI.parse(workspace);
|
const file = await readFile(path.join(workspace, ref.path));
|
||||||
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}`);
|
||||||
}
|
}
|
||||||
|
|||||||
Executable
+16
@@ -0,0 +1,16 @@
|
|||||||
|
## 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