Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt angular convention for git commit messages #518

Closed
peppsac opened this issue Oct 9, 2017 · 5 comments
Closed

Adopt angular convention for git commit messages #518

peppsac opened this issue Oct 9, 2017 · 5 comments
Labels
validated 👌 validated by PSC wip 🚧 Still being worked on

Comments

@peppsac
Copy link
Contributor

peppsac commented Oct 9, 2017

As we adopted a code style for the js code, I'd like to explicitely adopt a style for git messages.

IMHO the style proposed at https://github.com/bcoe/conventional-changelog-standard/blob/master/convention.md is good and has an extra benefit: it allows to simplify changelog generation.

The important bits are:

  • the template to follow:
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
  • the allowed types:
    • feat, perf, fix => these 3 are special because they are pickup when building the changelog
    • docs, chore, style, refactor, test

Last but not least, we should choose a set of allowed scopes to allow grouping of relevant changes in the changelog.
Here's a first proposal
Second version:

  • core (when modifying MainLoop / View / core logic)
  • gis (Coordinates, Extent, Ellipsoid)
  • controls (GlobeControls, etc)
  • process (or update) (when modifiying TileNodeProcessing..)
  • providers
  • examples
  • protocols (wfs, wmts, etc changes)
  • 3dtiles
  • pointcloud
  • vector (not using 'feature' here because it's already used for 'type' prefix)
  • geometry (e.g when adding features to TileVS)
  • debug
@peppsac peppsac changed the title Adopt angular convention for git message style Adopt angular convention for git message Oct 9, 2017
@peppsac peppsac changed the title Adopt angular convention for git message Adopt angular convention for git commit messages Oct 9, 2017
@peppsac
Copy link
Contributor Author

peppsac commented Oct 12, 2017

(just edited the first post)

@zarov
Copy link
Contributor

zarov commented Nov 15, 2017

Good idea, I propose to add a file at the root of the repo, similar as this one https://gist.github.com/adeekshith/cd4c95a064977cdc6c50.

By doing git config commit.template .git-commit-template.txt, people will have the template with explanations on how to write their commit message, when doing a git commit. Maybe we could "force it" in a npm task ? Like a init (in scripts section) that would do this command, or at the beginning of start (but ugly...).

@autra
Copy link
Contributor

autra commented Nov 15, 2017

Or, as a first step, we could start by amending https://github.com/iTowns/itowns/blob/master/CONTRIBUTING.md.

I'm all to have a commit template file in the repo, and have the git config documented in CONTRIBUTING.md, but I'm not comfortable having it installed automatically (I do already use a custom commit template). That being said, if the majority of you want it installed automatically, I'll live with it.

@tbroyer
Copy link
Contributor

tbroyer commented Nov 15, 2017

+1 to the commit template, -1 to installing it automatically.

Would it be possible to have a check in Travis for PRs targeting the master branch? (`$TRAVIS_BRANCH == "master") or possibly for all PRs. Similar to https://github.com/angular/angular.js/blob/master/scripts/travis/build.sh#L22-L28

Also why not maybe add config for http://commitizen.github.io/cz-cli/

(note: I, for one, am not a fan of that convention, though I actually never practiced it; but if we put it in place, then better make it as easy as possible to follow it, and enforce it at CI level)

@zarov
Copy link
Contributor

zarov commented Jan 28, 2019

So this seems to have been acted, so I added it in CONTRIBUTING.md: https://github.com/iTowns/itowns/blob/master/CONTRIBUTING.md#pull-request-guidelines

@zarov zarov closed this as completed Jan 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validated 👌 validated by PSC wip 🚧 Still being worked on
Projects
None yet
Development

No branches or pull requests

5 participants