Commit body is calculated incorrectly in some cases · Issue #37865 · angular/angular · GitHub
Skip to content

Commit body is calculated incorrectly in some cases #37865

Closed

Description

@AndrewKushnir

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 #.

Activity

  1. added
    area: dev-infraIssues related to Angular's own dev infra (build, test, CI, releasing)
    on Jun 30, 2020
  2. added this to the needsTriage milestone on Jun 30, 2020
  3. changed the title [-]Commit body is calculated incorrectly in some cases locally[/-] [+]Commit body is calculated incorrectly in some cases[/+] on Jun 30, 2020
  4. gkalpak commented on Jul 21, 2020

    @gkalpak
    Member

    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
    
  5. self-assigned this
    on Jul 21, 2020
  6. added a commit that references this issue on Jul 21, 2020
    4745fe6
  7. added a commit that references this issue on Jul 21, 2020
    07bda48
  8. added a commit that references this issue on Aug 20, 2020
    4cab82e
  9. added a commit that references this issue on Aug 21, 2020
    6b98567
  10. added 2 commits that reference this issue on Aug 29, 2020
    2f6fd03
  11. added a commit that references this issue on Sep 5, 2020
    de7e580
  12. angular-automatic-lock-bot commented on Sep 21, 2020

    @angular-automatic-lock-bot

    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.

  13. locked and limited conversation to collaborators on Sep 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions