Skip to content
This repository has been archived by the owner on Sep 18, 2017. It is now read-only.

Allow users to config commit-analyzer #3

Open
kentcdodds opened this issue Sep 7, 2015 · 21 comments
Open

Allow users to config commit-analyzer #3

kentcdodds opened this issue Sep 7, 2015 · 21 comments

Comments

@kentcdodds
Copy link

If I improve performance, and that's all I do, I still want a release. Is there any problem with this?

kentcdodds referenced this issue in formly-js/angular-formly Sep 7, 2015
semantic-release doesn't push perf improvements as releases

See semantic-release/commit-analyzer#3
@boennemann
Copy link
Member

Hey @kentcdodds,

actually I wanted to make this part of the next breaking release ;) There are some more changes planned for how the commit plugin works (See here) and the underlying module changed/improved so it'll probably still take some time, but it will land eventually.

Best,
Stephan

@wilmoore
Copy link

@boennemann The next release looks cool; however, how does one achieve this now (besides writing a new analyzer)?

If a new analyzer is the answer, @kentcdodds, let's collab on it as I really want all changes that match one of the approved types to generate a release. Most of which would be patch releases.

@kentcdodds
Copy link
Author

I wish I had more time to devote to this, but I don't right now. If I get some time, I'd happily collaborate if @boennemann hasn't gotten to it yet.

@boennemann
Copy link
Member

@wilmoore @kentcdodds The fastest way would be to just change !type && commit.type === 'fix' to !type && (commit.type === 'fix' || commit.type === 'perf') here: https://github.com/semantic-release/commit-analyzer/blob/master/src/index.js#L20

If you send me PR I'll release that as a "next" version of this module and you can just overwrite the default analyzer with this one, until we get to ship it as a default.

Does that sound good?

@kentcdodds
Copy link
Author

Sounds good to me. I'll leave @wilmoore to do the PR if he likes. I don't need this immediately.

@wilmoore
Copy link

I'd actually like to see all of the following trigger a patch release:

  • docs
  • refactor
  • chore
  • test
  • fix
  • perf

If agreed, I'm happy to do the PR.

@kentcdodds
Copy link
Author

I disagree with:

  • refactor
  • chore
  • test

The others I'm good with. But I expect some might not like docs to release because it's not a code change. Would be coolest if it were configurable...

@wilmoore
Copy link

@boennemann

Here is the PR: semantic-release/commit-analyzer#4

@kentcdodds

Perhaps we can iterate on a configuration design going forward; however, I took a pragmatic approach and made the list above resolve to patch releases.

@boennemann
Copy link
Member

@wilmoore @kentcdodds Sorry I didn't see the forest for the trees here. The plugin already supports being passed pluginConfig. How about making the respective types configurable and using the current behavior as a default?

@kentcdodds
Copy link
Author

How would one utilize pluginConfig? Is that in the package.json?

@boennemann
Copy link
Member

In the package.json

"release": {
  "anaylzeCommits": {
    "minor": ["feat"],
    "patch": ["fix", "perf"]
  }
} 

Something likes this could work? :)

@kentcdodds
Copy link
Author

That would be perfect 👍

@hutson
Copy link

hutson commented Nov 24, 2015

👍 Agreed

@pensierinmusica
Copy link

I think this would solve most issues and be very desirable: semantic-release/commit-analyzer#12

I sent a PR for it: semantic-release/commit-analyzer#13

Then of course the rest of this thread holds true, and the user could always override the default behaviour configuring the plugin as suggested here: semantic-release/commit-analyzer#3 (comment)

Thoughts?

@pensierinmusica
Copy link

@kentcdodds btw can we change this thread's title from "Add perf to commits warrenting a release" to "Allow users to config commit-analyzer" or something similar? Thanks! Cheers

@kentcdodds kentcdodds changed the title Add perf to commits warrenting a release Allow users to config commit-analyzer Apr 5, 2016
@kentcdodds
Copy link
Author

Done

@safareli
Copy link

safareli commented Jul 18, 2016

HI I have this issue semantic-release/semantic-release#261 and is there any way to make perf(*) commits bump minor version? if it's not, what do you guys do in that case?

As it looks like there is no way currently. it would be nice to at least merge #4.

@safareli
Copy link

safareli commented Jul 18, 2016

@pensierinmusica how is that related to my issue?

@pensierinmusica
Copy link

@safareli sorry I got confused with another thread ;)

The problem here though to me seems that the last comment from @boennemann in this thread is on Oct 2015. More than 6 months have gone by...

I would still like to have an answer to this: semantic-release/commit-analyzer#3 (comment)

@safareli
Copy link

this is how i solved my issue

@turbobeast
Copy link

created an npm module that allows you to set your own level ( major, minor and patch) for the type of change in your commit messages https://github.com/BublTechnology/customizable-commit-analyzer

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants