You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit body is calculated incorrectly in some cases #37865
While investigating the problem with docs scope exclusion from min body length checks (see #37862), I noticed that the commit body that we use for length check also includes the content that would be dropped after the commit is made. For example when I make some change, run the git commit command and presented with the screen to type commit message like this:
docs: some test
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch docs-test
# Changes to be committed:
# modified: aio/content/marketing/resources.json
#
# Changes not staged for commit:
# modified: .ng-dev/config.ts
#
Everything below the first 2 lines (all lines that start with #) are treated as commit body, thus passing the min length validation even though it would later fail on CI.
The proposal is to process commit body before performing the length check and remove all lines that start with #.
changed the title [-]Commit body is calculated incorrectly in some cases locally[/-][+]Commit body is calculated incorrectly in some cases[/+]on Jun 30, 2020
I ran into a similar issue, where commit message validation was failing due to a long line that was part of the comment:
# Changes to be committed:
# renamed: aio/tools/examples/shared/boilerplate/i18n/polyfills.ts --> aio/tools/examples/shared/boilerplate/i18n/src/polyfills.ts
Activity
[-]Commit body is calculated incorrectly in some cases locally[/-][+]Commit body is calculated incorrectly in some cases[/+]gkalpak commentedon Jul 21, 2020
I ran into a similar issue, where commit message validation was failing due to a long line that was part of the comment:
refactor(dev-infra): update commit body checks
fix(dev-infra): ignore comments when validating commit messages
fix(dev-infra): ignore comments when validating commit messages
fix(dev-infra): ignore comments when validating commit messages (#38438)
fix(dev-infra): ignore comments when validating commit messages (angu…
fix(dev-infra): ignore comments when validating commit messages (angu…
angular-automatic-lock-bot commentedon Sep 21, 2020
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.