Compare commits

..

38 Commits

Author SHA1 Message Date
Jonathan Tamsut 337576fbb9 small README update 2023-04-27 09:00:21 -07:00
Jonathan Tamsut 5cb4007629 Merge pull request #26 from actions/release/0.3.4
Release version 0.3.4
2023-04-21 11:10:29 -07:00
GitHub Actions 07fa29649e Release extension version 0.3.4 2023-04-21 18:09:23 +00:00
Liela Rotschy 7bb2962bb0 Merge pull request #25 from actions/lrotschy/add-branches-ignore-to-merge-group-schema
Add branches-ignore to merge group schema
2023-04-19 14:38:04 -06:00
Liela Rotschy 3904c64796 Alphabetize 2023-04-19 13:15:08 -06:00
Liela Rotschy 48ad5e5251 Fix indentation 2023-04-19 13:11:39 -06:00
Liela Rotschy 317c4fcd63 Fix hyphen 2023-04-19 12:58:00 -06:00
Liela Rotschy bf97052855 Add branches-ignore to merge group schema 2023-04-19 12:29:38 -06:00
Crystal Tenn dd8930fd74 Merge pull request #24 from actions/ketchup/fixReusableWorkflowRef
Fix Reusable Workflow Reference for Windows by using vscodeURI instead of path.join
2023-04-19 11:07:04 -04:00
Crystal Tenn 2449e5cea1 make variable names more specific 2023-04-18 18:16:55 -04:00
Crystal Tenn dba3cf5d96 remove unused reference to path 2023-04-18 18:13:52 -04:00
Crystal Tenn 804f83828f fix path reference for reusable workflows and use vscodeURI instead 2023-04-18 17:30:53 -04:00
Crystal Tenn cf2fd6332f Merge pull request #22 from actions/release/0.3.3
Release version 0.3.3
2023-04-14 15:06:27 -04:00
GitHub Actions 51649f27f8 Release extension version 0.3.3 2023-04-14 19:05:30 +00:00
Jonathan Tamsut 74db91e276 Merge pull request #20 from actions/jtamsut/auto-complete-for-mappings
Handle auto-completion for string and boolean mappings
2023-04-14 12:03:28 -07:00
Jonathan Tamsut a1d81c730f yarn prettier 2023-04-14 10:29:20 -07:00
Jonathan Tamsut 18d1bd9734 fix case bug 2023-04-14 10:22:42 -07:00
Jonathan Tamsut fc6a1d3e0c Merge branch 'main' into jtamsut/auto-complete-for-mappings 2023-04-14 09:51:39 -07:00
Jonathan Tamsut 6df34a78ce Update languageservice/src/value-providers/definition.ts
Co-authored-by: Josh Gross <joshmgross@github.com>
2023-04-14 09:51:27 -07:00
Liela Rotschy aee5c2b919 Merge pull request #21 from actions/lrotschy/add-project-board-link
Add project board link to CONTRIBUTING.md
2023-04-14 09:54:11 -06:00
Liela Rotschy 8cdfe810db Add project board link to CONTRIBUTING.md 2023-04-14 08:03:11 -06:00
Jonathan Tamsut 17a680df41 Merge branch 'jtamsut/auto-complete-for-mappings' of https://github.com/actions/languageservices into jtamsut/auto-complete-for-mappings 2023-04-13 15:30:18 -07:00
Jonathan Tamsut 11d3fc25ee run prettier 2023-04-13 15:26:31 -07:00
Jonathan Tamsut d2783ed733 Merge branch 'main' into jtamsut/auto-complete-for-mappings 2023-04-13 15:22:22 -07:00
Jonathan Tamsut 6d0f74e38b fix typo 2023-04-13 15:21:36 -07:00
Jonathan Tamsut 2ecbeafacb add tests 2023-04-13 15:21:23 -07:00
Jonathan Tamsut a4d3fb1a3e add newline to boolean 2023-04-13 10:05:39 -07:00
Beth Brennan 83cac82450 Merge pull request #16 from actions/elbrenn/contributing-links
Fix links in CONTRIBUTING.md
2023-04-12 18:39:55 -04:00
Jonathan Tamsut fc2bacfcdc add break 2023-04-12 15:37:42 -07:00
Jonathan Tamsut 7d8a7c11a6 handle string and boolean mappings 2023-04-12 15:26:17 -07:00
Felipe Suero e37d7620d6 Merge pull request #19 from actions/felipesu19-on-error-tokens
Fixes errors around "on-error" token parsing
2023-04-12 11:45:38 -04:00
Felipe Suero 6e8cbc3e8c prettify 2023-04-12 11:32:38 -04:00
Felipe Suero d0916938ce Remove TokenType 2023-04-12 11:26:59 -04:00
Felipe Suero 488879804f prettify 2023-04-11 13:56:02 -04:00
Felipe Suero 736dd1a66c add scalar handling 2023-04-11 13:54:53 -04:00
Felipe Suero d58deaf097 Remove branch 2023-04-11 10:12:38 -04:00
Felipe Suero f4a32c43cf token 2023-04-11 10:05:30 -04:00
Beth Brennan f29fffce7e Fix links in CONTRIBUTING.md 2023-04-07 13:28:49 -04:00
15 changed files with 68 additions and 30 deletions
+10 -2
View File
@@ -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 track issues on our project board [here](https://github.com/orgs/github/projects/9557/views/1).
Please do:
* 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`.
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.
@@ -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/)
- [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
+3 -1
View File
@@ -1,5 +1,7 @@
# actions/expressions
blah
`@actions/expressions` is a library to parse and evaluate GitHub Actions [expressions](https://docs.github.com/actions/learn-github-actions/expressions).
## Installation
@@ -92,4 +94,4 @@ npm run format-check
## License
This project is licensed under the terms of the MIT open source license. Please refer to [MIT](../LICENSE) for the full terms.
This project is licensed under the terms of the MIT open source license. Please refer to [MIT](../LICENSE) for the full terms.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@actions/expressions",
"version": "0.3.2",
"version": "0.3.4",
"license": "MIT",
"type": "module",
"source": "./src/index.ts",
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@actions/languageserver",
"version": "0.3.2",
"version": "0.3.4",
"description": "Language server for GitHub Actions",
"license": "MIT",
"type": "module",
@@ -43,8 +43,8 @@
"watch": "tsc --build tsconfig.build.json --watch"
},
"dependencies": {
"@actions/languageservice": "^0.3.2",
"@actions/workflow-parser": "^0.3.2",
"@actions/languageservice": "^0.3.4",
"@actions/workflow-parser": "^0.3.4",
"@octokit/rest": "^19.0.7",
"@octokit/types": "^9.0.0",
"vscode-languageserver": "^8.0.2",
+5 -2
View File
@@ -2,8 +2,8 @@ import {File} from "@actions/workflow-parser/workflows/file";
import {FileProvider} from "@actions/workflow-parser/workflows/file-provider";
import {fileIdentifier} from "@actions/workflow-parser/workflows/file-reference";
import {Octokit} from "@octokit/rest";
import path from "path";
import {TTLCache} from "./utils/cache";
import vscodeURI from "vscode-uri/lib/umd";
export function getFileProvider(
client: Octokit | undefined,
@@ -31,7 +31,10 @@ export function getFileProvider(
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) {
throw new Error(`File not found: ${ref.path}`);
}
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@actions/languageservice",
"version": "0.3.2",
"version": "0.3.4",
"description": "Language service for GitHub Actions",
"license": "MIT",
"type": "module",
@@ -44,8 +44,8 @@
"watch": "tsc --build tsconfig.build.json --watch"
},
"dependencies": {
"@actions/expressions": "^0.3.2",
"@actions/workflow-parser": "^0.3.2",
"@actions/expressions": "^0.3.4",
"@actions/workflow-parser": "^0.3.4",
"vscode-languageserver-textdocument": "^1.0.7",
"vscode-languageserver-types": "^3.17.2",
"vscode-uri": "^3.0.7",
+11
View File
@@ -474,4 +474,15 @@ jobs:
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
break;
case DefinitionType.String:
case DefinitionType.Boolean:
insertText = `\n${indentation}${key}: `;
break;
default:
insertText = `${key}: `;
}
+1 -1
View File
@@ -1,5 +1,5 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useWorkspaces": true,
"version": "0.3.2"
"version": "0.3.4"
}
+9 -9
View File
@@ -135,7 +135,7 @@
},
"expressions": {
"name": "@actions/expressions",
"version": "0.3.2",
"version": "0.3.4",
"license": "MIT",
"devDependencies": {
"@types/jest": "^29.0.3",
@@ -395,11 +395,11 @@
},
"languageserver": {
"name": "@actions/languageserver",
"version": "0.3.2",
"version": "0.3.4",
"license": "MIT",
"dependencies": {
"@actions/languageservice": "^0.3.2",
"@actions/workflow-parser": "^0.3.2",
"@actions/languageservice": "^0.3.4",
"@actions/workflow-parser": "^0.3.4",
"@octokit/rest": "^19.0.7",
"@octokit/types": "^9.0.0",
"vscode-languageserver": "^8.0.2",
@@ -678,11 +678,11 @@
},
"languageservice": {
"name": "@actions/languageservice",
"version": "0.3.2",
"version": "0.3.4",
"license": "MIT",
"dependencies": {
"@actions/expressions": "^0.3.2",
"@actions/workflow-parser": "^0.3.2",
"@actions/expressions": "^0.3.4",
"@actions/workflow-parser": "^0.3.4",
"vscode-languageserver-textdocument": "^1.0.7",
"vscode-languageserver-types": "^3.17.2",
"vscode-uri": "^3.0.7",
@@ -11720,10 +11720,10 @@
},
"workflow-parser": {
"name": "@actions/workflow-parser",
"version": "0.3.2",
"version": "0.3.4",
"license": "MIT",
"dependencies": {
"@actions/expressions": "^0.3.2",
"@actions/expressions": "^0.3.4",
"cronstrue": "^2.21.0",
"yaml": "^2.0.0-8"
},
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@actions/workflow-parser",
"version": "0.3.2",
"version": "0.3.4",
"license": "MIT",
"type": "module",
"source": "./src/index.ts",
@@ -43,7 +43,7 @@
"watch": "tsc --build tsconfig.build.json --watch"
},
"dependencies": {
"@actions/expressions": "^0.3.2",
"@actions/expressions": "^0.3.4",
"cronstrue": "^2.21.0",
"yaml": "^2.0.0-8"
},
+6 -2
View File
@@ -50,7 +50,7 @@ function convertStep(context: TemplateContext, idBuilder: IdBuilder, step: Templ
let id: StringToken | undefined;
let name: ScalarToken | undefined;
let uses: StringToken | undefined;
let continueOnError: boolean | undefined;
let continueOnError: boolean | ScalarToken | undefined;
let env: MappingToken | undefined;
const ifCondition = new BasicExpressionToken(undefined, undefined, "success()", undefined, undefined, undefined);
for (const item of mapping) {
@@ -78,7 +78,11 @@ function convertStep(context: TemplateContext, idBuilder: IdBuilder, step: Templ
env = item.value.assertMapping("step env");
break;
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;
name?: ScalarToken;
if: BasicExpressionToken;
"continue-on-error"?: boolean;
"continue-on-error"?: boolean | ScalarToken;
env?: MappingToken;
};
+2 -1
View File
@@ -577,7 +577,8 @@
"mapping": {
"properties": {
"types": "merge-group-activity",
"branches": "event-branches"
"branches": "event-branches",
"branches-ignore": "event-branches-ignore"
}
}
},
+7 -2
View File
@@ -73,8 +73,10 @@ on:
- deleted
merge_group:
branches:
- master
- main
- master
- main
branches-ignore:
- develop
types:
- checks_requested
milestone:
@@ -321,6 +323,9 @@ jobs:
"master",
"main"
],
"branches-ignore": [
"develop"
],
"types": [
"checks_requested"
]