Github: Feature Request: Support .gitmessage file

Created on 17 May 2018  ยท  4Comments  ยท  Source: atom/github

Description

I love this plugin! I'd love it even more if it supported commit templates.
I have a ~/.gitmessage file set up to help guide me towards better commit messages. The 'Commit message' input for this plugin does not pull content in from that file.

Steps to Reproduce

  1. Create a ~/.gitmessage file that contains this git commit template (for example):
Why:

*

This change addresses the need by:

*

Reference Links:

*
  1. Add this section to your ~/.gitconfig file:
[commit]
        template = ~/.gitmessage
  1. Make some changes in a repository
  2. Open the Git plugin by opening the Packages menu, opening the GitHub sub menu, and selecting Toggle Git Tab
  3. Click into the 'Commit message' text area

Expected behavior:

The 'Commit message' text area should be pre-populated with the contents of my ~/.gitmessage file.

Actual behavior:

The 'Commit message' text area is blank.

Reproduces how often:

๐Ÿ’ฏ

Versions

Mac OS 10.13.4

Output of atom --version:

Atom    : 1.27.0
Electron: 1.7.11
Chrome  : 58.0.3029.110
Node    : 7.9.0

Output of apm --version:

apm  1.19.0
npm  3.10.10
node 6.9.5 x64
atom 1.27.0
python 2.7.15
git 2.17.0
enhancement triaged

Most helpful comment

Sounds fun!

I'm primarily a Ruby developer and I've never worked on an Atom plugin before, but I'm happy to help out as much as I can and learn along the way. ๐Ÿ‘ ๐Ÿš€

All 4 comments

hi @JamesChevalier! I've chatted about this with some other maintainers of the atom-github package. This is a great idea. Is there any chance you'd be interested in working on it yourself? We'd be happy to work with you on coming up with an architecture plan, designs, etc.

If not, that's totally fine of course -- we can add it to our roadmap of things we'd like to build in the future.

Sounds fun!

I'm primarily a Ruby developer and I've never worked on an Atom plugin before, but I'm happy to help out as much as I can and learn along the way. ๐Ÿ‘ ๐Ÿš€

@JamesChevalier @annthurium Hi, this is really a great feature. I use commit.template a
lot. And probably the reason still using git+ for committing the changes.
Is it work in progress? I would love to work on this.

Is there already any specs for this feature?

Two ideas:

  1. If 'commit.template' is set in gitconfig then:

    • Load the commit message from template into input field when atom opens.
    • Skip loading the commit message if there is an active merging.
    • After committing the changes, reload the commit message from template.
  2. If 'commit.template' is set in gitconfig then:

    • Show a button "load message from template" next to "add co-authors"
    • Don't load any commit message by default to input field, load only when user click on load button.
    • If there is a message in commit input field, show another button "save message to template". Clicking on this button should update the commit.template file.

@gauravchl sorry I never responded to your question on this issue!

Since https://github.com/atom/github/pull/1713 has been merged, I'm going to go ahead and close this out. Thanks again for your contribution! โœจ

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danielbayley picture danielbayley  ยท  5Comments

smashwilson picture smashwilson  ยท  4Comments

move[bot] picture move[bot]  ยท  3Comments

jazeee picture jazeee  ยท  3Comments

HidekiHokuto picture HidekiHokuto  ยท  4Comments