Giter Site home page Giter Site logo

git-changelog's Issues

Make git-changelog available for webpack or gulp?

Is there a plan to do this i the future? Since I am not using grunt at all, the command line option is likely the only one. Though it would be nice to have it built into the build system though. How hard is it? I would love to help. Though, need to learn to use this in command line first, ha.

or there is easier way to integrate into those two hot ones?

Document tag behavior

how does this work when you have tags? It seems to try to grab a tag from way back.

Use the repo_url

At the momment the repo_url is only used for the issues / commits link.
The git commands only work in the actuall git project.

Remove Grunt from peerDependencies

Considering that the module works like a charm without grunt, would you mind removing grunt from the peerDependencies in the package.json ? It prevents using shrinkwrap as we don't use grunt at all. What do you think ?

Create changelogs from non-downloaded repositories

Git does not provide the functionality of retrieving the history from a repository you have not downloaded.
In order to have the feature of logging remote repositories without being in a repo folder some code has to be written.
I think in terms of functionality it should do something like this:

Whenever a user types -r REPO_URL on a folder that it's not a git repo:
Create a folder called .tmp (in the git-changelog directory?)
Go into that folder and clone the remote repo
Do the git log in that repo
Remove the folder .tmp after some time.
This will be time expensive.. but i think its a cool feature

Sorry, you've not configured an origin remote or passed a `repo_url` config value

i've got this config:

{
    "app_name": "processo",
    "logo": "https://github.com/rafinskipg/git-changelog/raw/master/images/git-changelog-logo.png",
    "intro": "Projeto de controle",
    "branch" : "master",
    "repo_url": "git@xxxxxx:xxxxxx/processo.git",
    "version" : "v1.0.0",
    "file": "CHANGELOG.md",
    "sections": [
        {
            "title": "Correções de Bug",
            "grep": "(\[FIX\])|correção/i"
        },
        {
            "title": "Features",
            "grep": "\[FEATURE\]"
        },
        {
            "title": "Erro 500",
            "grep": "\[500\]"
        },
        {
            "title": "Refactoração",
            "grep": "\[REFACTOR\]"
        },
        {
            "title": "Test",
            "grep": "\[TEST\]"
        },
    ]
}

i use this command:

git changelog -r [email protected]:xxxxxxx/processo.git

and i get this output:

Executing git changelog:
  - With URL [email protected]:xxxxxxx/processo.git
Found changelog rc
Sorry, you've not configured an origin remote or passed a `repo_url` config value

what am i doing wrong?

Grunt git_changelog doesn't work

I am trying to use this plugin but doesn't work.
Every time I try to run task git_changelog the console show me log Warning: Task "git_changelog" not found. Use --force to continue

template.md

Hi,
Sample template misses space between version no. which causes it to not display it with proper heading.

git-changelog

Group Commits by tag

As specified in the readme , finish the enhancement of grouping commits by tag

pull-requests and merge commits

How are people dealing with the automatically generated commit messages? I get 'warning incorrect commit messages' for these.

ex:

'Merge pull request #5 from ...'

'Merge branch 'feature A'

Add sinon for better tests

Right now the new tests doesn't ensure that the functionality is working, instead they ensure certain paths of the code are used, make use of sinon for ensuring certain functions are called. Stub and compare if provided params are ok.

Closed-source options

Sorry to be the evil-one, but I would like to use this tool to generate change logs for a closed-source project. To do this, I need

  • An option to turn off the github commit links, as our readers won't have access to the repo.
  • An option to override the salute message.

I'm happy to write the pull request for this, but I would like some advice on how to pass options object through to the relevant parts of the code, as I'm new to the require style of programming used in this project.

Not possible to overwrite defaults

Here's my configuration:

grunt.config('git_changelog', {
    minimal : {
      options: {
        app_name : grunt.file.readJSON('project-config.json').git_changelog.app_name,
        debug: true,
        file : "../CHANGELOG.md"
      }
    }
  });

When run:
Executing git changelog:

  • The APP name is My app - Changelog
  • The output file is CHANGELOG.md

Running "git_changelog:minimal" (git_changelog) task
Error generating changelog [TypeError: Cannot call method 'indexOf' of undefined]
Error generating changelog [TypeError: Cannot call method 'indexOf' of undefined]

New wanted features - WIP

Hey,
I've added git-changelog to a project and though it works very well, I was quite surprised to see that the default (and only, afaict) behaviour is to overwrite the CHANGELOG.

Did I miss an option? Are there any plans in 0.2 to change that behaviour?

FWIW, I've had to do the following to have it append:

  • Copy the current Changelog to a temp file
  • generate the new changelog
  • Remove header from the new
  • Remove footer from the new
  • Append the temp file (aka, previous changelog)

Add more tests

Ensure that the options works as described.

For that it has been created a msg that is getting constructed through the changelog.generate method, then it can be parsed on the tests to ensure that certain conditions have been met.

describe('Params tests', function() {
    it('should read log since beggining if tag is false', function(done) {

      var options = _.cloneDeep(defaults);

      options.tag = false;
      options.name = 'my name';

      ch.generate(options)
        .then(function(opts){
          expect(opts.msg).to.be.a('string');
          expect(opts.msg.indexOf('since beggining')).to.not.equal(-1);
          done();
        })
        .catch(function(err){
          console.log('error', err);
        })
    });
  });

Show warnings by default

E.g. Invalid changelogrc file is pretty crucial; I didn't realise this was the issue until I ran with --debug.

Alternatively some warnings could be upgraded to errors.

Incorrect url being generated for the commit id (HELP WANTED)

I have my config as such ( removing some internal stuff)

    git_changelog: {
            release_notes: {
                options: {
                    file: 'RELEASE_NOTES.md',
                    app_name: 'TEST',
                    repo_url: 'https://<internal git lab host>/<group>/<test>',
                    grep_commits: '^fix|^feat|^docs|^refactor|^chore|^style|^test|BREAKING'
                }
            }
        }

and when I generate the change log the link to the commit gets formatted as such
https://///commits/426fc8efaea3b245f7ca07532e9edee644f3fe42

For some reason it has 'commits' instead of 'commit' which messes up the link

ENOENT error when calling changelog.generate()

Found that .writeChangelog() (which is called by .generate() does not wait for the open event on its stream parameter. When stream is set to stdout by .generate() its no big deal. If the file passed to fs.createWriteStream() already exists it's also not an issue. However, if the file doesn't exists then writing to the stream may sporadically fail with an ENOENT error.

I propose refactoring .writeChangelog() into an asynchronous method (so that it can wait for the open event) that returns a promise to .generate().

Will add this fix to PR #20.

How to read tag that created in the new line?

For example for a single commit message I have

feat(ad): make new ad
some note here
reg(ad): need a walk through

so in the 3rd line, there will be a reg tag, but even I added in the changelogrc, it seems still not get recognized.

How can I make it recognizable even its not at the beginning of the commit message?

Avoid launching CLI option on certain cases

When you are using the grunt task, it launches also the cli option

This is because the bin is defined on the package.json

"bin": {
    "git-changelog": "tasks/command.js"
  },

This causes that it executes it 2 times..

What branch is the git log generated in comparing to?

Lets for example if I am in a feature branch, I generated the change log... in compare with a choose branch and only show changes in diff between those two specific branches. How can I do that? I did not see a way I can do it yet.

Any guidance on this?

Thanks!!!

Getting undefined as base commit

Running "git_changelog:minimal" (git_changelog) task
THemaster
Reading git log since changelog-start
Executing :  git log develop --grep="^fix|^feat|^docs|BREAKING" -E --format=%H%n%s%n%b%n==END== undefined..HEAD
Parsed 0 commits
Generating changelog to CHANGELOG.md (  )

Running "git_changelog:extended" (git_changelog) task
THemaster
Reading git log since changelog-start
Executing :  git log develop --grep="^fix|^feat|^docs|^refactor|^chore|BREAKING" -E --format=%H%n%s%n%b%n==END== undefined..HEAD
Parsed 0 commits
Generating changelog to CHANGELOG.md (  )

Change Options

Change the task options to:

{
 sections: [
     {
        name: 'Features', //title of the section
        grep: '^feat',   //grep the commits that start with "feat"
       commitLInks : true //link descriptions to commit url.
    },
   {
      name: 'Documentation',
      grep: '^docs'
    }
  ],
  ignoreTags: false, //Parse since the beggining of the repository, instead of the last tag.
  file: 'changelogs/CHANGELOG.md,  //Output

},

Where:

File can be

 file: {
   'dir' : 'changelogs/'
   'name': 'CHANGELOG.%version%.%date%.md' //Allowing template with some values
}

v0.2.0

Lists of tasks needed :

  • Group commits by tag when generating from the beggining of time
  • Add a breaking changes section to our readme when the 0.2.0 is released
  • Add our own changelog once we generate next versions
  • Create our own .changelogrc file for our project
  • Change log colors
  • Clean readme
  • Logo in changelogs

Roadmap

For v1

  • avoid using Angular commit standards and allow any configuration through .changelogrc

CLI option

Was thinking it would be great if you could run this straight from the terminal as a cli also. That way you could do a global install, set up a few config options and simply call it from the command line. It might read the repo package.json file to retrieve the url and name so you don't have to pass that along.

Is this still active?

Just downloaded and gave this a try and it works pretty good. However, I've noticed there's a few unanswered issues and I'm wondering if this is because you're no longer maintaining this project. If not are you using another tool to achieve this? I'd be keen to know as I've tried a few unsuccessfully.

Thanks.

Change the use of version option

Version option should only be used if :

  • There is no tag name / there is no tag

If a tag is provided, use this format:

v0.2.0 - Version Name (Date)

Note that version would be 'Version Name'

Unable to generate changelog

I am testing out the cli version of this tool with the following log

commit 5cbf787a298973464145b35b330b869bf8dd28a3
Author: angelblade27
Date:   Tue Jan 5 12:40:34 2016 -0800

    chore(package.json): Release v0.3.12


commit d67631933436705d857c3a8873af414a5149fb39
Merge: 3a4f3c6 21d6373
Author: angelblade27
Date:   Tue Jan 5 19:51:14 2016 +0000

    Merge branch 'validate-msg' into 'master'

    fix(validate-commit-msg.js): Fix character length validation against short description

    # Description
    Validation against the commit msg for character count consider the entire commit message rather than just the short description this changes breaks the commit message into different parts and validates against the short description

 commit 3a4f3c64b848e27dafc489aa27a879766107fa4f


commit 4233745b45e000f55a054f76ad1a74e8aaccb4af
Author: angelblade27
Date:   Tue Jan 5 10:43:09 2016 -0800

    style(push-hook): Fix done outputs

however when i run the changelog it doesnt parse anything

git-changelog -d -t v.0.3.11
Executing git changelog:
Debug enabled
  - Generating log since tag v.0.3.11
  - The APP name is My app - Changelog
  - The output file is CHANGELOG.md
Reading git log since v.0.3.11
Executing :  git log  --grep="^fix|^feat|^docs|BREAKING" -E --format=%H%n%s%n%b%n==END== v.0.3.11..HEAD
Parsed 0 commits
Generating changelog to CHANGELOG.md (  )
Finished generating log Yai!

It looks like it parsed nothing.
1.) What am I doing wrong?
2.) Will it parse the merge requests?

New features

  • Deploy changelog in a browser
  • Provide throught a link access to the details of commit to the remote repository

Create a Grunt Plugin

I want this project to be a grunt plugin, available to be installed with npm

I want the gruntfile to allow configuration for:

  • Repository url
  • ? export format ?

Multiple Sections in single commit

Hi,
I have following commit message

BREAKING: String.As has been changed to BaseUrl to better describe it feature: T.String for Encode and Typed for Decode

It isn't added to changelog, is there something missing or i am doing wrong? Is there something there for multiple sections data in single commit just like this one?

Thanks

Custom logo

Generate changelogs with custom logo embebed

options: {
    file: 'MyChangelog.md',
    logo: './images/logo.png',
    app_name : 'Git changelog'
}

Adding this markup to the file

<a name="">Version 0.2.0</a>

<img width="300px" src="http://upload.wikimedia.org/wikipedia/commons/4/4a/Logo_2013_Google.png" />

__Git changelog__

_a project by Google Corp_


#  v0.2.0 (2015-04-21)


## Bug Fixes

That will generate a similar output to this:

changeloglogo

Refactor code to improve testability

@rafinskipg, I completely agree with issues #16 and #18. We definitely need to increase test coverage and usingsinon would be a great addition to the test suite.

That said, as-is the existing code-base is somewhat difficult to test. Before you proceed with 0.2.0 I suggest the following:

  • decouple tests from the git_changelog grunt task, replace with fixtures so test input is predictable
  • refactor code to improve testability
  • add a coverage tool to determine how much of test code is being tested (I suggest istanbul)
  • as suggested by #16, add tests to increase coverage
  • as suggested by #18, use sinon to stub and spy on calls to external functions

Additionally, I would:

  • add node 0.12.x to travis-ci configuration
  • add badge to README to show the status of the current build (from travis)
  • add badge to README to show the test coverage of the current build (using either coveralls or code climate)
  • improve readability
  • reduce method complexity

I'll be more than happy to assist with a PR.

Output not formatting new lines correctly

Two little formatting issues that are closely related.

  1. When outputting a series of commits that fall under the same feature the sub list displays inline rather than giving each new item a new line.
  2. Commits under a type list are also not displaying correctly on their own new line. I suspect that this may be related/flowing on from the previous issue.

See the below example that was generated from a demo repo I setup.

Example 1 Output: Start

Chore

  • $scope:
    • add some object setting - add some additional dependency - add basic service- docs: add changelog- maintain: add initial project root index

Example 1 Output: End

I'm assuming the above should look more like:

Example 2 Output: Start

Chore

  • $scope:
    • add some object setting
    • add some additional dependency
    • add basic service
  • docs: add changelog
  • maintain: add initial project root index

Example 2 Output: End

Grouped by tag for the full history (HELP WANTED)

Is it possible to have sections grouped by tags from the beginning of the log history? currently enabling tags will only show changes till the last tag but I want to have the changes grouped by those tags.

Version does not default to tag name

I removed the version from the rc to that it uses the last tag but it doesn't.

version: The version of the project. Defaults to , DEPRECATED will default to the tag name

Is the defaulting deprectated or is version deprecated?

Found changelog rc
  - The APP name is <name>Changelog
  - The output file is CHANGELOG.md
Reading git log since #205
Generating changelog to CHANGELOG.md (  )
Finished generating log Yai!

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.