Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: janheinrichmerker/action-github-changelog-generator
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.2
Choose a base ref
...
head repository: janheinrichmerker/action-github-changelog-generator
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.3
Choose a head ref
  • 18 commits
  • 5 files changed
  • 2 contributors

Commits on Nov 16, 2020

  1. Copy the full SHA
    40daade View commit details
  2. Fic CI

    janheinrichmerker authored Nov 16, 2020
    Copy the full SHA
    20b768c View commit details
  3. Fix CI

    janheinrichmerker authored Nov 16, 2020
    Copy the full SHA
    75462ff View commit details
  4. Copy the full SHA
    068e705 View commit details
  5. Copy the full SHA
    a723457 View commit details
  6. Merge pull request #18 from heinrichreimer/heinrichreimer-patch-1

    Enhance CI test changelog generation
    janheinrichmerker authored Nov 16, 2020
    Copy the full SHA
    c3d5667 View commit details
  7. Fix header label

    janheinrichmerker authored Nov 16, 2020
    Copy the full SHA
    0c00aa5 View commit details
  8. Copy the full SHA
    7723f64 View commit details
  9. Copy the full SHA
    1f2238f View commit details
  10. Copy the full SHA
    2266192 View commit details

Commits on Dec 8, 2020

  1. Copy the full SHA
    3594dcd View commit details

Commits on Oct 27, 2021

  1. Merge pull request #20 from torarve/master

    Allow space in label and tag names
    janheinrichmerker authored Oct 27, 2021
    Copy the full SHA
    ad06744 View commit details
  2. Copy the full SHA
    fffbfc0 View commit details
  3. Copy the full SHA
    7cc5b86 View commit details
  4. Copy the full SHA
    d8ed93b View commit details
  5. Fix #21, #25

    janheinrichmerker authored Oct 27, 2021
    Copy the full SHA
    e928fd0 View commit details
  6. Copy the full SHA
    04cca7c View commit details
  7. Improve usage example

    Fix #26
    janheinrichmerker authored Oct 27, 2021
    Copy the full SHA
    6f5b949 View commit details
Showing with 107 additions and 56 deletions.
  1. +42 −0 .github/workflows/ci.yml
  2. +7 −8 .github/workflows/release.yml
  3. +1 −1 Dockerfile
  4. +13 −3 README.md
  5. +44 −44 entrypoint.sh
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

on: push

jobs:
build:
name: "✏️ Changelog generation"
runs-on: ubuntu-18.04
steps:
- name: "📥 Check-out"
uses: actions/checkout@v2
- name: "✏️ Generate full changelog"
id: generate-full-changelog
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
headerLabel: "# 📑 Changelog"
breakingLabel: '### 💥 Breaking'
enhancementLabel: '### 🚀 Enhancements'
bugsLabel: '### 🐛 Bug fixes'
deprecatedLabel: '### ⚠️ Deprecations'
removedLabel: '### 🔥 Removals'
securityLabel: '### 🛡️ Security'
issuesLabel: '### 📁 Other issues'
prLabel: '### 📁 Other pull requests'
addSections: '{"documentation":{"prefix":"### 📖 Documentation","labels":["documentation"]},"tests":{"prefix":"### ✅ Testing","labels":["tests"]}}'
issues: true
issuesWoLabels: true
pullRequests: true
prWoLabels: true
author: true
unreleased: true
compareLink: true
stripGeneratorNotice: true
verbose: true
- name: "🖨️ Print changelog to console"
run: cat CHANGELOG.md
- name: "📤 Upload changelog"
uses: actions/upload-artifact@v1.0.0
with:
name: "Changelog"
path: CHANGELOG.md
15 changes: 7 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -12,20 +12,19 @@ jobs:
steps:
- name: "📥 Check-out"
uses: actions/checkout@v1
- name: "✏️ Generate changelog"
id: generate-changelog
uses: heinrichreimer/action-github-changelog-generator@v2.2
- name: "✏️ Generate release changelog"
id: generate-release-changelog
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
onlyLastTag: "true"
stripHeaders: "true"
stripGeneratorNotice: "true"
- name: "🚀 Create GitHub release"
uses: actions/create-release@v1.0.1
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: ${{ steps.generate-changelog.outputs.changelog }}
draft: true
prerelease: false
body: ${{ steps.generate-release-changelog.outputs.changelog }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ferrarimarco/github-changelog-generator:1.15.2
FROM githubchangeloggenerator/github-changelog-generator:1.16.2

# Install bash.
RUN apk add --no-cache bash
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -15,9 +15,19 @@ This action also makes the changelog available to other actions as [output](#out
## Example usage

```yaml
uses: heinrichreimer/github-changelog-generator-action@v2.1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Changelog
on:
release:
types:
- created
jobs:
changelog:
runs-on: ubuntu-20.04
steps:
- name: "✏️ Generate release changelog"
uses: heinrichreimer/github-changelog-generator-action@v2.1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
```
## Inputs
88 changes: 44 additions & 44 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ if [ -z "$INPUT_PROJECT" ]; then INPUT_PROJECT=$(echo "$INPUT_REPO" | cut -d / -
# Only show last tag.
if istrue "$INPUT_ONLYLASTTAG"; then
INPUT_DUETAG=""
INPUT_SINCETAG=$(git describe --abbrev=0 --tags "$(git rev-list --tags --skip=1 --max-count=1)")
INPUT_SINCETAG=$(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1))
fi

# Build arguments.
@@ -34,54 +34,54 @@ if [ -n "$INPUT_TOKEN" ]; then ARG_TOKEN="--token $INPUT_TOKEN"; fi
if [ -n "$INPUT_DATEFORMAT" ]; then ARG_DATEFORMAT="--date-format $INPUT_DATEFORMAT"; fi
if [ -n "$INPUT_OUTPUT" ]; then ARG_OUTPUT="--output $INPUT_OUTPUT"; fi
if [ -n "$INPUT_BASE" ]; then ARG_BASE="--base $INPUT_BASE"; fi
if [ -n "$INPUT_HEADERLABEL" ]; then ARG_HEADERLABEL="--header-label $INPUT_HEADERLABEL"; fi
if [ -n "$INPUT_HEADERLABEL" ]; then ARG_HEADERLABEL=(--header-label "$INPUT_HEADERLABEL"); fi
if [ -n "$INPUT_CONFIGURESECTIONS" ]; then ARG_CONFIGURESECTIONS=(--configure-sections "$INPUT_CONFIGURESECTIONS"); fi
if [ -n "$INPUT_ADDSECTIONS" ]; then ARG_ADDSECTIONS=(--add-sections "$INPUT_ADDSECTIONS"); fi
if [ -n "$INPUT_FRONTMATTER" ]; then ARG_FRONTMATTER=(--front-matter "$INPUT_FRONTMATTER"); fi
if istrue "$INPUT_ISSUES"; then ARG_ISSUES="--issues"; else ARG_ISSUES="--no-issues"; fi
if istrue "$INPUT_ISSUESWOLABELS"; then ARG_ISSUESWOLABELS="--issues-wo-labels"; else ARG_ISSUESWOLABELS="--no-issues-wo-labels"; fi
if istrue "$INPUT_PULLREQUESTS"; then ARG_PULLREQUESTS="--pull-requests"; else ARG_PULLREQUESTS="--no-pull-requests"; fi
if istrue "$INPUT_PRWOLABELS"; then ARG_PRWOLABELS="--pr-wo-labels"; else ARG_PRWOLABELS="--no-pr-wo-labels"; fi
if istrue "$INPUT_FILTERBYMILESTONE"; then ARG_FILTERBYMILESTONE="--filter-by-milestone"; else ARG_FILTERBYMILESTONE="--no-filter-by-milestone"; fi
if istrue "$INPUT_AUTHOR"; then ARG_AUTHOR="--author"; else ARG_AUTHOR="--no-author"; fi
if istrue "$INPUT_USERNAMESASGITHUBLOGINS"; then ARG_USERNAMESASGITHUBLOGINS="--usernames-as-github-logins"; fi
if istrue "$INPUT_UNRELEASEDONLY"; then ARG_UNRELEASEDONLY="--unreleased-only"; fi
if istrue "$INPUT_UNRELEASED"; then ARG_UNRELEASED="--unreleased"; else ARG_ISSUES="--no-unreleased"; fi
if [ -n "$INPUT_UNRELEASEDLABEL" ]; then ARG_UNRELEASEDLABEL="--unreleased-label $INPUT_UNRELEASEDLABEL"; fi
if istrue "$INPUT_COMPARELINK"; then ARG_COMPARELINK="--compare-link"; else ARG_COMPARELINK="--no-compare-link"; fi
if [ -n "$INPUT_INCLUDELABELS" ]; then ARG_INCLUDELABELS="--include-labels $INPUT_INCLUDELABELS"; fi
if [ -n "$INPUT_EXCLUDELABELS" ]; then ARG_EXCLUDELABELS="--exclude-labels $INPUT_EXCLUDELABELS"; fi
if [ -n "$INPUT_ISSUELINELABELS" ]; then ARG_ISSUELINELABELS="--issue-line-labels $INPUT_ISSUELINELABELS"; fi
if [ -n "$INPUT_EXCLUDETAGS" ]; then ARG_EXCLUDETAGS="--exclude-tags $INPUT_EXCLUDETAGS"; fi
if [ -n "$INPUT_EXCLUDETAGSREGEX" ]; then ARG_EXCLUDETAGSREGEX="--exclude-tags-regex $INPUT_EXCLUDETAGSREGEX"; fi
if [[ -n $INPUT_ISSUES ]]; then if istrue "$INPUT_ISSUES"; then ARG_ISSUES="--issues"; else ARG_ISSUES="--no-issues"; fi; fi
if [[ -n $INPUT_ISSUESWOLABELS ]]; then if istrue "$INPUT_ISSUESWOLABELS"; then ARG_ISSUESWOLABELS="--issues-wo-labels"; else ARG_ISSUESWOLABELS="--no-issues-wo-labels"; fi; fi
if [[ -n $INPUT_PULLREQUESTS ]]; then if istrue "$INPUT_PULLREQUESTS"; then ARG_PULLREQUESTS="--pull-requests"; else ARG_PULLREQUESTS="--no-pull-requests"; fi; fi
if [[ -n $INPUT_PRWOLABELS ]]; then if istrue "$INPUT_PRWOLABELS"; then ARG_PRWOLABELS="--pr-wo-labels"; else ARG_PRWOLABELS="--no-pr-wo-labels"; fi; fi
if [[ -n $INPUT_FILTERBYMILESTONE ]]; then if istrue "$INPUT_FILTERBYMILESTONE"; then ARG_FILTERBYMILESTONE="--filter-by-milestone"; else ARG_FILTERBYMILESTONE="--no-filter-by-milestone"; fi; fi
if [[ -n $INPUT_AUTHOR ]]; then if istrue "$INPUT_AUTHOR"; then ARG_AUTHOR="--author"; else ARG_AUTHOR="--no-author"; fi; fi
if [[ -n $INPUT_USERNAMESASGITHUBLOGINS ]]; then if istrue "$INPUT_USERNAMESASGITHUBLOGINS"; then ARG_USERNAMESASGITHUBLOGINS="--usernames-as-github-logins"; fi; fi
if [[ -n $INPUT_UNRELEASEDONLY ]]; then if istrue "$INPUT_UNRELEASEDONLY"; then ARG_UNRELEASEDONLY="--unreleased-only"; fi; fi
if [[ -n $INPUT_UNRELEASED ]]; then if istrue "$INPUT_UNRELEASED"; then ARG_UNRELEASED="--unreleased"; else ARG_ISSUES="--no-unreleased"; fi; fi
if [ -n "$INPUT_UNRELEASEDLABEL" ]; then ARG_UNRELEASEDLABEL=(--unreleased-label "$INPUT_UNRELEASEDLABEL"); fi
if [[ -n $INPUT_COMPARELINK ]]; then if istrue "$INPUT_COMPARELINK"; then ARG_COMPARELINK="--compare-link"; else ARG_COMPARELINK="--no-compare-link"; fi; fi
if [ -n "$INPUT_INCLUDELABELS" ]; then ARG_INCLUDELABELS=(--include-labels "$INPUT_INCLUDELABELS"); fi
if [ -n "$INPUT_EXCLUDELABELS" ]; then ARG_EXCLUDELABELS=(--exclude-labels "$INPUT_EXCLUDELABELS"); fi
if [ -n "$INPUT_ISSUELINELABELS" ]; then ARG_ISSUELINELABELS=(--issue-line-labels "$INPUT_ISSUELINELABELS"); fi
if [ -n "$INPUT_EXCLUDETAGS" ]; then ARG_EXCLUDETAGS=(--exclude-tags "$INPUT_EXCLUDETAGS"); fi
if [ -n "$INPUT_EXCLUDETAGSREGEX" ]; then ARG_EXCLUDETAGSREGEX=(--exclude-tags-regex "$INPUT_EXCLUDETAGSREGEX"); fi
if [ -n "$INPUT_SINCETAG" ]; then ARG_SINCETAG="--since-tag $INPUT_SINCETAG"; fi
if [ -n "$INPUT_DUETAG" ]; then ARG_DUETAG="--due-tag $INPUT_DUETAG"; fi
if [ -n "$INPUT_MAXISSUES" ]; then ARG_MAXISSUES="--max-issues $INPUT_MAXISSUES"; fi
if [ -n "$INPUT_RELEASEURL" ]; then ARG_RELEASEURL="--release-url $INPUT_RELEASEURL"; fi
if [ -n "$INPUT_GITHUBSITE" ]; then ARG_GITHUBSITE="--github-site $INPUT_GITHUBSITE"; fi
if [ -n "$INPUT_GITHUBAPI" ]; then ARG_GITHUBAPI="--github-api $INPUT_GITHUBAPI"; fi
if istrue "$INPUT_SIMPLELIST"; then ARG_SIMPLELIST="--simple-list"; fi
if [[ -n $INPUT_SIMPLELIST ]]; then if istrue "$INPUT_SIMPLELIST"; then ARG_SIMPLELIST="--simple-list"; fi; fi
if [ -n "$INPUT_FUTURERELEASE" ]; then ARG_FUTURERELEASE="--future-release $INPUT_FUTURERELEASE"; fi
if [ -n "$INPUT_RELEASEBRANCH" ]; then ARG_RELEASEBRANCH="--release-branch $INPUT_RELEASEBRANCH"; fi
if istrue "$INPUT_HTTPCACHE"; then ARG_HTTPCACHE="--http-cache"; fi
if [[ -n $INPUT_HTTPCACHE ]]; then if istrue "$INPUT_HTTPCACHE"; then ARG_HTTPCACHE="--http-cache"; fi; fi
if [ -n "$INPUT_CACHEFILE" ]; then ARG_CACHEFILE="--cache-file $INPUT_CACHEFILE"; fi
if [ -n "$INPUT_CACHELOG" ]; then ARG_CACHELOG="--cache-log $INPUT_CACHELOG"; fi
if [ -n "$INPUT_SSLCAFILE" ]; then ARG_SSLCAFILE="--ssl-ca-file $INPUT_SSLCAFILE"; fi
if istrue "$INPUT_VERBOSE"; then ARG_VERBOSE="--verbose"; else ARG_VERBOSE="--no-verbose"; fi
if [[ -n $INPUT_VERBOSE ]]; then if istrue "$INPUT_VERBOSE"; then ARG_VERBOSE="--verbose"; else ARG_VERBOSE="--no-verbose"; fi; fi
if [ -n "$INPUT_BREAKINGLABEL" ]; then ARG_BREAKINGLABEL=(--breaking-label "$INPUT_BREAKINGLABEL"); fi
if [ -n "$INPUT_BREAKINGLABELS" ]; then ARG_BREAKINGLABELS="--breaking-labels $INPUT_BREAKINGLABELS"; fi
if [ -n "$INPUT_BREAKINGLABELS" ]; then ARG_BREAKINGLABELS=(--breaking-labels "$INPUT_BREAKINGLABELS"); fi
if [ -n "$INPUT_ENHANCEMENTLABEL" ]; then ARG_ENHANCEMENTLABEL=(--enhancement-label "$INPUT_ENHANCEMENTLABEL"); fi
if [ -n "$INPUT_ENHANCEMENTLABELS" ]; then ARG_ENHANCEMENTLABELS="--enhancement-labels $INPUT_ENHANCEMENTLABELS"; fi
if [ -n "$INPUT_ENHANCEMENTLABELS" ]; then ARG_ENHANCEMENTLABELS=(--enhancement-labels "$INPUT_ENHANCEMENTLABELS"); fi
if [ -n "$INPUT_BUGSLABEL" ]; then ARG_BUGSLABEL=(--bugs-label "$INPUT_BUGSLABEL"); fi
if [ -n "$INPUT_BUGLABELS" ]; then ARG_BUGLABELS="--bug-labels $INPUT_BUGLABELS"; fi
if [ -n "$INPUT_BUGLABELS" ]; then ARG_BUGLABELS=(--bug-labels "$INPUT_BUGLABELS"); fi
if [ -n "$INPUT_DEPRECATEDLABEL" ]; then ARG_DEPRECATEDLABEL=(--deprecated-label "$INPUT_DEPRECATEDLABEL"); fi
if [ -n "$INPUT_DEPRECATEDLABELS" ]; then ARG_DEPRECATEDLABELS="--deprecated-labels $INPUT_DEPRECATEDLABELS"; fi
if [ -n "$INPUT_DEPRECATEDLABELS" ]; then ARG_DEPRECATEDLABELS=(--deprecated-labels "$INPUT_DEPRECATEDLABELS"); fi
if [ -n "$INPUT_REMOVEDLABEL" ]; then ARG_REMOVEDLABEL=(--removed-label "$INPUT_REMOVEDLABEL"); fi
if [ -n "$INPUT_REMOVEDLABELS" ]; then ARG_REMOVEDLABELS="--removed-labels $INPUT_REMOVEDLABELS"; fi
if [ -n "$INPUT_REMOVEDLABELS" ]; then ARG_REMOVEDLABELS=(--removed-labels "$INPUT_REMOVEDLABELS"); fi
if [ -n "$INPUT_SECURITYLABEL" ]; then ARG_SECURITYLABEL=(--security-label "$INPUT_SECURITYLABEL"); fi
if [ -n "$INPUT_SECURITYLABELS" ]; then ARG_SECURITYLABELS="--security-labels $INPUT_SECURITYLABELS"; fi
if [ -n "$INPUT_ISSUESLABEL" ]; then ARG_ISSUESLABEL="--issues-label $INPUT_ISSUESLABEL"; fi
if [ -n "$INPUT_PRLABEL" ]; then ARG_PRLABEL="--pr-label $INPUT_PRLABEL"; fi
if [ -n "$INPUT_SECURITYLABELS" ]; then ARG_SECURITYLABELS=(--security-labels "$INPUT_SECURITYLABELS"); fi
if [ -n "$INPUT_ISSUESLABEL" ]; then ARG_ISSUESLABEL=(--issues-label "$INPUT_ISSUESLABEL"); fi
if [ -n "$INPUT_PRLABEL" ]; then ARG_PRLABEL=(--pr-label "$INPUT_PRLABEL"); fi

# Generate change log.
# shellcheck disable=SC2086 # We specifically want to allow word splitting.
@@ -92,7 +92,7 @@ github_changelog_generator \
$ARG_DATEFORMAT \
$ARG_OUTPUT \
$ARG_BASE \
$ARG_HEADERLABEL \
"${ARG_HEADERLABEL[@]}" \
"${ARG_CONFIGURESECTIONS[@]}" \
"${ARG_ADDSECTIONS[@]}" \
"${ARG_FRONTMATTER[@]}" \
@@ -105,13 +105,13 @@ github_changelog_generator \
$ARG_USERNAMESASGITHUBLOGINS \
$ARG_UNRELEASEDONLY \
$ARG_UNRELEASED \
$ARG_UNRELEASEDLABEL \
"${ARG_UNRELEASEDLABEL[@]}" \
$ARG_COMPARELINK \
$ARG_INCLUDELABELS \
$ARG_EXCLUDELABELS \
$ARG_ISSUELINELABELS \
$ARG_EXCLUDETAGS \
$ARG_EXCLUDETAGSREGEX \
"${ARG_INCLUDELABELS[@]}" \
"${ARG_EXCLUDELABELS[@]}" \
"${ARG_ISSUELINELABELS[@]}" \
"${ARG_EXCLUDETAGS[@]}" \
"${ARG_EXCLUDETAGSREGEX[@]}" \
$ARG_SINCETAG \
$ARG_DUETAG \
$ARG_MAXISSUES \
@@ -127,19 +127,19 @@ github_changelog_generator \
$ARG_SSLCAFILE \
$ARG_VERBOSE \
"${ARG_BREAKINGLABEL[@]}" \
$ARG_BREAKINGLABELS \
"${ARG_BREAKINGLABELS[@]}" \
"${ARG_ENHANCEMENTLABEL[@]}" \
$ARG_ENHANCEMENTLABELS \
"${ARG_ENHANCEMENTLABELS[@]}" \
"${ARG_BUGSLABEL[@]}" \
$ARG_BUGLABELS \
"${ARG_BUGLABELS[@]}" \
"${ARG_DEPRECATEDLABEL[@]}" \
$ARG_DEPRECATEDLABELS \
"${ARG_DEPRECATEDLABELS[@]}" \
"${ARG_REMOVEDLABEL[@]}" \
$ARG_REMOVEDLABELS \
"${ARG_REMOVEDLABELS[@]}" \
"${ARG_SECURITYLABEL[@]}" \
$ARG_SECURITYLABELS \
$ARG_ISSUESLABEL \
$ARG_PRLABEL
"${ARG_SECURITYLABELS[@]}" \
"${ARG_ISSUESLABEL[@]}" \
"${ARG_PRLABEL[@]}"

# Locate change log.
FILE="CHANGELOG.md"