Code Monkey home page Code Monkey logo

Comments (6)

MichaelCurrin avatar MichaelCurrin commented on August 30, 2024

The extension uses quick pick.

Look at the VS Code library API in the docs for how to preview a message in the pane or command view, then ask user to accept or not override with own message.

Also maybe look at the semantic commit extension which mixes typing your message with choosing chore, docs etc.

I need to generate a commit message, maybe using git API is JS in the first emojicommit extension above or the shell to read the git status. And then give the user a choice to accept (y/n or just prepopulate a single file) or override with own message.

Then commit with terminal as commit using the output message (it doesn't matter whether manual or auto generated)

from auto-commit-msg.

MichaelCurrin avatar MichaelCurrin commented on August 30, 2024

I don't think this is one I used but it is related

https://marketplace.visualstudio.com/items?itemName=vivaxy.vscode-conventional-commits

UPDATE: Here it is

https://marketplace.visualstudio.com/items?itemName=nitayneeman.git-semantic-commit

from auto-commit-msg.

MichaelCurrin avatar MichaelCurrin commented on August 30, 2024

Note from my testing that VS Code does actually respect the prepare-commit-msg hook, meaning that the hook can be used without writing a new VS Code extension (as I planned before).

But note that VS Code with this hook means just overwrites the message based on your input messange and hook logic. You don't get to confirm and you only see what was written when you check the log.

Also note that this flow does not actually use what you enter in the commit box - VS Code does not write to the .git/COMMIT_EDITMSG file and therefore there is nothing there for the hook to read. I found an issue on the VS Code repo about this that didn't get enough votes to get addressed.

Options are:

  • Create hook that is used on the terminal and also on VS Code but on every commit and it does not use the original message.
  • Create an extension based on the Emoji and Semantic commit ones

from auto-commit-msg.

MichaelCurrin avatar MichaelCurrin commented on August 30, 2024

Also extension templates are easy enough to use but i need to see how to make my extension installed on VS Code locally

from auto-commit-msg.

MichaelCurrin avatar MichaelCurrin commented on August 30, 2024

Also I don't know why the helloworld test sample downloads VS Code - the semantic commit one has a similar test setup without the download.

Also maybe the download is skipped on subsequent runs

from auto-commit-msg.

MichaelCurrin avatar MichaelCurrin commented on August 30, 2024

Done with tag v0.7.0 !

from auto-commit-msg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.