Skip to content
/ gcg Public

GCG is a GitHub Changelog Generator.

License

Notifications You must be signed in to change notification settings

ldez/gcg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GCG - GitHub Changelog Generator

release Build Status Go Report Card Sponsor

GCG
GCG is a GitHub Changelog Generator.
The generator use only Pull Requests.

Usage: gcg [flags] <command> [<arguments>]

Use "gcg <command> --help" for help on any command.

Commands:
        version                                            Display the version.

Flag's usage: gcg [--flag=flag_argument] [-f[flag_argument]] ...     set flag_argument to flag(s)
          or: gcg [--flag[=true|false| ]] [-f[true|false| ]] ...     set true/false to boolean flag(s)

Flags:
-b, --base-branch               Base branch name. PR branch destination.                  (default "master")
    --bug-label                 Bug Label.                                                (default "bug")
    --config-file               A configuration file. [optional]
-c, --current-ref               Current commit reference. Can be a tag, a branch, a SHA.
    --debug                     Debug mode.                                               (default "false")
    --display-label             Display labels                                            (default "true")
    --dl-options                Label display options.                                    (default "true")
    --dl-options.prefix-exclude Excluded label prefixes.
    --dl-options.prefix-filter  Included label prefixes.
    --dl-options.prefix-trim    Trim label with the following prefixes.
    --dl-options.suffix-exclude Excluded label suffixes.
    --dl-options.suffix-filter  Included label suffixes.
    --doc-label                 Documentation Label.                                      (default "documentation")
    --enhancement-label         Enhancement Label.                                        (default "enhancement")
    --exclude-label             Label to exclude.
    --file-name                 Name of the changelog file.                               (default "CHANGELOG.md")
-f, --future-ref-name           The future name of the current reference.
    --output-type               Output destination type. (file|Stdout)                    (default "file")
-o, --owner                     Repository owner.
-p, --previous-ref              Previous commit reference. Can be a tag, a branch, a SHA.
-r, --repo-name                 Repository name.
    --th-after                  Threshold in seconds after the current ref date.          (default "5")
    --th-before                 Threshold in seconds after the previous ref date.         (default "1")
    --tmpl-file                 A template file. [optional]
-t, --token                     GitHub Token. [optional]
-h, --help                      Print Help (this message) and exit

How to Install

OS Command

Linux

ArchLinux (AUR)

yay -S gcg

MacOS

Homebrew Taps

brew tap ldez/tap
brew update
brew install gcg

Windows

Scoop Bucket

scoop bucket add ldez https://github.com/ldez/scoop-bucket.git
scoop install gcg

all

Binaries

  • To get the binary just download the latest release for your OS/Arch from the releases page

  • Unzip the archive.

  • Add gcg in your PATH.

all

Sources

go get -u github.com/ldez/gcg

Examples

gcg -p"v1.2.0-rc1" -c"v1.3.0-rc1" -o"containous" -r"traefik" -t"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Next major release (RC1 on master)

ex: for the (non-existing) next version 1.4.0-rc1

gitGraph:
    commit id:"a"
    commit id:"b" tag:"v1.3.0-rc1" type:HIGHLIGHT
    commit id:"c"
    commit id:"d"
    commit id:"e" tag:"HEAD" type:HIGHLIGHT
Loading
gcg -b"master" -p"v1.3.0-rc1" -c"master" -f"v1.4.0-rc1" \
-o"containous" -r"traefik" -t"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
--exclude-label="area/infrastructure" \
--enhancement-label="kind/enhancement" --doc-label="area/documentation" --bug-label="kind/bug/fix" \
--debug

Next RC release (RC2 on a specific branch)

ex: for the (non-existing) version 1.3.0-rc2

gitGraph:
    commit id:"a"
    commit id:"b" tag:"v1.3.0-rc1" type:HIGHLIGHT
    branch v1.3
    checkout main
    commit id:"c"
    checkout v1.3
    commit id:"d"
    commit  id:"e"tag:"HEAD" type:HIGHLIGHT
    checkout main
    commit id:"f"
    commit id:"g"
Loading
gcg -b"v1.3" -p"v1.3.0-rc1" -c"v1.3" -f"v1.3.0-rc2" \
-o"containous" -r"traefik" \
--exclude-label="area/infrastructure" \
--enhancement-label="kind/enhancement" --doc-label="area/documentation" --bug-label="kind/bug/fix" \
--debug

Previous major release (Pre RC1)

ex: for the (existing) version 1.3.0-rc1

gitGraph:
    commit id:"a"
    commit id:"b" tag:"v1.2.0-rc1" type:HIGHLIGHT
    branch v1.2
    commit id:"c"
    commit id:"d" tag:"v1.2.0"
    commit id:"e"
    commit id:"f" tag:"v1.2.1"
    checkout main
    commit id:"g"
    merge v1.2
    commit id:"h"
    commit id:"i" tag:"v1.3.0-rc1" type:HIGHLIGHT
    branch v1.3
    commit id:"j"
    commit id:"k"
    checkout main
    commit id:"l"
    commit id:"m"
Loading
gcg -b"master" -p"v1.2.0-rc1" -c"v1.3.0-rc1" \
-o"containous" -r"traefik" \
--exclude-label="area/infrastructure" \
--enhancement-label="kind/enhancement" --doc-label="area/documentation" --bug-label="kind/bug/fix" \
--debug

Previous RC release (between RC1 and RC2)

ex: for the (existing) version 1.3.0-rc2

gitGraph:
    commit id:"a"
    commit id:"b" tag:"v1.3.0-rc1" type:HIGHLIGHT
    branch v1.3
    commit id:"c"
    commit id:"d" tag:"v1.3.0-rc2" type:HIGHLIGHT
    commit id:"e"
    commit id:"f"
    checkout main
    commit id:"g"
    commit id:"h"
Loading
gcg -b"v1.3" -p"v1.3.0-rc1" -c"v1.3.0-rc2" \
-o"containous" -r"traefik" \
--exclude-label="area/infrastructure" \
--enhancement-label="kind/enhancement" --doc-label="area/documentation" --bug-label="kind/bug/fix" \
--debug

Filtered Labels

gcg -b"v1.3" -p"v1.3.0-rc1" -c"v1.3" -f"v1.3.0"  \
-o"containous" -r"traefik" \
--exclude-label="area/infrastructure" \
--enhancement-label="kind/enhancement" --doc-label="area/documentation" --bug-label="kind/bug/fix" \
--dl-options.prefix-filter="area/,platform/" \
--dl-options.suffix-exclude="documentation" \
--dl-options.prefix-trim="area/provider/,area/middleware/,area/,platform/" \
--debug
gcg \
--base-branch="v1.3" --previous-ref="v1.3.0-rc1" \
--current-ref="v1.3" --future-ref-name="v1.3.0" \
--owner="containous" --repo-name="traefik" \
--exclude-label="area/infrastructure" \
--enhancement-label="kind/enhancement" --doc-label="area/documentation" --bug-label="kind/bug/fix" \
--dl-options.prefix-filter="area/,platform/" \
--dl-options.suffix-exclude="documentation" \
--dl-options.prefix-trim="area/provider/,area/middleware/,area/,platform/" \
--debug