From 561b05f6cb6952ddb6c4b9ee8251e3bfe9a2ebbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=A1ko=20Hevery?= Date: Tue, 9 Jan 2018 13:46:19 -0800 Subject: [PATCH] docs(ivy): add Ivy as a recognized label --- .circleci/config.yml | 2 +- docs/TRIAGE_AND_LABELS.md | 1 + tools/validate-commit-message/BUILD.bazel | 6 ++++++ .../validate-commit-message/commit-message.json | 1 + .../validate-commit-message.js | 2 ++ .../validate-commit-message.spec.js | 17 +++++++++-------- 6 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 tools/validate-commit-message/BUILD.bazel diff --git a/.circleci/config.yml b/.circleci/config.yml index 6f2ab7e4c4b92..35efc0845a679 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -62,7 +62,7 @@ jobs: # Use bazel query so that we explicitly ask for all buildable targets to be built as well # This avoids waiting for a build command to finish before running the first test # See https://github.com/bazelbuild/bazel/issues/4257 - - run: bazel query --output=label '//modules/... union //packages/... union @angular//...' | xargs bazel test --config=ci + - run: bazel query --output=label '//modules/... union //packages/... union //tools/... union @angular//...' | xargs bazel test --config=ci - save_cache: key: *cache_key diff --git a/docs/TRIAGE_AND_LABELS.md b/docs/TRIAGE_AND_LABELS.md index b0074b42da0c4..5894e23e006dc 100644 --- a/docs/TRIAGE_AND_LABELS.md +++ b/docs/TRIAGE_AND_LABELS.md @@ -20,6 +20,7 @@ The components have a clear piece of source code associated with it within the ` * `comp: common/http` - this includes core components / pipes * `comp: core & compiler` - because core, compiler, compiler-cli and browser-platforms are very intertwined, we will be treating them as one +* `comp: ivy` - a subset of core representing the new Ivy renderer. * `comp: forms` * `comp: http` * `comp: i18n` diff --git a/tools/validate-commit-message/BUILD.bazel b/tools/validate-commit-message/BUILD.bazel new file mode 100644 index 0000000000000..7570f699b8df4 --- /dev/null +++ b/tools/validate-commit-message/BUILD.bazel @@ -0,0 +1,6 @@ +load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test") + +jasmine_node_test( + name = "validate-commit-message", + srcs = glob(["*.js"]), +) diff --git a/tools/validate-commit-message/commit-message.json b/tools/validate-commit-message/commit-message.json index 13e87f65e86f2..7b89490642df2 100644 --- a/tools/validate-commit-message/commit-message.json +++ b/tools/validate-commit-message/commit-message.json @@ -23,6 +23,7 @@ "core", "forms", "http", + "ivy", "language-service", "platform-browser", "platform-browser-dynamic", diff --git a/tools/validate-commit-message/validate-commit-message.js b/tools/validate-commit-message/validate-commit-message.js index 12f79e51a324a..f3bcee9c5c7db 100644 --- a/tools/validate-commit-message/validate-commit-message.js +++ b/tools/validate-commit-message/validate-commit-message.js @@ -58,3 +58,5 @@ module.exports = function(commitSubject) { function error(errorMessage, commitMessage) { console.error(`INVALID COMMIT MSG: "${commitMessage}"\n => ERROR: ${errorMessage}`); } + +module.exports.config = config; diff --git a/tools/validate-commit-message/validate-commit-message.spec.js b/tools/validate-commit-message/validate-commit-message.spec.js index 4b13d96071420..6813bfe9660b3 100644 --- a/tools/validate-commit-message/validate-commit-message.spec.js +++ b/tools/validate-commit-message/validate-commit-message.spec.js @@ -8,6 +8,7 @@ describe('validate-commit-message.js', function() { var validateMessage = require('./validate-commit-message'); + var SCOPES = validateMessage.config.scopes.join(', '); var errors = []; var logs = []; @@ -51,22 +52,22 @@ describe('validate-commit-message.js', function() { expect(validateMessage('refactor(docs): something')).toBe(INVALID); ['INVALID COMMIT MSG: "fix(Compiler): something"\n' + ' => ERROR: "Compiler" is not an allowed scope.\n' + - ' => SCOPES: aio, animations, bazel, benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, service-worker, upgrade, packaging, changelog', + ' => SCOPES: ' + SCOPES, 'INVALID COMMIT MSG: "feat(bah): something"\n' + ' => ERROR: "bah" is not an allowed scope.\n' + - ' => SCOPES: aio, animations, bazel, benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, service-worker, upgrade, packaging, changelog', + ' => SCOPES: ' + SCOPES, 'INVALID COMMIT MSG: "style(webworker): something"\n' + ' => ERROR: "webworker" is not an allowed scope.\n' + - ' => SCOPES: aio, animations, bazel, benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, service-worker, upgrade, packaging, changelog', + ' => SCOPES: ' + SCOPES, 'INVALID COMMIT MSG: "refactor(security): something"\n' + ' => ERROR: "security" is not an allowed scope.\n' + - ' => SCOPES: aio, animations, bazel, benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, service-worker, upgrade, packaging, changelog', + ' => SCOPES: ' + SCOPES, 'INVALID COMMIT MSG: "refactor(docs): something"\n' + ' => ERROR: "docs" is not an allowed scope.\n' + - ' => SCOPES: aio, animations, bazel, benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, service-worker, upgrade, packaging, changelog'] - .forEach((expectedErrorMessage, index) => { - expect(expectedErrorMessage).toEqual(errors[index]); - }); + ' => SCOPES: ' + SCOPES, + ].forEach((expectedErrorMessage, index) => { + expect(expectedErrorMessage).toEqual(errors[index]); + }); expect(validateMessage('release(angular): something')).toBe(INVALID); });