From 53d4859f48465b850098d08647bdfe60852adf73 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Mon, 6 Jul 2020 19:00:59 -0700 Subject: [PATCH] build: add .gitmessage file with commit message template (#37951) Git provides a way to create a commit message template via the `.gitmessage` file. Introduce an Angular-specific .gitmessage template based on the original Commit Message Guidelines. https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-guidelines If this template workflow is proven in practice, we can move the commit message guidelines into the .gitmessage file to prevent duplication of the content. This change is a follow up on #37949 and is inspired by info found in the following blog post: https://thoughtbot.com/blog/better-commit-messages-with-a-gitmessage-template PR Close #37951 --- .gitmessage | 145 ++++++++++++++++++++++++++++++++++++++++++++++++ CONTRIBUTING.md | 140 +++++++++++++++++++++++++++++----------------- 2 files changed, 235 insertions(+), 50 deletions(-) create mode 100644 .gitmessage diff --git a/.gitmessage b/.gitmessage new file mode 100644 index 0000000000..46b6ffbd5c --- /dev/null +++ b/.gitmessage @@ -0,0 +1,145 @@ +(): + + + +Fixes # + +# ────────────────────────────────────────── 100 chars ────────────────────────────────────────────┤ + + +# Example Commit Messages +# ======================= + + +# ─── Example: Simple refactor ────────────────────────────────────────────────────────────────────┤ +# refactor(core): rename refreshDynamicEmbeddedViews to refreshEmbeddedViews +# +# Improve code readability. The original name no longer matches how the function is used. +# ─────────────────────────────────────────────────────────────────────────────────────────────────┤ + + +# ─── Example: Simple docs change ─────────────────────────────────────────────────────────────────┤ +# docs: clarify the service limitation in providers.md guide +# +# Fixes #36332 +# ─────────────────────────────────────────────────────────────────────────────────────────────────┤ + + +# ─── Example: A bug fix ──────────────────────────────────────────────────────────────────────────┤ +# fix(ngcc): ensure lockfile is removed when `analyzeFn` fails +# +# Previously an error thrown in the `analyzeFn` would cause the ngcc process to exit immediately +# without removing the lockfile, and potentially before the unlocker process had been successfully +# spawned resulting in the lockfile being orphaned and left behind. +# +# Now we catch these errors and remove the lockfile as needed. +# ─────────────────────────────────────────────────────────────────────────────────────────────────┤ + + +# ─── Example: Breaking change ────────────────────────────────────────────────────────────────────┤ +# feat(bazel): simplify ng_package by dropping esm5 and fesm5 +# +# esm5 and fesm5 distributions are no longer needed and have been deprecated in the past. +# +# https://v9.angular.io/guide/deprecations#esm5-and-fesm5-code-formats-in-angular-npm-packages +# +# This commit modifies ng_package to no longer distribute these two formats in npm packages built by +# ng_package (e.g. @angular/core). +# +# This commit intentionally doesn't fully clean up the ng_package rule to remove all traces of esm5 +# and fems5 build artifacts as that is a bigger cleanup and currently we are narrowing down the +# scope of this change to the MVP needed for v10, which in this case is 'do not put esm5 and fesm5' +# into the npm packages. +# +# More cleanup to follow: https://angular-team.atlassian.net/browse/FW-2143 +# +# BREAKING CHANGE: esm5 and fesm5 format is no longer distributed in Angular's npm packages e.g. +# @angular/core +# +# Angular CLI will automatically downlevel the code to es5 if differential loading is enabled in the +# Angular project, so no action is required from Angular CLI users. +# +# If you are not using Angular CLI to build your application or library, and you need to be able to +# build es5 artifacts, then you will need to downlevel the distributed Angular code to es5 on your +# own. +# +# +# Fixes #1234 +# ─────────────────────────────────────────────────────────────────────────────────────────────────┤ + + + +# Angular Commit Message Format +# ============================= +# +# The full specification of the Angular Commit Message Format can be found at +# https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit +# +# The following is an excerpt of the specification with the most commonly needed info. +# +# Each commit message consists of a *header*, a *body*, and a *footer*. +# +#
+# +# +# +#