Git Product home page Git Product logo

generate-changelog-action's Issues

Action cannot clone repo if a folder already exists with its name

I have a repo where there's a top level folder which is also the repo's name.
So running this action inside my repo (and generating a change log of this repo) will fail because of the folder already existing.

fatal: destination path 'my-folder-name' already exists and is not an empty directory.

Might be useful to be able to override the target cloned directory with a parameter?

Error: valid package.json not found

This action produces the following error when used like shown in the example:

Run scottbrenner/generate-changelog-action@master
/usr/bin/docker run --name e87b520ef943f0bed24d3f9c56c6777de8a64d_2dadf6 --label e87b52 --workdir /github/workspace --rm -e REPO -e HOME -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -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 -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/ansible-role-packages-test/ansible-role-packages-test":"/github/workspace" e87b52:0ef943f0bed24d3f9c56c6777de8a64d
Error: valid package.json not found
    at /usr/lib/node_modules/generate-changelog/lib/package.js:18:11
    at tryCatcher (/usr/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/usr/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/usr/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/usr/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/usr/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/promise.js:725:18)
    at _drainQueueStep (/usr/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/usr/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/usr/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/usr/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:439:21)

Generated changelog empty

I can't get it to work with the provided example and I think I know why.

From lob/generate-changelog documentation:

This is meant to be used so that for every patch, minor, or major version, you update the changelog prior to running npm version so that the git tag contains the commit that updated both the changelog and version.

If the action is triggered by a tag push it is already too late to generate the changelog.

steps.Changelog.outputs.changelog has the commit messages from the previous release.

Hello

I thought it was a comfortable action, so I tested it to try it out.
I use it as follows, but it works by including the commit message of the last release each time a new release is made.

Could you please let me know if I am using it wrong?

workflow yml code

on:
  push:
    branches: [ master ]
    
env:
  VERSION: '0.3.12'

jobs:
  build:
    # The type of runner that the job will run on
    runs-on: ubuntu-latest
    timeout-minutes: 30
    
    ...
    
    - name: Checkout master branch
      uses: actions/checkout@v2
      with:
        fetch-depth: 0
        
    - name: Check changelog
      uses: scottbrenner/generate-changelog-action@master
      id: changelog

    - name: Create Release
      id: create-release
      uses: actions/create-release@latest
      env:
        GITHUB_TOKEN: ${{ secrets.TOKEN }}
      with:
        tag_name: ${{ env.VERSION }}
        release_name: Release ${{ env.VERSION }}
        body: |
          ${{ steps.changelog.outputs.changelog }}
        draft: false
        prerelease: false  
    
    ...
    

image

Change log include only last commit

In my workflow, the change log always includes only the last commit.

Reproduce:

  • Create repo from template: cawa-93/vite-electron-builder
  • Make a few commits
  • Push commit to main branch
  • Wait for the draft_release job complete. It will create a draft of a new release. Only the last commit is included in this draft body.

At first I thought it was due to the lack of previous releases or git tags. But this is not the case.

You can check this demo repository.

  • I made several commits.
  • Pushed them into the repository.
  • Published a release (this also created a git tag).
  • Made a few more commits.
  • Pushed them into the repository.
  • Published new release.

Each time the list of changes contained only the last commit.

Changlog from PR

Hi @ScottBrenner
Is there any way to generate the changelog from the new commit messages within a pull request, please?
Thank you in advance.

Fix "Lint Code Base" shellcheck workflow errors

Fix the failing checks from the "Lint Code Base" shellcheck workflow step:

File:[./entrypoint.sh]
ERROR! Found errors in [shellcheck] linter!
ERROR:[
In ./entrypoint.sh line 3:
git clone --quiet https://github.com/$REPO &> /dev/null
                                     ^---^ SC2086: Double quote to prevent globbing and word splitting.
                                           ^----------^ SC2039: In POSIX sh, &> is undefined.

Did you mean: 
git clone --quiet https://github.com/"$REPO" &> /dev/null


In ./entrypoint.sh line 12:
echo $changelog
     ^--------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
echo "$changelog"


In ./entrypoint.sh line 14:
changelog="${changelog//'%'/'%25'}"
           ^---------------------^ SC2039: In POSIX sh, string replacement is undefined.


In ./entrypoint.sh line 15:
changelog="${changelog//$'\n'/'%0A'}"
           ^-----------------------^ SC2039: In POSIX sh, string replacement is undefined.
                        ^---^ SC2039: In POSIX sh, $'..' is undefined.


In ./entrypoint.sh line 16:
changelog="${changelog//$'\r'/'%0D'}"
           ^-----------------------^ SC2039: In POSIX sh, string replacement is undefined.
                        ^---^ SC2039: In POSIX sh, $'..' is undefined.

For more information:
  https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, $'..' is undefined.
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...]

https://github.com/ScottBrenner/generate-changelog-action/runs/1129086107?check_suite_focus=true#step:4:71

New Alpine version seems to have broken the actions

When I use the action in my CI I have the following error since today :

 Step 3/7 : RUN apk --no-cache add git nodejs-npm
   ---> Running in 0bc4189572d0
  fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
  fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
  ERROR: unable to select packages:
    nodejs-npm (no such package):
      required by: world[nodejs-npm]
  The command '/bin/sh -c apk --no-cache add git nodejs-npm' returned a non-zero code: 1

There is a new version of Alpine since yesterday and the error seems to come from here.

CHANGELOG is not displayed

Hi @ScottBrenner
How do you operate this?

I tried adding this to github action,
CHANGELOG is displayed empty.

Do you know what the cause is?

Shouldn't I use on.push.tags ?

My repository: https://github.com/locona/auto-king

I did the following steps.

git commit -m "feat: xxxxxxxx"
git commit -m "1.0.9"
git tag v1.0.9
git push origin --tags

git log

92d5c7e (HEAD -> master) 1.0.9
f06b74e fix: ci
96c15ba feat: ci
07c5b17 (tag: v1.0.8) 1.0.8
e5b52de feat: ci
af0c690 fix(category): ci
f194d3e fix
aca0428 (tag: v1.0.7, origin/master) 1.0.7
e0eb0a8 fix(category): ci
6e906f0 fix(category): ci
3989e68 (tag: v1.0.6) 1.0.6
bc88fc1 feat: ci
f030913 fix: ci
62b2136 (tag: v1.0.5) feat: ci
310a1d7 fix: ci
39f267c 1.0.5
af6056c (tag: v1.0.4) 1.0.4
ead299a fix: ci
8de5d79 feat: ci
0d73576 (tag: v1.0.3) 1.0.3
279b8d0 (tag: v1.0.2) fix(functions): Fix viewport
41519cb (tag: v1.0.1, tag: v1.0.0) build(github-action): Create-Release

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.