Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no commit hash url text #53

Closed
Slluxx opened this issue Feb 9, 2021 · 5 comments
Closed

no commit hash url text #53

Slluxx opened this issue Feb 9, 2021 · 5 comments

Comments

@Slluxx
Copy link

Slluxx commented Feb 9, 2021

Releases have this text for me:

* [](http://github.com/../../../) - Update VERSION
* [](http://github.com/../../../) - Update buildRelease.yml
* [](http://github.com/../../../) - Update buildRelease.yml

The URL works and is complete but the text is missing, thus its displaying a line as:

  • - Update VERSION

I am building a release like this (in case this has to do something with it):

    - name: Create Release
      run: |
        set -x
        assets=()
        for asset in ./*.zip; do
          assets+=("-a" "$asset")
        done
        hub release create "${assets[@]}" -d -m "Release v${{ steps.set-version.outputs.version }}
        
        ${{ steps.changelog.outputs.changelog }}" "v${{ steps.set-version.outputs.version }}"
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@metcalfc
Copy link
Owner

metcalfc commented Feb 9, 2021

Thats odd. So the bit that does the real work here is a one liner in bash:

log=$(git log "${base_ref}...${head_ref}" \
  --pretty=format:"* [\`%h\`](http://github.com/${repo_url}/commit/%H) - %s" \
  --reverse)

My guess is that the way you're doing the notes is getting wrecked in the shell via expansions. There are backticks in the short hash link so those could be getting evaluated. I'm not sure if there is a better way to escape those in a shell.

Have you considered using a release specific action instead of hub in shell script? https://github.com/marketplace/actions/create-release seems reasonably aligned:

    - uses: ncipollo/release-action@v1
      with:
        artifacts: "./*zip"
        name: "Release v${{ steps.set-version.outputs.version }}"
        body: "${{ steps.changelog.outputs.changelog }}"
        tag: "v${{ steps.set-version.outputs.version }}"
        token: ${{ secrets.GITHUB_TOKEN }}

@Slluxx
Copy link
Author

Slluxx commented Feb 10, 2021

Allrighty, using release-action@v1 the body looks just like expected. I had a reason for using hub but i think that is obsolete so this solution is 100% better.


I do have 2 unrelated feature requests though:
Is it possible to display not just the commit title but also the description? like this:

  • 357e49f - Added: Includes now dumps of all currently available Emuiibos
    And here the commit description. more explanation without cramming important sentences into the title.
    Preferably multi line, for some beautiful formatted text. maybe the commit description can have markdown styling so it shows here perfectly?
  • 94a8cd6 - Changed: Update buildRelease.yml
  • a4452bc - Changed: python setup action
    again with body text

And my other, more advanced request would be to use keywords to group commit messages.
See this example: https://github.com/olivierlacan/keep-a-changelog/blob/master/CHANGELOG.md

Basically if a commit message starts with Added:, Removed:, Fixed: or Changed: it will group them together and display them like this (other if no prefix):

Added

  • 357e49f - Added: Includes now dumps of all currently available Emuiibos

Changed

  • 94a8cd6 - Changed: Update buildRelease.yml
  • a4452bc - Changed: python setup action

Other

  • 154c8b7 - Bumped Version to 2.1.0

Those 2 Features together would make this changelog-generator just absolutly perfect.

@Slluxx
Copy link
Author

Slluxx commented Feb 17, 2021

@metcalfc hey you havent replied in a while. i know my text would belong in a new issue but may you still take a look at my suggestion?

@metcalfc
Copy link
Owner

metcalfc commented Feb 17, 2021 via email

@Slluxx
Copy link
Author

Slluxx commented Feb 17, 2021

Sorry to disturb your vacation! Your action is great as is and i completely get the point of a simple one like this. Thanks for pointing me in another direction and i hope you have a few more great days ahead!

Cheers!

@Slluxx Slluxx closed this as completed Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants