ci: add support for 'aoi' scope in commit messages for angular.io

This commit is contained in:
Igor Minar 2017-01-25 09:38:52 -08:00 committed by Victor Berchet
parent b28f01bb7f
commit c4ecaeda64
3 changed files with 8 additions and 6 deletions

View File

@ -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. * **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 * **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`) * none/empty string: useful for `style`, `test` and `refactor` changes that are done across all packages (e.g. `style: add missing semicolons`)

View File

@ -12,6 +12,7 @@
"test" "test"
], ],
"scopes": [ "scopes": [
"aio",
"benchpress", "benchpress",
"common", "common",
"compiler", "compiler",

View File

@ -44,22 +44,22 @@ describe('validate-commit-message.js', function() {
expect(validateMessage('refactor(docs): something')).toBe(INVALID); expect(validateMessage('refactor(docs): something')).toBe(INVALID);
['INVALID COMMIT MSG: "fix(Compiler): something"\n' + ['INVALID COMMIT MSG: "fix(Compiler): something"\n' +
' => ERROR: "Compiler" is not an allowed scope.\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' + 'INVALID COMMIT MSG: "feat(bah): something"\n' +
' => ERROR: "bah" is not an allowed scope.\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' + 'INVALID COMMIT MSG: "docs(animations): something"\n' +
' => ERROR: "animations" is not an allowed scope.\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' + 'INVALID COMMIT MSG: "style(webworker): something"\n' +
' => ERROR: "webworker" is not an allowed scope.\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' + 'INVALID COMMIT MSG: "refactor(security): something"\n' +
' => ERROR: "security" is not an allowed scope.\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' + 'INVALID COMMIT MSG: "refactor(docs): something"\n' +
' => ERROR: "docs" is not an allowed scope.\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) => { .forEach((expectedErrorMessage, index) => {
expect(expectedErrorMessage).toEqual(errors[index]); expect(expectedErrorMessage).toEqual(errors[index]);
}); });