Compare commits
53
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1e02fbb597 | ||
|
|
b534e3a243 | ||
|
|
523f24c92f | ||
|
|
0901deea32 | ||
|
|
59620fae2d | ||
|
|
3fbdfd5f2e | ||
|
|
57a5994e12 | ||
|
|
c6cde72b37 | ||
|
|
d47636092a | ||
|
|
e292f8ca51 | ||
|
|
8f4080074b | ||
|
|
b04e5db100 | ||
|
|
2795997f4c | ||
|
|
8bc0c5636e | ||
|
|
58bf3b35cc | ||
|
|
124ee84d1f | ||
|
|
5cb4007629 | ||
|
|
07fa29649e | ||
|
|
7bb2962bb0 | ||
|
|
3904c64796 | ||
|
|
48ad5e5251 | ||
|
|
317c4fcd63 | ||
|
|
bf97052855 | ||
|
|
dd8930fd74 | ||
|
|
2449e5cea1 | ||
|
|
dba3cf5d96 | ||
|
|
804f83828f | ||
|
|
cf2fd6332f | ||
|
|
51649f27f8 | ||
|
|
74db91e276 | ||
|
|
a1d81c730f | ||
|
|
18d1bd9734 | ||
|
|
fc6a1d3e0c | ||
|
|
6df34a78ce | ||
|
|
aee5c2b919 | ||
|
|
8cdfe810db | ||
|
|
17a680df41 | ||
|
|
11d3fc25ee | ||
|
|
d2783ed733 | ||
|
|
6d0f74e38b | ||
|
|
2ecbeafacb | ||
|
|
a4d3fb1a3e | ||
|
|
83cac82450 | ||
|
|
fc2bacfcdc | ||
|
|
7d8a7c11a6 | ||
|
|
e37d7620d6 | ||
|
|
6e8cbc3e8c | ||
|
|
d0916938ce | ||
|
|
488879804f | ||
|
|
736dd1a66c | ||
|
|
d58deaf097 | ||
|
|
f4a32c43cf | ||
|
|
f29fffce7e |
@@ -1,13 +1,18 @@
|
|||||||
name: Create release PR
|
name: Create release PR
|
||||||
|
|
||||||
run-name: Create release PR for v${{ github.event.inputs.version }}
|
run-name: Create release PR for new ${{ github.event.inputs.version }} version
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
version:
|
version:
|
||||||
required: true
|
required: true
|
||||||
description: "Version to bump `package.json` to (format: x.y.z)"
|
type: choice
|
||||||
|
description: "What type of release is this"
|
||||||
|
options:
|
||||||
|
- "major"
|
||||||
|
- "minor"
|
||||||
|
- "patch"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
create-release-pr:
|
create-release-pr:
|
||||||
@@ -31,21 +36,25 @@ jobs:
|
|||||||
git config --global user.email "[email protected]"
|
git config --global user.email "[email protected]"
|
||||||
git config --global user.name "GitHub Actions"
|
git config --global user.name "GitHub Actions"
|
||||||
|
|
||||||
git checkout -b release/${{ inputs.version }}
|
NEW_VERSION=$(./script/workflows/increment-version.sh ${{ inputs.version }})
|
||||||
|
|
||||||
npx lerna version ${{ inputs.version }} --yes --no-push --no-git-tag-version --force-publish
|
git checkout -b release/$NEW_VERSION
|
||||||
|
|
||||||
|
npx lerna version $NEW_VERSION --yes --no-push --no-git-tag-version --force-publish
|
||||||
|
|
||||||
git add **/package.json package-lock.json lerna.json
|
git add **/package.json package-lock.json lerna.json
|
||||||
git commit -m "Release extension version ${{ inputs.version }}"
|
git commit -m "Release extension version $NEW_VERSION"
|
||||||
|
|
||||||
git push --set-upstream origin release/${{ inputs.version }}
|
git push --set-upstream origin release/$NEW_VERSION
|
||||||
|
|
||||||
|
echo "new_version=$NEW_VERSION" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Create PR
|
- name: Create PR
|
||||||
run: |
|
run: |
|
||||||
gh pr create \
|
gh pr create \
|
||||||
--title "Release version ${{ inputs.version }}" \
|
--title "Release version ${{ env.new_version }}" \
|
||||||
--body "Release version ${{ inputs.version }}" \
|
--body "Release version ${{ env.new_version }}" \
|
||||||
--base main \
|
--base main \
|
||||||
--head release/${{ inputs.version }}
|
--head release/${{ env.new_version }}
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
+10
-2
@@ -8,6 +8,8 @@ Hi there! We're thrilled that you'd like to contribute to this project. Your hel
|
|||||||
|
|
||||||
We accept pull requests for bug fixes and features where we've discussed the approach in an issue and given the go-ahead for a community member to work on it. We'd also love to hear about ideas for new features as issues.
|
We accept pull requests for bug fixes and features where we've discussed the approach in an issue and given the go-ahead for a community member to work on it. We'd also love to hear about ideas for new features as issues.
|
||||||
|
|
||||||
|
We track issues on our project board [here](https://github.com/orgs/github/projects/9557/views/1).
|
||||||
|
|
||||||
Please do:
|
Please do:
|
||||||
|
|
||||||
* Check existing issues to verify that the [bug][bug issues] or [feature request][feature request issues] has not already been submitted.
|
* Check existing issues to verify that the [bug][bug issues] or [feature request][feature request issues] has not already been submitted.
|
||||||
@@ -21,7 +23,7 @@ Please avoid:
|
|||||||
|
|
||||||
* Opening pull requests for issues marked `needs-design`, `needs-investigation`, or `blocked`.
|
* Opening pull requests for issues marked `needs-design`, `needs-investigation`, or `blocked`.
|
||||||
|
|
||||||
Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE.md).
|
Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE).
|
||||||
|
|
||||||
Please note that this project is released with a [Contributor Code of Conduct][code-of-conduct]. By participating in this project you agree to abide by its terms.
|
Please note that this project is released with a [Contributor Code of Conduct][code-of-conduct]. By participating in this project you agree to abide by its terms.
|
||||||
|
|
||||||
@@ -60,4 +62,10 @@ Please also look at the `README.md` files for each package for additional notes
|
|||||||
|
|
||||||
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
|
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
|
||||||
- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/)
|
- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/)
|
||||||
- [GitHub Help](https://help.github.com)
|
- [GitHub Help](https://help.github.com)
|
||||||
|
|
||||||
|
|
||||||
|
[bug issues]: https://github.com/actions/languageservices/labels/bug
|
||||||
|
[feature request issues]: https://github.com/actions/languageservices/labels/enhancement
|
||||||
|
[hw]: https://github.com/actions/languageservices/labels/help%20wanted
|
||||||
|
[gfi]: https://github.com/actions/languageservices/labels/good%20first%20issue
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/expressions",
|
"name": "@actions/expressions",
|
||||||
"version": "0.3.2",
|
"version": "0.3.4",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"source": "./src/index.ts",
|
"source": "./src/index.ts",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/languageserver",
|
"name": "@actions/languageserver",
|
||||||
"version": "0.3.2",
|
"version": "0.3.4",
|
||||||
"description": "Language server for GitHub Actions",
|
"description": "Language server for GitHub Actions",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -43,12 +43,15 @@
|
|||||||
"watch": "tsc --build tsconfig.build.json --watch"
|
"watch": "tsc --build tsconfig.build.json --watch"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/languageservice": "^0.3.2",
|
"@actions/languageservice": "^0.3.4",
|
||||||
"@actions/workflow-parser": "^0.3.2",
|
"@actions/workflow-parser": "^0.3.4",
|
||||||
"@octokit/rest": "^19.0.7",
|
"@octokit/rest": "^19.0.7",
|
||||||
"@octokit/types": "^9.0.0",
|
"@octokit/types": "^9.0.0",
|
||||||
|
"@roamhq/mac-ca": "^1.0.7",
|
||||||
|
"node-forge": "^1.3.1",
|
||||||
"vscode-languageserver": "^8.0.2",
|
"vscode-languageserver": "^8.0.2",
|
||||||
"vscode-languageserver-textdocument": "^1.0.7",
|
"vscode-languageserver-textdocument": "^1.0.7",
|
||||||
|
"win-ca": "^3.5.0",
|
||||||
"yaml": "^2.1.3"
|
"yaml": "^2.1.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
export class CertificateReader {
|
||||||
|
getAllRootCAs(): string[] {
|
||||||
|
switch (process.platform) {
|
||||||
|
case "darwin":
|
||||||
|
return this.getMacOSCerts();
|
||||||
|
case "win32":
|
||||||
|
return this.getWindowsCerts();
|
||||||
|
default:
|
||||||
|
// We only support self-signed certs from Windows anc MacOS
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private getMacOSCerts(): string[] {
|
||||||
|
// loading modules here prevents unnecessary module loading
|
||||||
|
// see: https://stackoverflow.com/questions/9132772/lazy-loading-in-node-js
|
||||||
|
const macCa = require("@roamhq/mac-ca");
|
||||||
|
const forge = require("node-forge");
|
||||||
|
|
||||||
|
return macCa.all().map((cert: any) => forge.pki.certificateToPem(cert));
|
||||||
|
}
|
||||||
|
|
||||||
|
private getWindowsCerts(): string[] {
|
||||||
|
const ca = require("win-ca");
|
||||||
|
|
||||||
|
let rootCAs: string[] = [];
|
||||||
|
|
||||||
|
ca({
|
||||||
|
format: ca.der2.pem,
|
||||||
|
ondata: (crt: string) => rootCAs.push(crt)
|
||||||
|
});
|
||||||
|
|
||||||
|
return rootCAs;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +1,27 @@
|
|||||||
import {Octokit} from "@octokit/rest";
|
import {Octokit} from "@octokit/rest";
|
||||||
|
import {Agent} from "node:https";
|
||||||
|
import {CertificateReader} from "./certificate-reader";
|
||||||
|
|
||||||
export function getClient(token: string, userAgent?: string): Octokit {
|
export function getClient(token: string, userAgent?: string): Octokit {
|
||||||
return new Octokit({
|
const certReader = new CertificateReader();
|
||||||
auth: token,
|
const selfSignedCerts = certReader.getAllRootCAs();
|
||||||
userAgent: userAgent || `GitHub Actions Language Server`
|
|
||||||
});
|
if (selfSignedCerts.length > 0) {
|
||||||
|
const httpsAgent = new Agent({
|
||||||
|
ca: selfSignedCerts
|
||||||
|
});
|
||||||
|
|
||||||
|
return new Octokit({
|
||||||
|
auth: token,
|
||||||
|
userAgent: userAgent || `GitHub Actions Language Server`,
|
||||||
|
request: {
|
||||||
|
agent: httpsAgent
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
return new Octokit({
|
||||||
|
auth: token,
|
||||||
|
userAgent: userAgent || `GitHub Actions Language Server`
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/languageservice",
|
"name": "@actions/languageservice",
|
||||||
"version": "0.3.2",
|
"version": "0.3.4",
|
||||||
"description": "Language service for GitHub Actions",
|
"description": "Language service for GitHub Actions",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -44,8 +44,8 @@
|
|||||||
"watch": "tsc --build tsconfig.build.json --watch"
|
"watch": "tsc --build tsconfig.build.json --watch"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/expressions": "^0.3.2",
|
"@actions/expressions": "^0.3.4",
|
||||||
"@actions/workflow-parser": "^0.3.2",
|
"@actions/workflow-parser": "^0.3.4",
|
||||||
"vscode-languageserver-textdocument": "^1.0.7",
|
"vscode-languageserver-textdocument": "^1.0.7",
|
||||||
"vscode-languageserver-types": "^3.17.2",
|
"vscode-languageserver-types": "^3.17.2",
|
||||||
"vscode-uri": "^3.0.7",
|
"vscode-uri": "^3.0.7",
|
||||||
|
|||||||
@@ -474,4 +474,15 @@ jobs:
|
|||||||
expect(result.filter(x => x.label === "concurrency").map(x => x.textEdit?.newText)).toEqual(["concurrency"]);
|
expect(result.filter(x => x.label === "concurrency").map(x => x.textEdit?.newText)).toEqual(["concurrency"]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("adds a new line and indentation for mapping keys", async () => {
|
||||||
|
const input = "concurrency: |";
|
||||||
|
|
||||||
|
const result = await complete(...getPositionFromCursor(input));
|
||||||
|
|
||||||
|
expect(result.filter(x => x.label === "cancel-in-progress").map(x => x.textEdit?.newText)).toEqual([
|
||||||
|
"\n cancel-in-progress: "
|
||||||
|
]);
|
||||||
|
expect(result.filter(x => x.label === "group").map(x => x.textEdit?.newText)).toEqual(["\n group: "]);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -71,6 +71,10 @@ function mappingValues(
|
|||||||
// No special insertText in this case
|
// No special insertText in this case
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case DefinitionType.String:
|
||||||
|
case DefinitionType.Boolean:
|
||||||
|
insertText = `\n${indentation}${key}: `;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
insertText = `${key}: `;
|
insertText = `${key}: `;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
|
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
|
||||||
"useWorkspaces": true,
|
"useWorkspaces": true,
|
||||||
"version": "0.3.2"
|
"version": "0.3.4"
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+64
-11
@@ -135,7 +135,7 @@
|
|||||||
},
|
},
|
||||||
"expressions": {
|
"expressions": {
|
||||||
"name": "@actions/expressions",
|
"name": "@actions/expressions",
|
||||||
"version": "0.3.2",
|
"version": "0.3.4",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^29.0.3",
|
"@types/jest": "^29.0.3",
|
||||||
@@ -395,15 +395,18 @@
|
|||||||
},
|
},
|
||||||
"languageserver": {
|
"languageserver": {
|
||||||
"name": "@actions/languageserver",
|
"name": "@actions/languageserver",
|
||||||
"version": "0.3.2",
|
"version": "0.3.4",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/languageservice": "^0.3.2",
|
"@actions/languageservice": "^0.3.4",
|
||||||
"@actions/workflow-parser": "^0.3.2",
|
"@actions/workflow-parser": "^0.3.4",
|
||||||
"@octokit/rest": "^19.0.7",
|
"@octokit/rest": "^19.0.7",
|
||||||
"@octokit/types": "^9.0.0",
|
"@octokit/types": "^9.0.0",
|
||||||
|
"@roamhq/mac-ca": "^1.0.7",
|
||||||
|
"node-forge": "^1.3.1",
|
||||||
"vscode-languageserver": "^8.0.2",
|
"vscode-languageserver": "^8.0.2",
|
||||||
"vscode-languageserver-textdocument": "^1.0.7",
|
"vscode-languageserver-textdocument": "^1.0.7",
|
||||||
|
"win-ca": "^3.5.0",
|
||||||
"yaml": "^2.1.3"
|
"yaml": "^2.1.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -678,11 +681,11 @@
|
|||||||
},
|
},
|
||||||
"languageservice": {
|
"languageservice": {
|
||||||
"name": "@actions/languageservice",
|
"name": "@actions/languageservice",
|
||||||
"version": "0.3.2",
|
"version": "0.3.4",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/expressions": "^0.3.2",
|
"@actions/expressions": "^0.3.4",
|
||||||
"@actions/workflow-parser": "^0.3.2",
|
"@actions/workflow-parser": "^0.3.4",
|
||||||
"vscode-languageserver-textdocument": "^1.0.7",
|
"vscode-languageserver-textdocument": "^1.0.7",
|
||||||
"vscode-languageserver-types": "^3.17.2",
|
"vscode-languageserver-types": "^3.17.2",
|
||||||
"vscode-uri": "^3.0.7",
|
"vscode-uri": "^3.0.7",
|
||||||
@@ -3695,6 +3698,14 @@
|
|||||||
"typescript": "^3 || ^4"
|
"typescript": "^3 || ^4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@roamhq/mac-ca": {
|
||||||
|
"version": "1.0.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@roamhq/mac-ca/-/mac-ca-1.0.7.tgz",
|
||||||
|
"integrity": "sha512-AOHGY1R0pH+dWJueA5i1gx2V19CLfDa8ojanhyd5ZSI/YDZ3szDr0NSDntFgWGKsvT4TtvNZfDWmXuwbSY9fTg==",
|
||||||
|
"dependencies": {
|
||||||
|
"node-forge": "^1.3.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@sinclair/typebox": {
|
"node_modules/@sinclair/typebox": {
|
||||||
"version": "0.24.51",
|
"version": "0.24.51",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
@@ -6998,6 +7009,11 @@
|
|||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/is-electron": {
|
||||||
|
"version": "2.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.2.tgz",
|
||||||
|
"integrity": "sha512-FO/Rhvz5tuw4MCWkpMzHFKWD2LsfHzIb7i6MdPYZ/KW7AlxawyLkqdy+jPZP1WubqEADE3O4FUENlJHDfQASRg=="
|
||||||
|
},
|
||||||
"node_modules/is-extglob": {
|
"node_modules/is-extglob": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
@@ -8710,6 +8726,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/node-forge": {
|
||||||
|
"version": "1.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz",
|
||||||
|
"integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 6.13.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/node-gyp": {
|
"node_modules/node-gyp": {
|
||||||
"version": "9.3.0",
|
"version": "9.3.0",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
@@ -10688,7 +10712,6 @@
|
|||||||
},
|
},
|
||||||
"node_modules/split": {
|
"node_modules/split": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"through": "2"
|
"through": "2"
|
||||||
@@ -10954,7 +10977,6 @@
|
|||||||
},
|
},
|
||||||
"node_modules/through": {
|
"node_modules/through": {
|
||||||
"version": "2.3.8",
|
"version": "2.3.8",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/through2": {
|
"node_modules/through2": {
|
||||||
@@ -11469,6 +11491,37 @@
|
|||||||
"string-width": "^1.0.2 || 2 || 3 || 4"
|
"string-width": "^1.0.2 || 2 || 3 || 4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/win-ca": {
|
||||||
|
"version": "3.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/win-ca/-/win-ca-3.5.0.tgz",
|
||||||
|
"integrity": "sha512-0TgO/+2iz2pS3OxBy2ikovPHOYyZRdLRxRTT9ze7DpZwEpaahLFOBuac93GM3lYEVzDyf8fXskJjIX/EILvkhQ==",
|
||||||
|
"hasInstallScript": true,
|
||||||
|
"dependencies": {
|
||||||
|
"is-electron": "^2.2.0",
|
||||||
|
"make-dir": "^1.3.0",
|
||||||
|
"node-forge": "^1.2.1",
|
||||||
|
"split": "^1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/win-ca/node_modules/make-dir": {
|
||||||
|
"version": "1.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz",
|
||||||
|
"integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"pify": "^3.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/win-ca/node_modules/pify": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/word-wrap": {
|
"node_modules/word-wrap": {
|
||||||
"version": "1.2.3",
|
"version": "1.2.3",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
@@ -11720,10 +11773,10 @@
|
|||||||
},
|
},
|
||||||
"workflow-parser": {
|
"workflow-parser": {
|
||||||
"name": "@actions/workflow-parser",
|
"name": "@actions/workflow-parser",
|
||||||
"version": "0.3.2",
|
"version": "0.3.4",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/expressions": "^0.3.2",
|
"@actions/expressions": "^0.3.4",
|
||||||
"cronstrue": "^2.21.0",
|
"cronstrue": "^2.21.0",
|
||||||
"yaml": "^2.0.0-8"
|
"yaml": "^2.0.0-8"
|
||||||
},
|
},
|
||||||
|
|||||||
Executable
+24
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
VERSION=$(cat lerna.json | jq -r '.version')
|
||||||
|
|
||||||
|
MAJOR=$(echo $VERSION | cut -d. -f1)
|
||||||
|
MINOR=$(echo $VERSION | cut -d. -f2)
|
||||||
|
PATCH=$(echo $VERSION | cut -d. -f3)
|
||||||
|
|
||||||
|
if [ "$1" == "major" ]; then
|
||||||
|
MAJOR=$((MAJOR+1))
|
||||||
|
MINOR=0
|
||||||
|
PATCH=0
|
||||||
|
elif [ "$1" == "minor" ]; then
|
||||||
|
MINOR=$((MINOR+1))
|
||||||
|
PATCH=0
|
||||||
|
elif [ "$1" == "patch" ]; then
|
||||||
|
PATCH=$((PATCH+1))
|
||||||
|
else
|
||||||
|
echo "Invalid version type. Use 'major', 'minor' or 'patch'"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
NEW_VERSION="$MAJOR.$MINOR.$PATCH"
|
||||||
|
echo $NEW_VERSION
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/workflow-parser",
|
"name": "@actions/workflow-parser",
|
||||||
"version": "0.3.2",
|
"version": "0.3.4",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"source": "./src/index.ts",
|
"source": "./src/index.ts",
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
"watch": "tsc --build tsconfig.build.json --watch"
|
"watch": "tsc --build tsconfig.build.json --watch"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/expressions": "^0.3.2",
|
"@actions/expressions": "^0.3.4",
|
||||||
"cronstrue": "^2.21.0",
|
"cronstrue": "^2.21.0",
|
||||||
"yaml": "^2.0.0-8"
|
"yaml": "^2.0.0-8"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ function convertStep(context: TemplateContext, idBuilder: IdBuilder, step: Templ
|
|||||||
let id: StringToken | undefined;
|
let id: StringToken | undefined;
|
||||||
let name: ScalarToken | undefined;
|
let name: ScalarToken | undefined;
|
||||||
let uses: StringToken | undefined;
|
let uses: StringToken | undefined;
|
||||||
let continueOnError: boolean | undefined;
|
let continueOnError: boolean | ScalarToken | undefined;
|
||||||
let env: MappingToken | undefined;
|
let env: MappingToken | undefined;
|
||||||
const ifCondition = new BasicExpressionToken(undefined, undefined, "success()", undefined, undefined, undefined);
|
const ifCondition = new BasicExpressionToken(undefined, undefined, "success()", undefined, undefined, undefined);
|
||||||
for (const item of mapping) {
|
for (const item of mapping) {
|
||||||
@@ -78,7 +78,11 @@ function convertStep(context: TemplateContext, idBuilder: IdBuilder, step: Templ
|
|||||||
env = item.value.assertMapping("step env");
|
env = item.value.assertMapping("step env");
|
||||||
break;
|
break;
|
||||||
case "continue-on-error":
|
case "continue-on-error":
|
||||||
continueOnError = item.value.assertBoolean("steps item continue-on-error").value;
|
if (!item.value.isExpression) {
|
||||||
|
continueOnError = item.value.assertBoolean("steps item continue-on-error").value;
|
||||||
|
} else {
|
||||||
|
continueOnError = item.value.assertScalar("steps item continue-on-error");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ type BaseStep = {
|
|||||||
id: string;
|
id: string;
|
||||||
name?: ScalarToken;
|
name?: ScalarToken;
|
||||||
if: BasicExpressionToken;
|
if: BasicExpressionToken;
|
||||||
"continue-on-error"?: boolean;
|
"continue-on-error"?: boolean | ScalarToken;
|
||||||
env?: MappingToken;
|
env?: MappingToken;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -577,7 +577,8 @@
|
|||||||
"mapping": {
|
"mapping": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"types": "merge-group-activity",
|
"types": "merge-group-activity",
|
||||||
"branches": "event-branches"
|
"branches": "event-branches",
|
||||||
|
"branches-ignore": "event-branches-ignore"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+7
-2
@@ -73,8 +73,10 @@ on:
|
|||||||
- deleted
|
- deleted
|
||||||
merge_group:
|
merge_group:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- main
|
- main
|
||||||
|
branches-ignore:
|
||||||
|
- develop
|
||||||
types:
|
types:
|
||||||
- checks_requested
|
- checks_requested
|
||||||
milestone:
|
milestone:
|
||||||
@@ -321,6 +323,9 @@ jobs:
|
|||||||
"master",
|
"master",
|
||||||
"main"
|
"main"
|
||||||
],
|
],
|
||||||
|
"branches-ignore": [
|
||||||
|
"develop"
|
||||||
|
],
|
||||||
"types": [
|
"types": [
|
||||||
"checks_requested"
|
"checks_requested"
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user