saadmk11 / changelog-ci

Changelog CI is a GitHub Action that enables a project to automatically generate changelogs
https://github.com/marketplace/actions/changelog-ci
MIT License
130 stars 20 forks source link

Changelog CI uses the same PR reference for multiple releases #78

Closed robinmatz closed 2 years ago

robinmatz commented 2 years ago

Describe the bug

Changelog CI links the same PR references for multiple versions.

Your Environment

Workflow Run URL (if Public Repository): You can see this in this file: https://github.com/robinmatz/changelog-ci-poc/pull/6/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed

Contents of Your Changelog-CI Workflow File (.yaml File):

name: Changelog CI

on:
  pull_request:
    types: [ opened ]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - name: Run Changelog CI
        uses: saadmk11/changelog-ci@v1.0.0

Contents of Changelog-CI Configuration File (If Applicable):

Expected behavior

I expect there be only the newest PRs since the last release:

# Version: 0.3.2

* [#4](https://github.com/robinmatz/changelog-ci-poc/pull/4): Release 0.3.1
* [#5](https://github.com/robinmatz/changelog-ci-poc/pull/5): Make return string return string not class str

# Version: 0.3.1

* [#3](https://github.com/robinmatz/changelog-ci-poc/pull/3): New feature
* [#2](https://github.com/robinmatz/changelog-ci-poc/pull/2): Release 0.2.0

# Version: 0.2.0
* [#1](https://github.com/robinmatz/changelog-ci-poc/pull/1): Release 0.1.0

Actual behavior

All PRs are listed under the newest version

# Version: 0.3.2

* [#2](https://github.com/robinmatz/changelog-ci-poc/pull/2): Release 0.2.0
* [#1](https://github.com/robinmatz/changelog-ci-poc/pull/1): Release 0.1.0
* [#4](https://github.com/robinmatz/changelog-ci-poc/pull/4): Release 0.3.1
* [#3](https://github.com/robinmatz/changelog-ci-poc/pull/3): New feature
* [#5](https://github.com/robinmatz/changelog-ci-poc/pull/5): Make return string return string not class str

# Version: 0.3.1

* [#3](https://github.com/robinmatz/changelog-ci-poc/pull/3): New feature
* [#2](https://github.com/robinmatz/changelog-ci-poc/pull/2): Release 0.2.0
* [#1](https://github.com/robinmatz/changelog-ci-poc/pull/1): Release 0.1.0
# Version: 0.2.0
* [#1](https://github.com/robinmatz/changelog-ci-poc/pull/1): Release 0.1.0

Additional context

Please checkout the repo for additional context on PR history: https://github.com/robinmatz/changelog-ci-poc/pulls?q=is%3Apr+is%3Aclosed

Please also let me know if the issue is with my setup.

saadmk11 commented 2 years ago

Hi, @robinmatz. Thank you for creating the issue.

It looks like you do not have any release created on your repository. Changelog CI relies on GitHub Releases to keep track of changes on each release version.

Please refer to the Docs to learn more: https://github.com/saadmk11/changelog-ci#how-does-it-work :)

robinmatz commented 2 years ago

Hi @saadmk11 , thanks for your reply. I tried again with releases between the PRs, as you explained, and it works as expected.

So, the workflow would be

Then it would read

Version: 2.0.0

Version 1.0.0

That cleared it for me, so there's no need to keep this issue open 😉