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

maybe a bug: in one repository it takes all commits #144

Open
FrancescoBonizzi opened this issue Jun 16, 2023 · 9 comments
Open

maybe a bug: in one repository it takes all commits #144

FrancescoBonizzi opened this issue Jun 16, 2023 · 9 comments
Assignees
Labels

Comments

@FrancescoBonizzi
Copy link

Hi! I'm using your very useful action in a lot of my projects, but I have a problem in just one. Although the action is the same (Copy pasted) and although I create releases and tags in the same manner, in one repo it always takes all commits instead of just taking the commits from the last release.

The GitHub action:

name: 📝 Generate release notes
on:
  release:
    types: [published]
  workflow_dispatch:
  
jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - name: Changelog
        uses: ardalanamini/auto-changelog@v3
        id: changelog
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          commit-types: |
            feat: 🚀 Nuove feature
            feature: 🚀 Nuove feature
            fix: 🐞 Bugfix
            perf: 📈 Migliorie di performance
            test: 👨‍🔬 Test
            chore: 🧹 Pulizia codice
          default-commit-type: 👨🏻‍💻 Cose tecniche
          mention-authors: false
          include-compare: false
          semver: false
          include-commit-links: false
          include-pr-links: false

      - name: last-release-notes.md - Checkout repo
        uses: actions/checkout@v3
        
      - name: last-release-notes.md - Write
        uses: DamianReeves/write-file-action@master
        with:
          path: ./last-release-notes.md
          contents: | 
            ${{steps.changelog.outputs.changelog}}
          write-mode: overwrite 

      - name: last-release-notes.md - Commit & Push
        uses: Andro999b/[email protected]
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          branch: main
          force: true
          message: 'Aggiornate note ultima release'

The output:

image

...and so on.

My tags:

image

I expected, as it is doing in my other repos, that it would take only the commits beginning from the v2.2.17.


Do you have any clue? Maybe is there some commit name that breaks it? Can I do something to help you investigate this?

Thanks.

@FrancescoBonizzi
Copy link
Author

FrancescoBonizzi commented Jun 16, 2023

Maybe I understood 🙈 Could it be because I made a mistake in tag names (see v2.12.13, it should be v2.2.13)?

@FrancescoBonizzi
Copy link
Author

I renamed the tag and now it works.
Sorry for bothering 🥸

@ardalanamini
Copy link
Owner

ardalanamini commented Jun 16, 2023

Hi @FrancescoBonizzi, I'm glad you find this action useful 🚀

If you have the semver option disabled it should not have mattered since it's supposed to take the latest tag created before your current one as the previous tag for change history,
So based on the config you shared the previous tag should've been v2.2.17 regardless 🤔

@FrancescoBonizzi
Copy link
Author

Maybe you sort by tag name?

@ardalanamini
Copy link
Owner

I'm not using any sorting options, so it might be a default sort, I'll need to investigate this, thanks for reporting 👍🏻

@FrancescoBonizzi
Copy link
Author

Thanks! I'm curious, let me know 👍🏻

@ardalanamini ardalanamini self-assigned this Jun 16, 2023
@ardalanamini ardalanamini reopened this Jun 16, 2023
@ardalanamini
Copy link
Owner

It seems the order is alphabetical by default which is not mentioned in the document!

@FrancescoBonizzi
Copy link
Author

Ah!

@TrySound
Copy link

Just faced this issue as well. We have some accident tags from a year ago with mistyped gt diff like commands. And those are sorted first in the list of tags.

Would requesting releases first instead of tags be a suitable solution? Though it does not provide sha but I guess tag can be requested by name too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants