git-chglog / git-chglog Goto Github PK
View Code? Open in Web Editor NEWCHANGELOG generator implemented in Go (Golang).
Home Page: https://godoc.org/github.com/git-chglog/git-chglog
License: MIT License
CHANGELOG generator implemented in Go (Golang).
Home Page: https://godoc.org/github.com/git-chglog/git-chglog
License: MIT License
I see no changelog for Unreleased version, however, there are untagged commits:
$ git log
commit 143ee38b33ed57c5e16bf040e58eed1f312f58a2 (HEAD -> master)
Author: pshevtsov <[email protected]>
Date: Thu Apr 5 17:53:16 2018 +0300
feat: hello
commit 344e2d3accee00c4d91c23e5c60b0f6f5cb24d11 (tag: v0.0.3)
Author: pshevtsov <[email protected]>
Date: Thu Apr 5 17:25:15 2018 +0300
feat: saying goodbye
I decided to say goodbye, I don't want to greet anyone anymore.
commit 0257adb5d9790320295e29c7d5d842df29ef8a76 (tag: v0.0.2)
Author: pshevtsov <[email protected]>
Date: Thu Apr 5 17:22:40 2018 +0300
fix: corrected greeting
commit d5eb564e98513c1a61a14f950317e3a4e5827a5c (tag: v0.0.1)
Author: pshevtsov <[email protected]>
Date: Thu Apr 5 17:20:11 2018 +0300
feat: initial commit
$ git-chglog
## [Unreleased]
### Features
- hello
## v0.0.3 - 2018-04-05
### Features
- saying goodbye
## v0.0.2 - 2018-04-05
### Bug Fixes
- corrected greeting
## v0.0.1 - 2018-04-05
### Features
- initial commit
$ git-chglog
## [Unreleased]
## v0.0.3 - 2018-04-05
### Features
- saying goodbye
## v0.0.2 - 2018-04-05
### Bug Fixes
- corrected greeting
## v0.0.1 - 2018-04-05
### Features
- initial commit
git tag
git-chglog
Just tried it on Jaeger master ([email protected]:jaegertracing/jaeger.git). First ran --init
and accepted all defaults.
something sensible
ERROR could not find the tag
$ git-chglog v1.1.0...v1.2.0
ERROR could not find the tag
$ git tag | cat
v0.5.0
v0.5.1
v0.5.2
v0.6.0
v0.7.0
v0.8.0
v0.9.0
v1.0.0
v1.1.0
v1.2.0
$ git-chglog 1.0.0...
ERROR could not find the tag
$ git-chglog 32bc1b7...
ERROR could not find the tag
Hi,
When I try to write a regex to capture the Gitlab Merge Request number in the "merges" section of the configuration, I don't capture anything.
Is it possible to right a multiline regex ?
Example Merge commit from Gitlab:
Date: Mon Jan 25 16:17:25 2021 +0000
Merge branch 'feature/XXX-11111' into 'master'
XXX-11111 - Example
See merge request myproject/frontend!1234
Config:
options:
tag_filter_pattern: '^\d+\.\d+\.\d+$'
merges:
pattern: "(!\\d+)"
pattern_maps:
- Source
It doesn't put anything in the "Source" field
fmap @ chglog.go:307 could add sprig functions in to allow more per-repo changelog template customization on the user end without code changes.
E.g. dict
, get
and set
would allow me dedup commit lines sharing the same #issue
In CHANGELOG.tpl.md
I should be able to create new dict
like
{{ $commitsByIssue := dict }}
{{ if not get $commitsByIssues .Refs[0].Ref }}
...
{{ set $commitsByIssues . }}
{{ end }}
panic: template: CHANGELOG.tpl.md:17 function "dict" not defined
git-chglog
Using git-chglog if not using github/gitlab/bitbucket - Using codecommit/pure git
I'd like to see the command
git-chglog -o CHANGELOG.md
give me a CHANGELOG.md
fille which contains the Tags which are on the repo, and the commits between TagA and TagB
I simply get the following: (using the cool template)
## v1.0.0
> 2019-07-17
## v0.2.0
> 2019-07-16
## v0.1.0
> 2019-07-16
Run git-chglog -o CHANGELOG.md
N/A
git-chglog version 0.8.0
Git knows to translate git $var
to git-$var
if it isn't a built-in command.
Thus all of the examples could use git chglog
instead of git-chglog
.
This has the advantage of greater familiarity, potential integration with .gitconfig
and less explaining to do.
Commits which have no scope are dropped with the following configuration:
commit_groups:
group_by: Scope
I would expect all un-scoped commits to b grouped together as Misc
or Other
in order to not lose information. (Maybe that title could be configurable)
Commits which do not have a scope (feat: some feature
) are left out of the changelog
I've added several features to my local fork that I'd like to make available. Here's a quick commit list:
commitURL()
template functionTo summarize, by commit (bottom-to-top):
--tag-filter-pattern
CLI option is given a corresponding config file entry (overridden by the CLI)change: change
will match any case-variant of "change" [eg, "CHANGE', "Change", etc)commitURL()
template function which can map hashes to a repository-style URL
-u
to the command line for a user to check a list of unreleased commits is easyI'm not sure of how to correct the one broken test that is a result of these commits, so it's disabled for the moment. All other tests are passing on Travis CI.
I know this is a lot of change, so I wanted to broach the issue before posting a large PR.
I'd love to help fully flesh out these commits (polish, testing, and documentation) and integrate these changes into your main line.
The master branch of my fork is fully compilable and working, with an alternate config and template file for examples of use (see 7b926be maint ~ update git-chglog configuration
).
I'm also going to look into adding a "--recent" or "--unreleased-only" option which only displays commits after the most recent tag.
Let me know if you're interested.
P.S. I had to change the import statements to point to my fork in order to compile the changes (see 6e8a63e local ~ use local package changes for testing
). Is there any way to set those up more portably so forks don't have to reset them for compilation and testing?
cc: @evanchaoli , @alexanderwe , @tsuyoshiwada
I'm looking to create a filter which ignores commits matching a certain string. The goal is to ignore the actual changelog commit to the repo, so our header string will be Updated changelog
.
I feel like I'm missing something obvious. Could someone point me in the right direction?
filters:
pattern:
- "String causing commit to be ignored. ie - Updated changelog"
pattern_maps:
- Header
Nada
I have some repositories to manage a CHANGELOG file. I put a git-chglog config file on ~/.config/chglog directory as global setting since it's can be shared.
I would like to avoid set -c
option to generate.
$ mv ./.chglog/* ~/.config/chglog/
$ git-chglog
# Output succeeds
$ git-chglog
ERROR open .chglog/config.yml: no such file or directory
$ git-chglog -c ~/.config/git-chglog/config.yml
# Output succeeds
for new release process of the artifacts and homebrew taps at https://github.com/git-chglog/homebrew-git-chglog
Currently, a combination of gox
and ghr
is used for the release process.
I'd propose using https://github.com/goreleaser/goreleaser which not only combines both steps but also offers more options to use the released artifacts (docker, brew, snap to name a few). Furthermore, it would be possible to seamlessly integrate with goreleasers'
inverse https://github.com/goreleaser/godownloader. Which automatically generates download bash scripts for a released artifact version based on the .goreleaser.yml
.
This would make it easier to use the git-chglog
tool for artifacts and in pipelines.
Furthermore, use github actions for ci as travis does not respond back to the PRs. See comment
Trying
$ ./git-chglog_windows_386.exe --init
result in
? What is the URL of your repository? (https://github.com/Team-on/test) ERROR Incorrect function.
Init a repository
Throws error
./git-chglog_windows_386.exe --init
This would greatly help with usability as I would not need to jump between terminal and browser when learning tool.
$ git chglog --help
… # help showed there
$ git chglog --help
No manual entry for git-chglog
include tag annotation ? is it possible ?
when i run git-chglog or with other parameters, it always print:
⌚️ Generating changelog ...
ERROR git-tag does not exist
running git-chlog
with --tag-filter-pattern=
requires flag to be only before query
--tag-filter-pattern
should not be ignored if set after query
git-chglog v0.7.0..v0.9.0-rc13 --tag-filter-pattern='^v(\d+)\.(\d*[13579])\.(\d+)\w*'
git-chglog --tag-filter-pattern='^v(\d+)\.(\d*[13579])\.(\d+)\w*' v0.7.0..v0.9.0-rc13
git-chglog v0.7.0..v0.9.0-rc13 --tag-filter-pattern='^v(\d+)\.(\d*[13579])\.(\d+)\w*'
git-chglog version 0.9.1
There is a pretty cool git implementation (https://github.com/src-d/go-git) in pure go.
We are using git-chglog as library and it would be usefull If we could use the go-git so we aren't required to have a full git installation.
git provider is swappable.
example:
chglog.Config {
Provider: "git-go"
}
git installation / git binary is required on path.
Use as lib
{Please write here}
Awesome tool! We follow the recommendation in the FAQ for "Can I commit CHANGELOG changes before creating tags?".
The idea is to generate the changelog of a release before creating the release commit.
Let's say that today is January 2. When generating a changelog with --next-tag v1.0.0
, the date of the tag will be the author date of the last commit (e.g. January 1):
Line 199 in 594ec82
After the changelog has been generated, we create the release commit and tag that as v1.0.0
.
The next time the changelog is re-generated, it will update the date of release v1.0.0
to January 2, as the author date of the release-commit is actually January 2.
This is even more problematic if the latest commit has a very old author date and got merged by a rebase + fast-forward. In that case a new release can end up with a date that lays before the previous release.
Both issues can be seen here: SAP/ui5-server@2b02eed
I would expect that when generating a changelog with --next-tag v1.0.0
, the tag date equals todays date.
Hi,
First many thanks for this project, I was looking for alternative to conventional-changelog but without having a dependency to nodejs runtime environment, and here I am 🎉 !
By the way if you are interested in, I'm building a complementary tool to automatically increment the version based on git log convention, it is gsemver which is somehow an equivalent to standard-version but in go.
I think git-chglog
and gsemver
together can make things rocks !
However I've found something that does not work properly.
Using tag query
with old tag such as old..
or old..new
should exclude the old commit and every parent commits from the selection.
It includes the old commit and its parent commits.
v0.1.0
, v0.1.1
, v0.1.2
)git-chglog v0.1.1..v0.1.2
v0.1.2
with commits in: v0.1.1
< ... <= v0.1.2
v0.1.1
with commits in: v0.1.0
< ... <= v0.1.1
Example with one of my repo:
git-chglog v0.1.1..v0.1.2
## [v0.1.2](https://github.com/arnaud-deprez/gsemver/releases/tag/v0.1.2) (2019-07-08)
### Bug Fixes
- **CLI:** fix gorelease ldflags for CLI build info ([3d77e72](https://github.com/arnaud-deprez/gsemver/commits/3d77e72f80aa6ce24241edc600a3d5429c2d35c4))
### Code Refactoring
- do not use parseRev when it's not necessary ([0e5f8fe](https://github.com/arnaud-deprez/gsemver/commits/0e5f8fe9a679b5b79713bdf93eb779acf172b3a1))
## [v0.1.1](https://github.com/arnaud-deprez/gsemver/releases/tag/v0.1.1) (2019-07-08)
### Bug Fixes
- go install needs main.go file ([a2db5ca](https://github.com/arnaud-deprez/gsemver/commits/a2db5ca72b5804b2dbd38426c23a6859f165539e))
- **ci:** do not build tag ([e8c774a](https://github.com/arnaud-deprez/gsemver/commits/e8c774ab3ddb0f3a9337afa8119f7d4284cf846b))
All versions should contain list of commits.
Output of git log
839a728 (HEAD -> master, tag: v1.0.5, origin/master, origin/HEAD) 1.0.5
fadc933 adjustable grid in services preview module
684040e added video player to featured content module
26e501a added content column splitting in text/image
fcb33e1 (tag: v1.0.4) 1.0.4
c93b20a added video option to text/image module
Output of git-chlog -o CHANGELOG.md
<a name="unreleased"></a>
## [Unreleased]
<a name="v1.0.5"></a>
## [v1.0.5] - 2018-10-15
<a name="v1.0.4"></a>
## [v1.0.4] - 2018-10-13
<a name="v1.0.3"></a>
## [v1.0.3] - 2018-10-08
<a name="v1.0.2"></a>
## [v1.0.2] - 2018-10-05
<a name="v1.0.1"></a>
## [v1.0.1] - 2018-10-05
<a name="v1.0.0"></a>
## v1.0.0 - 2018-10-05
Ppretty much default setup from git-chglog --init
style: bitbucket
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://bitbucket.org/xxx/xxx
options:
commits:
# filters:
# Type:
# - feat
# - fix
# - perf
# - refactor
commit_groups:
# title_maps:
# feat: Features
# fix: Bug Fixes
# perf: Performance Improvements
# refactor: Code Refactoring
header:
pattern: "^(.*)$"
pattern_maps:
- Subject
notes:
keywords:
- BREAKING CHANGE
We just started using this project for terraform-aws-modules, but I'm a little afraid that this project is losing its maintainer.
@wadackel did a great work so far, but may be it'll be nice to call for new maintainers to help on this project.
Thanks again @wadackel for your awesome work.
There will be multiple people in the team making changes to the same project, and the same commit will appear. I hope that the same log can be filtered out in the build log.
Repeated submissions appear multiple times
go get -u github.com/git-chglog/git-chglog/cmd/git-chglog
=> install git-chglog
# github.com/git-chglog/git-chglog/cmd/git-chglog
go/src/github.com/git-chglog/git-chglog/cmd/git-chglog/main.go:74:15: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in slice literal:
cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/git-chglog/git-chglog/cmd/git-chglog/main.go:80:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/git-chglog/git-chglog/cmd/git-chglog/main.go:87:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/git-chglog/git-chglog/cmd/git-chglog/main.go:92:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/git-chglog/git-chglog/cmd/git-chglog/main.go:98:15: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in slice literal:
cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/git-chglog/git-chglog/cmd/git-chglog/main.go:104:15: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in slice literal:
cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/git-chglog/git-chglog/cmd/git-chglog/main.go:107:4: unknown field 'EnvVar' in struct literal of type cli.BoolFlag
go/src/github.com/git-chglog/git-chglog/cmd/git-chglog/main.go:111:15: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in slice literal:
cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/git-chglog/git-chglog/cmd/git-chglog/main.go:114:4: unknown field 'EnvVar' in struct literal of type cli.BoolFlag
go/src/github.com/git-chglog/git-chglog/cmd/git-chglog/main.go:118:15: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in slice literal:
cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/git-chglog/git-chglog/cmd/git-chglog/main.go:118:15: too many errors
Run go get -u github.com/git-chglog/git-chglog/cmd/git-chglog
(The purpose of this report is to alert git-chglog/git-chglog
to the possible problems when git-chglog/git-chglog
try to upgrade the following dependencies)
-Latest Version: v2.2.0 (Latest commit d648edd on 6 Mar)
-Where did you use it:
https://github.com/git-chglog/git-chglog/search?q=urfave%2Fcli&unscoped_q=urfave%2Fcli
-Detail:
module github.com/urfave/cli/v2
go 1.11
require (
github.com/BurntSushi/toml v0.3.1
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d
gopkg.in/yaml.v2 v2.2.2
)
package cli
import (
"github.com/cpuguy83/go-md2man/v2/md2man"
…
)
This problem was introduced since urfave/cli v1.22.1 . Now you used version v1.20.0 . If you try to upgrade urfave/cli to version ** v1.22.1** and above, you will get an error--- no package exists at "github.com/cpuguy83/go-md2man/v2/md2man"
These dependencies all added Go modules in the recent versions.
They all comply with the specification of "Releasing Modules for v2 or higher" available in the Modules documentation. Quoting the specification:
A package that has migrated to Go Modules must include the major version in the import path to reference any v2+ modules. For example, Repo github.com/my/module migrated to Modules on version v3.x.y. Then this repo should declare its module path with MAJOR version suffix "/v3" (e.g., module
github.com/my/module/v3
), and its downstream project should use"github.com/my/module/v3/mypkg"
to import this repo’s package.
physical path
. So earlier versions of Go (including those that don't have minimal module awareness) plus all tooling (like dep, glide, govendor, etc) don't have minimal module awareness
as of now and therefore don't handle import paths correctly See golang/dep#1962, golang/dep#2139.Note: creating a new branch is not required. If instead you have been previously releasing on master and would prefer to tag v3.0.0 on master, that is a viable option. (However, be aware that introducing an incompatible API change in master can cause issues for non-modules users who issue a go get -u given the go tool is not aware of semver prior to Go 1.11 or when module mode is not enabled in Go 1.11+).
Pre-existing dependency management solutions such as dep currently can have problems consuming a v2+ module created in this way. See for example dep#1962.
https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher
Go Modules is the general trend of ecosystem, if you want a better upgrade package experience, migrating to Go Modules is a good choice.
Migrate to modules will be accompanied by the introduction of virtual paths(It was discussed above).
This "github.com/my/module/v3/mypkg" is not the
physical path
. So Go versions older than 1.9.7 and 1.10.3 plus all third-party dependency management tools (like dep, glide, govendor, etc) don't haveminimal module awareness
as of now and therefore don't handle import paths correctly.
Then the downstream projects might be negatively affected in their building if they are module-unaware (Go versions older than 1.9.7 and 1.10.3; Or use third-party dependency management tools, such as: Dep, glide, govendor…).
If git-chglog/git-chglog
want to keep using the dependency manage tools (like dep, glide, govendor, etc), and still want to upgrade the dependencies, can choose this fix strategy.
Manually download the dependencies into the vendor directory and do compatibility dispose(materialize the virtual path or delete the virtual part of the path). Avoid fetching the dependencies by virtual import paths. This may add some maintenance overhead compared to using modules.
As the import paths have different meanings between the projects adopting module repos and the non-module repos, materialize the virtual path is a better way to solve the issue, while ensuring compatibility with downstream module users. A textbook example provided by repo github.com/moby/moby
is here:
https://github.com/moby/moby/blob/master/VENDORING.md
https://github.com/moby/moby/blob/master/vendor.conf
In the vendor directory, github.com/moby/moby
adds the /vN subdirectory in the corresponding dependencies.
This will help more downstream module users to work well with your package.
The urfave/cli
have 1694 module-unaware users in github, such as: alena1108/cluster-controller, nathan-jenan-rancher/example-kontainer-engine-driver, containerd/containerd…
https://github.com/search?q=urfave%2Fcli+filename%3Avendor.conf+filename%3Avendor.json+filename%3Aglide.toml+filename%3AGodep.toml+filename%3AGodep.json
You can make a choice when you meet this DM issues by balancing your own development schedules/mode against the affects on the downstream projects.
For this issue, Solution 1 can maximize your benefits and with minimal impacts to your downstream projects the ecosystem.
Do you plan to upgrade the libraries in near future?
Hope this issue report can help you ^_^
Thank you very much for your attention.
Best regards,
Kate
Add support for multiple Types to get grouped together, so my devs can use their own preferred type selector and still generate the same changelog.
Ability to let my devs use both "feat:" and "feature:" while grouping them together in the changelog by Title from the title_maps.
Every type shows up in a different heading, even though the types that ought to be grouped are mapped to a string exactly the same as others.
Add Types that you want to group in the same heading, and look for a way to do that. Find nothing because the logic doesn't allow for it.
{Please write here}
I understand the solution from the author's perspective would be to force the devs to standardize their Type tags, but I would prefer to offer my team the flexibility to not remember "bug:" and "bugfix:" don't do the same thing in the changelog.
If I have time on this project (haha that's a good one) I'll attempt to add error checking into the md template to group exact matches together. It seems like it wouldn't be hard to change the type on the commit_groups.title_maps to accept an array/slice of strings instead of a single string to the match. Might make sense to do a bigger refactor and set commits.filters.type to be an array of string([]string) maps with the desired heading titles as the keys and an array of possible type matches as the values.
Let me know if this is a worthwhile update - if my devs rebel too much, I may fork and implement one of these options, but that would be a refactoring project for sure.
When use template <type>(<scope>): <subject>
and the scope field like: upper/lower
It will cause this commit disapper in CHANGELOG output.
I check the regex pattern in https://github.com/git-chglog/git-chglog/blob/master/cmd/git-chglog/variables.go#L78 , And I think change this pattern to ^(\\w*)(?:\\(([\\w\\$\\.\\-\\/\\*\\s]*)\\))?\\:\\s(.*)$
can fix this problem.
Or if better to use regex pattern like r^(\w*)(?:\(([^\)]*)\))?\:\s(.*)$
(python format).
However I don't know Go language, and don't have build environment. So I sincerely hope you can fix this problem.
the commit like feat(upper/lower): commit text
appear in git-chglog output.
the commit like feat(upper/lower): commit text
MISS in git-chglog output.
C:\Users\Rhilip>mkdir test
C:\Users\Rhilip>cd test
C:\Users\Rhilip\test>git init
Initialized empty Git repository in C:/Users/Rhilip/test/.git/
C:\Users\Rhilip\test>echo 'test' > 1.txt
C:\Users\Rhilip\test>git add .
C:\Users\Rhilip\test>git commit -m "feat(upper/lower): test"
[master (root-commit) 0354f10] feat(upper/lower): test
1 file changed, 1 insertion(+)
create mode 100644 1.txt
C:\Users\Rhilip\test>echo 'test2' > 2.txt
C:\Users\Rhilip\test>git add .
C:\Users\Rhilip\test>git commit -m "feat(upper): add 2.txt"
[master 9c52702] feat(upper): add 2.txt
1 file changed, 1 insertion(+)
create mode 100644 2.txt
C:\Users\Rhilip\test>git tag test
C:\Users\Rhilip\test>git log
commit 9c527024f60cc2db69d8a5208ec5bda14f71b593 (HEAD -> master, tag: test)
Author: Rhilip <[email protected]>
Date: Sun Jul 21 10:16:20 2019 +0800
feat(upper): add 2.txt
commit 0354f105fee276a827987d1f57b469acd62f071f
Author: Rhilip <[email protected]>
Date: Sun Jul 21 10:15:46 2019 +0800
feat(upper/lower): test
C:\Users\Rhilip\test>git-chglog --init
? What is the URL of your repository?
? What is your favorite style? github
? Choose the format of your favorite commit message <type>(<scope>): <subject>
? What is your favorite template style? keep-a-changelog
? Do you include Merge Commit in CHANGELOG? Yes
? Do you include Revert Commit in CHANGELOG? Yes
? In which directory do you output configuration files and templates? .chglog
✨ Configuration file and template generation completed!
✔ .chglog\config.yml
✔ .chglog\CHANGELOG.tpl.md
feat(upper/lower): test
miss in out changlog.C:\Users\Rhilip\test>git-chglog
<a name="unreleased"></a>
## [Unreleased]
<a name="test"></a>
## test - 2019-07-21
### Feat
- **upper:** add 2.txt
[Unreleased]: /compare/test...HEAD
{Please write here}
When a new project is created, the changelog should also be automatically maintained. This is unfortunately not possible due to the current requirement to have a tag, except via --next-tag
.
CHANGELOG.md
git-chlog --output CHANGELOG.md
CHANGELOG.md
is created which contains only a Unreleased
area with a list of commitsCHANGELOG.md
git-chlog --output CHANGELOG.md
ERROR git-tag does not exist
git-chlog --output CHANGELOG.md
⌚️ Generating changelog ...
ERROR git-tag does not exist
In a setup with multiple branches and tags only on a certain branch, i would expect that only tags that reachable from the new tag/old tag are being included.
All tags on all branches are included then filtered by date and those tags created within the outer bounds are included.
with default config:
mkdir test && cd test
git init && touch first && git add first && git commit -m "feat: first" && git tag v1
git checkout -b second && touch second && git add second && git commit -m "feat: second" && git tag v2
git checkout first && touch first2 && git add first2 && git commit -m "fix: fix first" && git tag v1.1
git-chglog v1..v1.1
The result would be a changelog with v1, v2, v1.1 in that order.
Where can I find list of available context variables for the template?
Just in case I will provide my desired usage example:
"short_commit_hash - commit message"
- i want to have such extremely minimal template.
I see .Refs
and .Commits
vars - but just wanted to point out It is not intuitive and readme says almost nothing about that.
I have set up two different issue prefixes in the config file. The numbers of those issues are correctly parsed and i can display them, but I don't know which number came from which prefix.
I have the following config
issues:
prefix:
- AAA-
- BBB-
refs:
actions:
- Closes
And in the template:
...
{{range .Commits}}
...
{{if .Refs}}{{range .Refs}} *{{.Action}} {{.Ref}}* {{end}}{{end}}
{{end}}
With this setup and an example commit like this:
fix(sth): i fixed something
Closes AAA-12 BBB-34
The resulting logs show only Closes 12 34
Looking at the GoDoc I only see Ref, Action, Source
as fields in the Ref object.
I would like to be able to show Closes AAA-12 BBB-34
instead.
Somehow be able to get the issue prefix in addition to the number from the Ref.
I am only able to get the number(Ref), Action and Source
See the example I gave
It would be great to have support for JIRA issues,
When the commit message contains a jira issue ID (e.g. PROJ-123) the changelog should generate a link to the Jira issue.
Jira issues are not linked
feat(api): add feature to edit multiple tags #PROJ-123
Curious if there Is way to pass git-chglog different Issue tracker URL?
I host code in gitlab, but issue tracker is standalone redmine.
It will be nice to render changelog with correct issues tracker URL
The links to the tag changes are broken:
https://github.com/montanaflynn/stats/blob/master/CHANGELOG.md
The links to work
They don't work
git-chglog -o CHANGELOG.md
{Please write here}
Let's say there's a repo that only recently started using conventional commits. The repo, however, has somewhat decent changelog in one of the proper formats covering its history.
It should be possible to set up git-chglog
in such a way that it preserves what's already in changelog and updates the changelog from the current point on.
It is not possible to retain the work already done on changelog.
Is it possible to set some lines based on regex that we want to skip and get the next line? Some bit bucket version set a header with some messy information.
Not a bug report
When using the cool
template it fails Markdownlint. I have not tested the others.
The output to pass markdownlint
right now there are several errors.
Install Markdownlint and test.
CHANGELOG.md:3: MD012 Multiple consecutive blank lines
CHANGELOG.md:60: MD012 Multiple consecutive blank lines
CHANGELOG.md:89: MD012 Multiple consecutive blank lines
CHANGELOG.md:120: MD012 Multiple consecutive blank lines
CHANGELOG.md:137: MD012 Multiple consecutive blank lines
CHANGELOG.md:146: MD012 Multiple consecutive blank lines
CHANGELOG.md:163: MD012 Multiple consecutive blank lines
CHANGELOG.md:199: MD012 Multiple consecutive blank lines
I dont have one.
I would like to use this tool for release messages in helm chart repositories. Helm chart repositories are usually mono repositories (Example: https://github.com/prometheus-community/helm-charts) and therefore have multiple version with a prefix. I believe the tag filter is a good start, but it seems to pickup changes from files that don't belong to specific charts.
Given the following file structure:
charts/chart-a/<files>
charts/chart-b/<files>
charts/chart-c/<files>
And generated tags:
chart-a-1.0.0
chart-a-0.0.9
chart-b-1.0.0
chart-c-1.0.0
I like to use git-chglog
similar to this:
git-chglog --tag-filter-pattern chart-a --file-filter-pattern 'charts/chart-a/**' -o chart-a.md
git-chglog ... --directories foo/bar/baz a/b/c
would
(I don't mind about a changelog entry appearing in more than one group's worth)
I work within a monorepo (with bazel), so we want to generate changelogs for just particular parts when we release those particular parts. I'd want to use bazel query to find all directories that a thing-being-released plus all it depends on, then generate a changelog for that list.
(Feature doesn't exist)
(Feature doesn't exist)
(Feature doesn't exist)
(Feature doesn't exist)
In a repository using a basic git-chglog
with a single commit, I feel like the "Unreleased" header should not show. I'm not sure about the comparison link at the bottom, but the empty header at the top of the output does not seem ideal to me. I modify the template to look better for myself, but I wanted to know what you thought of it.
$ git log
commit fa0135420c6310904d2bc1a1a09e1df22f74818e (HEAD -> master, tag: v0.0.1)
Author: Stanley Goldman <--->
Date: Tue Jul 2 11:45:04 2019 -0400
feat: Add Changelog config
$ git-chglog
<a name="v0.0.1"></a>
## v0.0.1 - 2019-07-02
### Feat
- Add Changelog config
[Unreleased]: https://github.com/StanleyGoldman/test-git-chglog/compare/v0.0.1...HEAD
$ git-chglog
<a name="unreleased"></a>
## [Unreleased]
<a name="v0.0.1"></a>
## v0.0.1 - 2019-07-02
### Feat
- Add Changelog config
[Unreleased]: https://github.com/StanleyGoldman/test-git-chglog/compare/v0.0.1...HEAD
mkdir test-git-chglog
cd test-git-chglog/
git init
hub create -p
git-chglog --init
git add -A
git commit -m "feat: Add Changelog"
git tag v0.0.1
git-chglog
First I'm happy to find this tool, it's very cool, I decide to use it with our project.
There is one thing preventing our project from using this tool. In our project, many different tags are used, like "dev-xxxx" tags are auto added by a CI pipeline, "stage-xxx" tags are added by the other CI pipeline, and so on ...
When generate changelog, we don't want to include all the tags, thus we need a tag filter, for example, we only want tags like "v1.1.1" to be included in change log.
So I plan to raise a PR to add an CLI option "--tag-filter-pattern".
NA
NA
Question: If I merge with squash merge, did it know? and expand to changelog?
Generate() fails when an invalid query passed
gen.Generate(buf, "not_found") -> "not_found was not found"
gen.Generate(buf, "not_found") -> "exit status 128"
1-Initialize a generator
2-Create an empty buffer
3-Call Generate() with an invalid query
This is more of a general question rather than actual bug report.
Considering the following config:
...
commit_groups:
title_maps:
doc: Documentation
enhance: Enhancements
feat: Features
fix: Bug Fixes
perf: Performance Improvements
refactor: Code Refactoring
...
This will generate changelog with separated commit groups sorted by group title. The only available sort option, based on this is by Title
.
In reality some of the items might have higher logical priority in the log, for example I like to show Features
first and then Enhancements
before Bug Fixes
and so on. So I was wondering if there was ever a decision to implement something like sort_by: Position
which retains the order of item in title maps, that one can do something like this:
...
commit_groups:
sort_by: Position
title_maps:
feat: Features
enhance: Enhancements
fix: Bug Fixes
perf: Performance Improvements
refactor: Code Refactoring
doc: Documentation
...
I'd appreciate any feedback on this, and also wanted to point out I can help with any potential PR if this is actually considered to get implemented.
n/a
n/a
n/a
Linux 5.0.0-37-generic
git-chglog version 0.9.1
Hello there,
Not sure what is going on... when I generate the change log.. for example, git-chglog -o CHANGELOG-md version-10
It is getting the messages related to the past versions (all of them 1 to 9)...
I'd prefer to generate a changelog that listed commits within a commit group sorted by Commit.Author.Date descending, which isn't possibly by default, since the slice has no methods in tex/template to reverse it, and there is no way to specify that in the configuration.
Generated commit output:
- remove changelog from git, now we generate it automatically
- Never block book reading from the player inventory, only the "open world".
- Increase double-activate time from 0.75 to 1 second
- generate esoui changelog from git logs
- add gitignore file, exclude editor backups
The order is reversed, with the "add gitignore" commit at the top:
- add gitignore file, exclude editor backups
- generate esoui changelog from git logs
- Increase double-activate time from 0.75 to 1 second
- Never block book reading from the player inventory, only the "open world".
- remove changelog from git, now we generate it automatically
Note: installed with go get
today, per instructions.
Tag v0.10.0
has prefix "v" in name.
Other tags don't have this prefix.
v0.10.0
and 0.9.1
.I would simply like to run: tag=v0.10.0 make release
export tag=v0.10.0
# adapt manually the file version.go (or use sed)
# const Version = "0.9.1" -> const Version = "v0.10.0"
git add cmd/git-chglog/version.go && git commit -m"chore: bumps version to $tag"
make changelog
# copy and paste manually into CHANGELOG.md into 2 sections
git add CHANGELOG.md && git commit -m"chore: update changelog for $tag"
git tag $tag
git push origin master $tag
I commited accidentally Improvement: Require kubernetes provider >=1.11.1
instead of improvement: Require kubernetes provider >=1.11.1
terraform-aws-modules/terraform-aws-eks@0c1ed0e. Then I found that there is no way to filter commits and map titles in a no case sensitive way.
It would be nice to add an option to enable or disable the case sensitive behavior on commits
, commit_groups
or notes
.
To be able to filter by exemple Fix:
or fix
without adding it twice in my configuration.
We should also run check format and linting as part of the CI test step too (#87 (comment))
No linting and format checking as part of the CI
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.