Code Monkey home page Code Monkey logo

action-github-changelog-generator's Introduction

License Last commit Latest tag Issues Pull requests

✏️ action-github-changelog-generator

Automatically generate change log from your tags, issues, labels and pull requests on GitHub, using github-changelog-generator's Docker image.

This action also makes the changelog available to other actions as output.

Example usage

name: Changelog
on:
  release:
    types:
      - created
jobs:
  changelog:
    runs-on: ubuntu-latest
    steps:
      - name: "✏️ Generate release changelog"
        uses: heinrichreimer/[email protected]
        with:
          token: ${{ secrets.GITHUB_TOKEN }} 

Inputs

Name Description Default
repo Target GitHub repo in the form of organization/repository. inherit
user Username of the owner of target GitHub repo. inherit
project Name of project on GitHub. inherit
token To make more than 50 requests per hour your GitHub token is required. inherit
dateFormat Date format. inherit
output Output file. inherit
base Optional base file to append generated changes to. inherit
headerLabel Set up custom header label. inherit
configureSections Define your own set of sections which overrides all default sections. inherit
addSections Add new sections but keep the default sections. inherit
frontMatter Add YAML front matter. Formatted as JSON because it's easier to add on the command line. inherit
issues Include closed issues in changelog. inherit
issuesWoLabels Include closed issues without labels in changelog. inherit
pullRequests Include pull-requests in changelog. inherit
prWoLabels Include pull requests without labels in changelog. inherit
filterByMilestone Use milestone to detect when issue was resolved. inherit
author Add author of pull request at the end. inherit
usernamesAsGithubLogins Use GitHub tags instead of Markdown links for the author of an issue or pull-request. inherit
unreleasedOnly Generate log from unreleased closed issues only. inherit
unreleased Add to log unreleased closed issues. inherit
unreleasedLabel Set up custom label for unreleased closed issues section. inherit
compareLink Include compare link (Full Changelog) between older version and newer version. inherit
includeLabels Of the labeled issues, only include the ones with the specified labels. inherit
excludeLabels Issues with the specified labels will be excluded from changelog. inherit
issueLineLabels The specified labels will be shown in brackets next to each matching issue. Use "ALL" to show all labels. inherit
excludeTags Changelog will exclude specified tags. inherit
excludeTagsRegex Apply a regular expression on tag names so that they can be excluded. inherit
sinceTag Changelog will start after specified tag. inherit
dueTag Changelog will end before specified tag. inherit
maxIssues Maximum number of issues to fetch from GitHub. inherit
releaseUrl The URL to point to for release links, in printf format (with the tag as variable). inherit
githubSite The Enterprise GitHub site where your project is hosted. inherit
githubApi The enterprise endpoint to use for your GitHub API. inherit
simpleList Create a simple list from issues and pull requests. inherit
futureRelease Put the unreleased changes in the specified release number. inherit
releaseBranch Limit pull requests to the release branch, such as master or release. inherit
httpCache Use HTTP Cache to cache GitHub API requests (useful for large repos). inherit
cacheFile Filename to use for cache. inherit
cacheLog Filename to use for cache log. inherit
sslCaFile Path to cacert.pem file. inherit
verbose Run verbosely. inherit
breakingLabel Set up custom label for breaking changes section. inherit
breakingLabels Issues with these labels will be added to a new section, called "Breaking changes". inherit
enhancementLabel Set up custom label for enhancements section. inherit
enhancementLabels Issues with the specified labels will be added to "Implemented enhancements" section. inherit
bugsLabel Set up custom label for bug-fixes section. inherit
bugLabels Issues with the specified labels will be added to "Fixed bugs" section. inherit
deprecatedLabel Set up custom label for deprecated section. inherit
deprecatedLabels Issues with the specified labels will be added to a section called "Deprecated". inherit
removedLabel Set up custom label for removed section. inherit
removedLabels Issues with the specified labels will be added to a section called "Removed". inherit
securityLabel Set up custom label for security section. inherit
securityLabels Issues with the specified labels will be added to a section called "Security fixes". inherit
issuesLabel Set up custom label for closed-issues section. inherit
prLabel Set up custom label for pull requests section. inherit
onlyLastTag Changelog will only show last tag. false
stripHeaders Strip headers and only show changes. false
stripGeneratorNotice Strip generator notice. false

Most inputs inherit their defaults from github-changelog-generator.

Outputs

Name Description
changelog Contents of generated change log.

action-github-changelog-generator's People

Contributors

artmorse avatar browniebroke avatar charmixer avatar ddeath avatar dependabot[bot] avatar heinrichreimer avatar muuki88 avatar nroduit avatar torarve avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

action-github-changelog-generator's Issues

Question: issue with section

Heya,

Hopefully nice easy one for you - having an issue with the section generation, not sure what I'm doing wrong.

The job step (the jobs really long but can be found here)

      - uses: heinrichreimer/[email protected]
        if: ${{env.changelog}} == true
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          pullRequests: ${{env.pullRequests}}
          prWoLabels: "${{env.prWoLabels}}"
          excludeLabels: "${{env.excludeLabels}}"
          breakingLabels: "${{env.breakingLabels}}"
          enhancementLabels: "${{env.enhancementLabels}}"
          bugLabels: "${{env.bugLabels}}"
          deprecatedLabels: "${{env.deprecatedLabels}}"
          removedLabels: "${{env.removedLabels}}"
          securityLabels: "${{env.securityLabels}}"
          stripGeneratorNotice: ${{env.stripGeneratorNotice}}

My env variables (Imported at start of job)

# Automatic Changelog
changelog: true # enable / disable
changelogRef: "master"
changelogFetchDepth: 0
pullRequests: true
prWoLabels: "skip-changelog"
breakingLabels: "Versioning - BREAKING"
enhancementLabels: "Type - Enhancement, Type - Feature"
bugLabels: "Type - Fix, Bug - Fixed"
deprecatedLabels: "Type - Decrecated"
removedLabels: "Type - Removal"
securityLabels: "security fix"
excludeLabels: "skip-changelog"
stripGeneratorNotice: "true"

my CHANGELOG.md

# Changelog

## [v0.1.0](https://github.com/Videndum/Universal-GitAction-Workflows/tree/v0.1.0) (2020-07-21)

**Closed issues:**

- revert: 1613ffe4f4d721ae513bd56bc896a1013e3f2387 [\#41](https://github.com/Videndum/Universal-GitAction-Workflows/issues/41)
- bug: testing the labeler works [\#32](https://github.com/Videndum/Universal-GitAction-Workflows/issues/32)
- Feat: Test [\#8](https://github.com/Videndum/Universal-GitAction-Workflows/issues/8)
- label gen [\#2](https://github.com/Videndum/Universal-GitAction-Workflows/issues/2)

**Merged pull requests:**

- feat: profanity check [\#76](https://github.com/Videndum/Universal-GitAction-Workflows/pull/76)
- feat: publish release [\#75](https://github.com/Videndum/Universal-GitAction-Workflows/pull/75)
- feat: pull approval [\#74](https://github.com/Videndum/Universal-GitAction-Workflows/pull/74)
- revert: table of contents [\#68](https://github.com/Videndum/Universal-GitAction-Workflows/pull/68)
- docs: update contribution guidelines [\#64](https://github.com/Videndum/Universal-GitAction-Workflows/pull/64)
- fix: release [\#59](https://github.com/Videndum/Universal-GitAction-Workflows/pull/59)
- fix: remove triggers & solve \(Line: 71, Col: 13\) [\#56](https://github.com/Videndum/Universal-GitAction-Workflows/pull/56)
- fix: minor issues with workflow [\#55](https://github.com/Videndum/Universal-GitAction-Workflows/pull/55)
- fix: change token to ACCESS\_TOKEN [\#54](https://github.com/Videndum/Universal-GitAction-Workflows/pull/54)
- fix: triggers [\#52](https://github.com/Videndum/Universal-GitAction-Workflows/pull/52)
- fix: gpg values [\#50](https://github.com/Videndum/Universal-GitAction-Workflows/pull/50)
- fix: Copy & Rename step "commit" [\#47](https://github.com/Videndum/Universal-GitAction-Workflows/pull/47)
- feat: branch deletion without change [\#44](https://github.com/Videndum/Universal-GitAction-Workflows/pull/44)
- feat: automatic branch creation [\#43](https://github.com/Videndum/Universal-GitAction-Workflows/pull/43)
- feat: add automerge [\#38](https://github.com/Videndum/Universal-GitAction-Workflows/pull/38)

"inherit" behavior is not being honored for boolean inputs

Describe the bug

The documentation states that many boolean inputs (e.g. issues, issuesWoLabels, pullRequests, prWoLabels) default to the defaults of https://github.com/github-changelog-generator/github-changelog-generator. However, this is not currently the case.

The istrue helper will return false for empty variables, resulting in all ommited boolean parameters to default to false.

Reproduce

Use the action without specifying issues, issuesWoLabels, pullRequests and prWoLabels. It will generate an empty changelog.

Expected behavior

Boolean inputs should respect the defaults of https://github.com/github-changelog-generator/github-changelog-generator.

Additional context

This can be fixed by wrapping lines that use istrue

if istrue "$INPUT_ISSUES"; then ARG_ISSUES="--issues"; else ARG_ISSUES="--no-issues"; fi

with -n test as well:

if [[ -n $INPUT_ISSUES ]]; then if istrue "$INPUT_ISSUES"; then ARG_ISSUES="--issues"; else ARG_ISSUES="--no-issues"; fi; fi

0.1.0 is specified if sinceTag is not specified

Describe the bug

In my workflow, I doesn't specify sinceTag, however, it fails with error:

/usr/local/bundle/gems/github_changelog_generator-1.15.0/lib/github_changelog_generator/generator/generator_tags.rb:138:in `filter_since_tag': Error: can't find tag 0.1.0, specified with --since-tag option. (GitHubChangelogGenerator::ChangelogGeneratorError)

My project has no tag named 0.1.0, so it should fail. However, since I don't specify any value for sinceTag, why action-github-changelog-generator pass 0.1.0 to --since-tag?

Any workaround to avoid this error?

For more infomation, please have a look at https://github.com/zillionare/ppw_0419_01/runs/2382578601?check_suite_focus=true

by the way, thanks for provide this great github action (it saved me since I have no need to learn ruby).

GITHUB_TOKEN permissions used by this action

At https://github.com/step-security/secure-workflows we are building a knowledge-base (KB) of GITHUB_TOKEN permissions needed by different GitHub Actions. When developers try to set minimum token permissions for their workflows, they can use this knowledge-base instead of trying to research permissions needed by each GitHub Action they use.

Below you can see the KB of your GITHUB Action.

name: "Generate changelog"
github-token:
  action-input:
    input: token
    is-default: false
  permissions:
    contents: read
    contents-reason: to fetch tags
    issues: read
    issues-reason: to fetch issues and labels
    pull-requests: read
    pull-requests-reason: to fetch PRs and labels    
#Fixes #655

If you think this information is not accurate, or if in the future your GitHub Action starts using a different set of permissions, please create an issue at https://github.com/step-security/secure-workflows/issues to let us know.

This issue is automatically created by our analysis bot, feel free to close after reading :)

References:

GitHub asks users to define workflow permissions, see https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/ and https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token for securing GitHub workflows against supply-chain attacks.

Setting minimum token permissions is also checked for by Open Source Security Foundation (OpenSSF) Scorecards. Scorecards recommend using https://github.com/step-security/secure-workflows so developers can fix this issue in an easier manner.

how to push to the protected branch ..

Describe the bug

A clear and concise description of what the bug is.

Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

Stack trace / screenshots

If applicable, add a stack trace or screenshots to help explain your problem.

Device

  • Device: [e.g. Pixel2, iPhone6]
  • OS: [e.g. Android, iOS, Windows]
  • Browser [e.g. Chrome, Safari]
  • Version [e.g. 22]

Additional context

Add any other context about the problem here.

Action fails with onlyLastTag==true if only one tag exists

Describe the bug

If there is only one tag in the repository, a call with onlyLastTag set to true will fail.

Reproduce

Steps to reproduce the behavior:

  1. Create a repository with only one tag and this action
  2. Push to Github
  3. Action will fail

Expected behavior

With no tags I would expect the generator to use the repository root as starting point.

Additional context

The problem happens here: https://github.com/heinrichreimer/action-github-changelog-generator/blob/master/entrypoint.sh#L27
Resulting error message is fatal: No tags can describe '…'.

Changelog generation not working

I recently tried to use this action to automatically generate a changelog for my Java Library, but for some reason it doesn't generate a real changelog from the commit descriptions, but only this:

Changelog

v1.0.146 (2020-07-21)

v1.0.145 (2020-07-20)

v1.0.144 (2020-06-19)

v1.0.143 (2020-06-12)

v1.0.142 (2020-06-12)

v1.0.141 (2020-06-12)

v1.0.140 (2020-06-12)

v1.0.139 (2020-06-10)

v1.0.138 (2020-06-10)

v1.0.137 (2020-06-10)

v1.0.136 (2020-06-10)

v1.0.135 (2020-06-10)

I have no idea whether that is because of some issue with my configuration, of this action or of github-changelog-generator.

Changelog for 2.4 is malformed

Describe the bug

The changelog for the 2.4 release is malformed.

Reproduce

Steps to reproduce the behavior:

  1. Visit https://github.com/heinrichreimer/action-github-changelog-generator/releases

Expected behavior

A well formed changelog

Stack trace / screenshots

%0A%0AFull Changelog%0A%0AFixed bugs:%0A%0A- Section/Header of fixed issue with milestone only (no release!) #41 Documentation typo. #37 All change under Unrelease #31 0.1.0 is specified if sinceTag is not specified #28 issues:%0A%0A- The set-output command is deprecated and will be disabled soon. #42 How to use the output? #40 pull requests:%0A%0A- The set-output command is deprecated and will be disabled soon. #42 #43 (nroduit)%0A- 📝 - Typo fixed (#37). #38 (Artmorse)

[Question] Usage example seems to be incomplete.

What you have

uses: heinrichreimer/[email protected]
with:
  token: ${{ secrets.GITHUB_TOKEN }}

Expected something like this

name: Changelog

on:
  pull_request:
    types: [closed]

  release:
    types: [published]

  issues:
    types: [closed, edited]

jobs:
  generate_changelog:
    runs-on: ubuntu-latest
    steps:
      - name: Generate change log
        uses: heinrichreimer/[email protected]
        with:
          token: ${{ secrets.GITHUB_TOKEN }} 

If you provide a full example of the workflow it would help developers to adopt this action.

Docker: OCI runtime create failed

Describe the bug

The action fails to execute with the following input:

token: ${{ secrets.GITHUB_TOKEN }}
user: real-coco-labs
repo: pz-zdoc

Reproduce

  1. Create a repository.
  2. Fork that repository.
  3. Dispatch this workflow.

Expected behavior

I expected the changelog to be generated.

Stack trace / screenshots

/usr/bin/docker run --name e4f912522ec0634b71b601cee80789e1c4_af9f88 --label 5588e4 --workdir /github/workspace --rm -e INPUT_TOKEN -e INPUT_USER -e INPUT_REPO -e INPUT_PROJECT -e INPUT_DATE_FORMAT -e INPUT_OUTPUT -e INPUT_BASE -e INPUT_HEADER-LABEL -e INPUT_CONFIGURE-SECTIONS -e INPUT_ADD-SECTIONS -e INPUT_FRONT-MATTER -e INPUT_ISSUES -e INPUT_ISSUES-WO-LABELS -e INPUT_PULL-REQUESTS -e INPUT_PR-WO-LABELS -e INPUT_FILTER-BY-MILESTONE -e INPUT_AUTHOR -e INPUT_USERNAMES-AS-GITHUB-LOGINS -e INPUT_UNRELEASED-ONLY -e INPUT_UNRELEASED -e INPUT_UNRELEASED-LABEL -e INPUT_INCLUDE-LABELS -e INPUT_EXCLUDE-LABELS -e INPUT_ISSUE-LINE-LABELS -e INPUT_EXCLUDE-TAGS -e INPUT_EXCLUDE-TAGS-REGEX -e INPUT_SINCE-TAG -e INPUT_DUE-TAG -e INPUT_MAX-ISSUES -e INPUT_RELEASE-URL -e INPUT_GITHUB-SITE -e INPUT_GITHUB-API -e INPUT_SIMPLE-LIST -e INPUT_FUTURE-RELEASE -e INPUT_RELEASE-BRANCH -e INPUT_HTTP-CACHE -e INPUT_CACHE-FILE -e INPUT_CACHE-LOG -e INPUT_SSL-CA-FILE -e INPUT_VERBOSE -e INPUT_BREAKING-LABEL -e INPUT_BREAKING-LABELS -e INPUT_ENHANCEMENT-LABEL -e INPUT_ENHANCEMENT-LABELS -e INPUT_BUGS-LABEL -e INPUT_BUG-LABELS -e INPUT_DEPRECATED-LABEL -e INPUT_DEPRECATED-LABELS -e INPUT_REMOVED-LABEL -e INPUT_REMOVED-LABELS -e INPUT_SECURITY-LABEL -e INPUT_SECURITY-LABELS -e INPUT_ISSUES-LABEL -e INPUT_PR-LABEL -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/pz-zdoc/pz-zdoc":"/github/workspace" 5588e4:f912522ec0634b71b601cee80789e1c4
docker: Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: exec: "/entrypoint.sh": permission denied: unknown.

Device

  • Ubuntu 18.04.5 LTS

Additional context

https://github.com/yooksi/pz-zdoc/runs/1889844671

Section/Header of fixed issue with milestone only (no release!)

Describe the bug

I use milestones for tracking issues and don't plan to perform a github release, because user shall built artefact by itself.
I start using the action manually by hand and add changelog to repository.
I'd expect the milestone ticket was resolved in as header, but unfortunatly header/section is always "Unreleased".

Reproduce

Steps to reproduce the behavior:

  1. Create an issue.
  2. Assign issue to a defined milestone
  3. Close issue.
  4. Run action.

Expected behavior

There should be a section/header with milestone, but is: "Unreleased"

`filter_since_tag': Error: can't find tag 0.1.0, specified with --since-tag option

workflow: https://github.com/ma7555/evalify/actions/runs/1870980986

yml: https://github.com/ma7555/evalify/blob/changelog/.github/workflows/changelog.yml

When no tags in repo I get:

Run heinrichreimer/github-changelog-generator-action@v[2](https://github.com/ma7555/evalify/runs/5262796526?check_suite_focus=true#step:4:2).1.1
  with:
    token: ***
    issues: true
    issuesWoLabels: true
    pullRequests: true
    prWoLabels: true
    unreleased: true
    addSections: {"documentation":{"prefix":"**Documentation:**","labels":["documentation"]}}
    output: CHANGELOG.md
/usr/bin/docker run --name db2d7a7ee1d9555764cb184febfb1[3](https://github.com/ma7555/evalify/runs/5262796526?check_suite_focus=true#step:4:3)c36da61_20f526 --label 7db2d7 --workdir /github/workspace --rm -e INPUT_TOKEN -e INPUT_ISSUES -e INPUT_ISSUESWOLABELS -e INPUT_PULLREQUESTS -e INPUT_PRWOLABELS -e INPUT_UNRELEASED -e INPUT_ADDSECTIONS -e INPUT_OUTPUT -e INPUT_REPO -e INPUT_USER -e INPUT_PROJECT -e INPUT_DATEFORMAT -e INPUT_BASE -e INPUT_HEADERLABEL -e INPUT_CONFIGURESECTIONS -e INPUT_FRONTMATTER -e INPUT_FILTERBYMILESTONE -e INPUT_AUTHOR -e INPUT_USERNAMESASGITHUBLOGINS -e INPUT_UNRELEASEDONLY -e INPUT_UNRELEASEDLABEL -e INPUT_INCLUDELABELS -e INPUT_EXCLUDELABELS -e INPUT_ISSUELINELABELS -e INPUT_EXCLUDETAGS -e INPUT_EXCLUDETAGSREGEX -e INPUT_SINCETAG -e INPUT_DUETAG -e INPUT_MAXISSUES -e INPUT_RELEASEURL -e INPUT_GITHUBSITE -e INPUT_GITHUBAPI -e INPUT_SIMPLELIST -e INPUT_FUTURERELEASE -e INPUT_RELEASEBRANCH -e INPUT_HTTPCACHE -e INPUT_CACHEFILE -e INPUT_CACHELOG -e INPUT_SSLCAFILE -e INPUT_VERBOSE -e INPUT_BREAKINGLABEL -e INPUT_BREAKINGLABELS -e INPUT_ENHANCEMENTLABEL -e INPUT_ENHANCEMENTLABELS -e INPUT_BUGSLABEL -e INPUT_BUGLABELS -e INPUT_DEPRECATEDLABEL -e INPUT_DEPRECATEDLABELS -e INPUT_REMOVEDLABEL -e INPUT_REMOVEDLABELS -e INPUT_SECURITYLABEL -e INPUT_SECURITYLABELS -e INPUT_ISSUESLABEL -e INPUT_PRLABEL -e INPUT_ONLYLASTTAG -e INPUT_STRIPHEADERS -e INPUT_STRIPGENERATORNOTICE -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/evalify/evalify":"/github/workspace" 7db2d7:a7ee1d955576[4](https://github.com/ma7555/evalify/runs/5262796526?check_suite_focus=true#step:4:4)cb184febfb13c36da61
/usr/local/bundle/gems/github_changelog_generator-1.1[5](https://github.com/ma7555/evalify/runs/5262796526?check_suite_focus=true#step:4:5).0/lib/github_changelog_generator/generator/generator_tags.rb:138:in `filter_since_tag': Error: can't find tag 0.1.0, specified with --since-tag option. (GitHubChangelogGenerator::ChangelogGeneratorError)
	from /usr/local/bundle/gems/github_changelog_generator-1.15.0/lib/github_changelog_generator/generator/generator_tags.rb:120:in `get_filtered_tags'
	from /usr/local/bundle/gems/github_changelog_generator-1.15.0/lib/github_changelog_generator/generator/generator_tags.rb:15:in `fetch_and_filter_tags'
	from /usr/local/bundle/gems/github_changelog_generator-1.15.0/lib/github_changelog_generator/generator/generator.rb:4[6](https://github.com/ma7555/evalify/runs/5262796526?check_suite_focus=true#step:4:6):in `compound_changelog'
	from /usr/local/bundle/gems/github_changelog_generator-1.15.0/lib/github_changelog_generator.rb:35:in `run'
	from /usr/local/bundle/gems/github_changelog_generator-1.15.0/bin/github_changelog_generator:5:in `<top (required)>'
	from /usr/local/bundle/bin/github_changelog_generator:23:in `load'
	from /usr/local/bundle/bin/github_changelog_generator:23:in `<main>'
Fetching tags... [10](https://github.com/ma7555/evalify/runs/5262796526?check_suite_focus=true#step:4:10)0/100
                                                                       
Warning: Can't find any tags in repo. Make sure, that you push tags to remote repo via 'git push --tags'

When I push v0.1.0 tag, i don't get the last warning, however, CHANGELOG.md is not created.

Same as #28

output only contains first line

Describe the bug

The step output only contains the first line of the generated changelog.

Reproduce

Steps to reproduce the behavior:

  1. Use heinrichreimer/[email protected]
  2. Reference generated output in downstream step ${{ steps.generate-changelog.outputs.changelog }}
  3. Log changelog and see that step output does not contain the entire changelog

Expected behavior

The step output should contain the entire changelog

addSections issue

I've been unable to get addSections to work. I tried using the example input from the linked page, and tried manipulating it for yaml too with no success. I've always either gotten a 'Workflow is not valid: mapping was not expected' from Github, or /usr/local/bundle/gems/github_changelog_generator-1.15.0/lib/github_changelog_generator/generator/entry.rb:71:in rescue in parse_sections': There was a problem parsing your JSON string for sections: 416: unexpected token at '{"documentation":{"prefix":"**Documentation' (RuntimeError)` when I got it to parse the yaml.

Do you have any tips?

Stuck at "Fetching events for issues and PR: x/x"

I am having issues with the changelog generator. It takes over half an hour to complete an action now, whereas it used to take 3 mins before. I've switched several options, but nothing seems to work. Has something changed, or am I missing something?

Using these options:
:date_format=>"%Y-%m-%d"
:output=>"CHANGELOG.md"
:base=>"HISTORY.md"
:issues=>true
:add_issues_wo_labels=>true
:add_pr_wo_labels=>true
:pulls=>false
:filter_issues_by_milestone=>true
:issues_of_open_milestones=>true
:author=>true
:unreleased=>true
:unreleased_label=>"Unreleased"
:compare_link=>true
:exclude_labels=>["duplicate", "question", "invalid", "wontfix", "Duplicate", "Question", "Invalid", "Wontfix", "Meta: Exclude From Changelog"]
:summary_labels=>["Release summary", "release-summary", "Summary", "summary"]
:breaking_labels=>["backwards-incompatible", "Backwards incompatible", "breaking"]
:enhancement_labels=>["enhancement", "Enhancement", "Type: Enhancement"]
:bug_labels=>["bug", "Bug", "Type: Bug"]
:deprecated_labels=>["deprecated", "Deprecated", "Type: Deprecated"]
:removed_labels=>["removed", "Removed", "Type: Removed"]
:security_labels=>["security", "Security", "Type: Security"]
:configure_sections=>"{\"new_actions\":{\"prefix\":\"**New Actions:**\",\"labels\":[\"New Actions\"]},\"new_triggers\":{\"prefix\":\"**New Triggers:**\",\"labels\":[\"New Triggers\"]},\"new_integrations\":{\"prefix\":\"**New Integrations:**\",\"labels\":[\"New Integrations\"]},\"added\":{\"prefix\":\"**Added:**\",\"labels\":[\"added\"]},\"updated\":{\"prefix\":\"**Updated:**\",\"labels\":[\"updated\"]},\"helpdesk\":{\"prefix\":\"**Help Desk:**\",\"labels\":[\"helpdesk\"]}}"
:add_sections=>{}
:issue_line_labels=>[]
:max_issues=>300
:simple_list=>false
:ssl_ca_file=>nil
:verbose=>true
:header=>"# Changelog"
:merge_prefix=>"**Merged pull requests:**"
:issue_prefix=>"**Closed issues:**"
:summary_prefix=>""
:breaking_prefix=>"**Breaking changes:**"
:enhancement_prefix=>"**Updated:**"
:bug_prefix=>"**Fixed:**"
:deprecated_prefix=>"**Deprecated:**"
:removed_prefix=>"**Removed:**"
:security_prefix=>"**Security fixes:**"
:http_cache=>true
:require=>[]
:config_file=>".github_changelog_generator"
:user=>"**********"
:project=>"**********"
:token=>"hidden value"
:unreleased_only=>true
:future_release=>"4.1"
Fetching tags...
Fetching tags... 100/100
                                                                       
Found 71 tags
Fetching tag dates...
Fetching tags dates: 71/71
Sorting tags...
Fetching closed issues...
Fetching issues... 100/1900
Fetching issues... 200/1900
Fetching issues... 300/1900
                                                                       
Received issues: 300
Filtered issues: 182
Fetching events for issues and PR: 0/182
Fetching events for issues and PR: 1/182
Fetching events for issues and PR: 2/182
Fetching events for issues and PR: 3/182
Fetching events for issues and PR: 4/182
Fetching events for issues and PR: 5/182
Fetching events for issues and PR: 6/182
Fetching events for issues and PR: 7/182
Fetching events for issues and PR: 8/182
Fetching events for issues and PR: 9/182
Fetching events for issues and PR: 10/182
Fetching events for issues and PR: 11/182
Fetching events for issues and PR: 12/182
Fetching events for issues and PR: 13/182
Fetching events for issues and PR: 14/182
Fetching events for issues and PR: 15/182
Fetching events for issues and PR: 16/182
Fetching events for issues and PR: 17/182
Fetching events for issues and PR: 18/182
Fetching events for issues and PR: 19/182
Fetching events for issues and PR: 20/182
Fetching events for issues and PR: 21/182
Fetching events for issues and PR: 22/182
Fetching events for issues and PR: 23/182
Fetching events for issues and PR: 24/182
Fetching events for issues and PR: 25/182
Fetching events for issues and PR: 26/182
Fetching events for issues and PR: 27/182
Fetching events for issues and PR: 28/182
Fetching events for issues and PR: 29/182
Fetching events for issues and PR: 30/182
Fetching events for issues and PR: 31/182
Fetching events for issues and PR: 32/182
Fetching events for issues and PR: 33/182
Fetching events for issues and PR: 34/182
Fetching events for issues and PR: 35/182
Fetching events for issues and PR: 36/182
Fetching events for issues and PR: 37/182
Fetching events for issues and PR: 38/182
Fetching events for issues and PR: 39/182
Fetching events for issues and PR: 40/182
Fetching events for issues and PR: 41/182
Fetching events for issues and PR: 42/182
Fetching events for issues and PR: 43/182
Fetching events for issues and PR: 44/182
Fetching events for issues and PR: 45/182
Fetching events for issues and PR: 46/182
Fetching events for issues and PR: 47/182
Fetching events for issues and PR: 48/182
Fetching events for issues and PR: 49/182
Fetching events for issues and PR: 50/182
Fetching events for issues and PR: 51/182
Fetching events for issues and PR: 52/182
Fetching events for issues and PR: 53/182
Fetching events for issues and PR: 54/182
Fetching events for issues and PR: 55/182
Fetching events for issues and PR: 56/182
Fetching events for issues and PR: 57/182
Fetching events for issues and PR: 58/182
Fetching events for issues and PR: 59/182
Fetching events for issues and PR: 60/182
Fetching events for issues and PR: 61/182
Fetching events for issues and PR: 62/182
Fetching events for issues and PR: 63/182
Fetching events for issues and PR: 64/182
Fetching events for issues and PR: 65/182
Fetching events for issues and PR: 66/182
Fetching events for issues and PR: 67/182
Fetching events for issues and PR: 68/182
Fetching events for issues and PR: 69/182
Fetching events for issues and PR: 70/182
Fetching events for issues and PR: 71/182
Fetching events for issues and PR: 72/182
Fetching events for issues and PR: 73/182
Fetching events for issues and PR: 74/182
Fetching events for issues and PR: 75/182
Fetching events for issues and PR: 76/182
Fetching events for issues and PR: 77/182
Fetching events for issues and PR: 78/182
Fetching events for issues and PR: 79/182
Fetching events for issues and PR: 80/182
Fetching events for issues and PR: 81/182
Fetching events for issues and PR: 82/182
Fetching events for issues and PR: 83/182
Fetching events for issues and PR: 84/182
Fetching events for issues and PR: 85/182
Fetching events for issues and PR: 86/182
Fetching events for issues and PR: 87/182
Fetching events for issues and PR: 88/182
Fetching events for issues and PR: 89/182
Fetching events for issues and PR: 90/182
Fetching events for issues and PR: 91/182
Fetching events for issues and PR: 92/182
Fetching events for issues and PR: 93/182
Fetching events for issues and PR: 94/182
Fetching events for issues and PR: 95/182
Fetching events for issues and PR: 96/182
Fetching events for issues and PR: 97/182
Fetching events for issues and PR: 98/182
Fetching events for issues and PR: 99/182
Fetching events for issues and PR: 100/182
Fetching events for issues and PR: 101/182
Fetching events for issues and PR: 102/182
Fetching events for issues and PR: 103/182
Fetching events for issues and PR: 104/182
Fetching events for issues and PR: 105/182
Fetching events for issues and PR: 106/182
Fetching events for issues and PR: 107/182
Fetching events for issues and PR: 108/182
Fetching events for issues and PR: 109/182
Fetching events for issues and PR: 110/182
Fetching events for issues and PR: 111/182
Fetching events for issues and PR: 112/182
Fetching events for issues and PR: 113/182
Fetching events for issues and PR: 114/182
Fetching events for issues and PR: 115/182
Fetching events for issues and PR: 116/182
Fetching events for issues and PR: 117/182
Fetching events for issues and PR: 118/182
Fetching events for issues and PR: 119/182
Fetching events for issues and PR: 120/182
Fetching events for issues and PR: 121/182
Fetching events for issues and PR: 122/182
Fetching events for issues and PR: 123/182
Fetching events for issues and PR: 124/182
Fetching events for issues and PR: 125/182
Fetching events for issues and PR: 126/182
Fetching events for issues and PR: 127/182
Fetching events for issues and PR: 128/182
Fetching events for issues and PR: 129/182
Fetching events for issues and PR: 130/182
Fetching events for issues and PR: 131/182
Fetching events for issues and PR: 132/182
Fetching events for issues and PR: 133/182
Fetching events for issues and PR: 134/182

Changelog includes commits from before the 'sinceTag' tag

I have a step that fetches a specific tag to use in sinceTag. This was working fine until I added excludeTagsRegex. I added this because the changelog included all the tags since the last release, but we just want it to show all the issues since the last release, regardless of their associated tag. Please clarify if I am using this incorrectly.

The step get_last_tag finds the most recent tag that does not end in -develop, and with excludeTagsRegex I am also trying to remove these same tags from the changelog. Now every changelog includes all the issues since I made this change, not since the specified tag. ( I have verified that the correct tag is being passed into this step). After removing the excludeTagsRegex line, the changelog has reverted to how it was before - the correct issues, but lots of tags that just add clutter.

       - name: "Prepare for the Github Release"
        id: generate-release-changelog-main
        uses: heinrichreimer/[email protected]
        if: github.ref == 'refs/heads/main'
        with:
          token: ${{ secrets.github-token }}
          githubSite: <redacted>
          githubApi: <redacted>
          output: "release_changelog.md"
          headerLabel: "# 📑 Changelog"
          breakingLabel: '### 💥 Breaking'
          enhancementLabel: '### 🚀 Enhancements'
          bugsLabel: '### 🐛 Bug fix'
          securityLabel: '### 🛡️ Security'
          issuesLabel: '### 📁 Other issues'
          prLabel: '### 📁 Other pull requests'
          stripGeneratorNotice: true
          issues: false
          issuesWoLabels: false
          pullRequests: true
          prWoLabels: true
          author: true
          verbose: true
          compareLink: true
          excludeTagsRegex: ".*-develop.*"
          sinceTag: ${{ steps.get_last_tag.outputs.tag }}

All change under Unrelease

Hi,

Currently my project flow GitFlow.

  • all PR is merge into develop branch (develop is default branch of git hub repo)
  • release will be on master branch (tag is created on this branch)

with above setup, every time I run this action, all change log is under the Un release.

How to use the output?

I use the example workflow.yml and realised that the output is put somewhere, but I would like to use it to create a CHANGELOG.md.
CHANGELOG.md was created in Generated log placed in /github/workspace/CHANGELOG.md, but how can I access it?
Can someone give me a hint how to do so?

This is my changelog-generator.yml:
https://github.com/Ismoh/NoitaMP/blob/72-include-changelog-generator/.github/workflows/changelog-generator.yml
And the workflow run:
https://github.com/Ismoh/NoitaMP/actions/runs/3118913727/jobs/5058526684

In addition to this I thought the release body content would be updated with the generated changelog output.

Edit: Found the path here: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#file-systems

What am I doing wrong?

No CHANGELOG.md in repo

Action ends with

Done!
Generated log placed in /github/workspace/CHANGELOG.md

But no CHANGELOG.md is generated

Missing merged/closed pull-requests from report?

Describe the bug

I used to use ferrarimarco/github-changelog-generator via docker manually to produce a CHANGELOG.md file. Since learning of your Github Actions command, I've switched to that, and noticed some discrepancies in the output.

This has lead to ferrarimarco/github-changelog-generator docker image producing different results to heinrichreimer/action-github-changelog-generator.

Reproduce

Steps to reproduce the behavior:

  1. In a repository of your choice (and assuming you can run Docker), run:
docker run -it --rm -v $(pwd):$(pwd) ferrarimarco/github-changelog-generator -t <github token> --user <github_user> --project <github_project> -o "$(pwd)/CHANGELOG.md"

Where:

  • <github_token> is a token allowing you to run commands against GitHub
  • <githug_user> is a username of a GitHub account
  • <github_project> is a project on Github.

Expected behavior

In comparing the output from both runs, the invocation from ferrarimarco/github-changelog-generator will show an inclusion of merged pull-requests, where using heinrichreimer/action-github-changelog-generator does not.

Here is the options from ferrarimarco/github-changelog-generator:

Using these options:                                                                                                                                                                                    
:date_format=>"%Y-%m-%d"                                                                                                                                                                                
:output=>"/home/n6tadam/projects/fvwm/fvwm3/CHANGELOG.md"                                                                                                                                               
:base=>"HISTORY.md"                                                                                                                                                                                     
:issues=>true                                                                                                                                                                                           
:add_issues_wo_labels=>true                                                                                                                                                                             
:add_pr_wo_labels=>true                                                                                                                                                                                 
:pulls=>true                                                                                                                                                                                            
:filter_issues_by_milestone=>true                                                                                                                                                                       
:author=>true                                                                                                                                                                                           
:unreleased=>true                                                                                                                                                                                       
:unreleased_label=>"Unreleased"                                                                                                                                                                         
:compare_link=>true                                                                                                                                                                                     
:exclude_labels=>["duplicate", "question", "invalid", "wontfix", "Duplicate", "Question", "Invalid", "Wontfix", "Meta: Exclude From Changelog"]                                                         
:summary_labels=>["Release summary", "release-summary", "Summary", "summary"]                                                                                                                           
:breaking_labels=>["backwards-incompatible", "Backwards incompatible", "breaking"]                                                                                                                      
:enhancement_labels=>["enhancement", "Enhancement", "Type: Enhancement"]                                                                                                                                
:bug_labels=>["bug", "Bug", "Type: Bug"]                                                                                                                                                                
:deprecated_labels=>["deprecated", "Deprecated", "Type: Deprecated"]                                                                                                                                    
:removed_labels=>["removed", "Removed", "Type: Removed"]                                                                                                                                                
:security_labels=>["security", "Security", "Type: Security"]                                                                                                                                            
:configure_sections=>{}                                                                                                                                                                                 
:add_sections=>{}                                                                                                                                                                                       
:issue_line_labels=>[]                                                                                                                                                                                  
:max_issues=>nil                                                                                                                                                                                        
:simple_list=>false                                                                                                                                                                                     
:ssl_ca_file=>nil                                                                                                                                                                                       
:verbose=>true                                                                                                                                                                                          
:header=>"# Changelog"                                                                                                                                                                                  
:merge_prefix=>"**Merged pull requests:**"                                                                                                                                                              
:issue_prefix=>"**Closed issues:**"                                                                                                                                                                     
:summary_prefix=>""                                                                                                                                                                                     
:breaking_prefix=>"**Breaking changes:**"                                                                                                                                                               
:enhancement_prefix=>"**Implemented enhancements:**"                                                                                                                                                    
:bug_prefix=>"**Fixed bugs:**"                                                                                                                                                                          
:deprecated_prefix=>"**Deprecated:**"                                                                                                                                                                   
:removed_prefix=>"**Removed:**"                                                                                                                                                                         
:security_prefix=>"**Security fixes:**"                                                                                                                                                                 
:http_cache=>true                                                                                                                                                                                       
:require=>[]                                                                                                                                                                                            
:token=>"hidden value" 
:user=>"fvwmorg"
:project=>"fvwm3"

This output seems to be the same when running via heinrichreimer/action-github-changelog-generator, and hence in the Github Actions YAML file:

  changelog:                                                                                                                                                                                            
      name: Update Changelog                                                                                                                                                                            
      runs-on: ubuntu-20.04                                                                                                                                                                             
      needs: build                                                                                                                                                                                      
      steps:                                                                                                                                                                                            
          - name: Checkout code                                                                                                                                                                         
            if: github.ref == 'refs/heads/master'                                                                                                                                                       
            uses: actions/checkout@v2                                                                                                                                                                   
            with:                                                                                                                                                                                       
                ref: master                                                                                                                                                                             
          - name: Update CHANGELOG                                                                                                                                                                      
            if: github.ref == 'refs/heads/master'
            uses: heinrichreimer/[email protected]
            with:
                token: ${{ secrets.GITHUB_TOKEN }} 
                issues: true
                issuesWoLabels: false
                pullRequests: true
                prWoLabels: true
                author: true
                unreleased: true
                stripGeneratorNotice: true
                verbose: true
                compareLink: true
                httpCache: true
                filterByMilestone: true
          - name: Commit CHANGELOG
            if: github.ref == 'refs/heads/master'
            uses: stefanzweifel/git-auto-commit-action@v4
            with:
                commit_user_name: Fvwm Automation
                commit_user_email: [email protected]
                commit_author: Fvwm Automation <[email protected]>
                commit_message: '[AUTO]: update CHANGELOG'
                file_pattern: CHANGELOG.md

Yet, despite the above working, there is still a clear difference in that heinrichreimer/action-github-changelog-generator is not including the same information as running the Docker command mentioned earlier. I can see that the Dockerfile in this repo is looking at the ferrarimarco/github-changelog-generator image -- so why there's a clear discrepancy here is unclear.

Thanks!

Issue with fetching the repo

Describe the bug

We have few private repositories where we are using this marketplace from 6 month but somehow it is not working since 1 month and it`s showing "Error: Unable to resolve actions. Repository not found : heinrichreimer/github-changelog-generator-action" error in each run. earlier it was working as expected. I have tried with both tags v2.3 & v2.2

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.