Skip to content

Add an option to make messages capitalized #80

Description

@lexuzieel

Hello!

In my repos I write messages starting with capital letter. Whilst this extension gets the message correct, it does not capitalize the message.

i.e. currently when I change a file and press a button, I get this message:
image

I have to change the first letter of the message to capital manually:
image

Is there a way to change this behavior (probably through settings)?

Activity

  1. MichaelCurrin commented on Jul 22, 2022

    @MichaelCurrin
    Owner

    Hi, thanks for the interest and suggestion.

    I'll add this as something you can control in settings.

  2. MichaelCurrin commented on Jul 26, 2022

    @MichaelCurrin
    Owner

    Hi, I added a draft PR. I got this working for a narrow usecase, now need to get it to work for multiple file changes and when not using a type prefix.

  3. MichaelCurrin commented on Jul 26, 2022

    @MichaelCurrin
    Owner

    Here's how it is configured:
    Screenshot_2022-07-26_17-39-33

  4. lexuzieel commented on Oct 25, 2022

    @lexuzieel
    Author

    Hey that looks great! Sorry for late response.
    I see that PR is failing on build but the logs are expired, so I cannot see them.
    Could you please re-run the job?

  5. lexuzieel commented on Nov 14, 2022

    @lexuzieel
    Author

    I have forked your version and fixed linter errors, however I was not able to build current version due to error

    Error: Cannot find module 'vscode'
    

    https://github.com/avixFF/auto-commit-msg/actions/runs/3463893007/jobs/5784743972

  6. lexuzieel commented on Nov 14, 2022

    @lexuzieel
    Author

    Alright, so I figured out why there was build problem and it was not at all trivial.

    Turns out Microsoft has updated vscode package.

    This in turn required mocha downgrade to version 4
    Which required rewriting tests using only test() function
    That triggered linter, since it made lines greater than 100 characters long
    Because of that I had to shorten some test messages

    So in order to use vscode package you have to run tests inside an actual vscode instance. Document linked above explains it.
    The build was failing because you were including prepareCommitMsg.ts in prepareCommitMsg.test.ts which had vscode package import that was not accessible when run with mocha from CLI.

    In my branch I have changed that your mocha tests run inside vscode instance, therefore vscode package is accessible for tests.

    Here is my version: lexuzieel@7440e07

  7. lexuzieel commented on Nov 14, 2022

    @lexuzieel
    Author

    While we are at it, I would also like to add a flag to disable prefix (I don't use those for my projects). I have created a separate PR based on the latest version of my feat-titlecase branch: #86

  8. MichaelCurrin commented on Nov 21, 2022

    @MichaelCurrin
    Owner

    Thanks for the info. Reviewing your PR now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions