From c4ecaeda64d030a4e1bd9adc1fad653764a1cee6 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Wed, 25 Jan 2017 09:38:52 -0800 Subject: [PATCH] ci: add support for 'aoi' scope in commit messages for angular.io --- CONTRIBUTING.md | 1 + tools/validate-commit-message/commit-message.json | 1 + .../validate-commit-message.spec.js | 12 ++++++------ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 92b771b1d5..7feeabc07c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -227,6 +227,7 @@ There is currently few exception to the "use package name" rule: * **packaging**: used for changes that change the npm package layout in all of our packages, e.g. public path changes, package.json changes done to all packages, d.ts file/format changes, changes to bundles, etc. * **changelog**: used for updating the release notes in CHANGELOG.md +* **aio**: used for angular.io changes within the /angular.io directory of the repo * none/empty string: useful for `style`, `test` and `refactor` changes that are done across all packages (e.g. `style: add missing semicolons`) diff --git a/tools/validate-commit-message/commit-message.json b/tools/validate-commit-message/commit-message.json index ec19bb7e13..96f5280bf6 100644 --- a/tools/validate-commit-message/commit-message.json +++ b/tools/validate-commit-message/commit-message.json @@ -12,6 +12,7 @@ "test" ], "scopes": [ + "aio", "benchpress", "common", "compiler", diff --git a/tools/validate-commit-message/validate-commit-message.spec.js b/tools/validate-commit-message/validate-commit-message.spec.js index bb78633904..f52ce45b3c 100644 --- a/tools/validate-commit-message/validate-commit-message.spec.js +++ b/tools/validate-commit-message/validate-commit-message.spec.js @@ -44,22 +44,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: benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, upgrade, tsc-wrapped, packaging, changelog', + ' => SCOPES: aio, benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, upgrade, tsc-wrapped, packaging, changelog', 'INVALID COMMIT MSG: "feat(bah): something"\n' + ' => ERROR: "bah" is not an allowed scope.\n' + - ' => SCOPES: benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, upgrade, tsc-wrapped, packaging, changelog', + ' => SCOPES: aio, benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, upgrade, tsc-wrapped, packaging, changelog', 'INVALID COMMIT MSG: "docs(animations): something"\n' + ' => ERROR: "animations" is not an allowed scope.\n' + - ' => SCOPES: benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, upgrade, tsc-wrapped, packaging, changelog', + ' => SCOPES: aio, benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, upgrade, tsc-wrapped, packaging, changelog', 'INVALID COMMIT MSG: "style(webworker): something"\n' + ' => ERROR: "webworker" is not an allowed scope.\n' + - ' => SCOPES: benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, upgrade, tsc-wrapped, packaging, changelog', + ' => SCOPES: aio, benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, upgrade, tsc-wrapped, packaging, changelog', 'INVALID COMMIT MSG: "refactor(security): something"\n' + ' => ERROR: "security" is not an allowed scope.\n' + - ' => SCOPES: benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, upgrade, tsc-wrapped, packaging, changelog', + ' => SCOPES: aio, benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, upgrade, tsc-wrapped, packaging, changelog', 'INVALID COMMIT MSG: "refactor(docs): something"\n' + ' => ERROR: "docs" is not an allowed scope.\n' + - ' => SCOPES: benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, upgrade, tsc-wrapped, packaging, changelog'] + ' => SCOPES: aio, benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, upgrade, tsc-wrapped, packaging, changelog'] .forEach((expectedErrorMessage, index) => { expect(expectedErrorMessage).toEqual(errors[index]); });