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

Releasing from the first changelog entry #14

Closed
Fryuni opened this issue Mar 22, 2020 · 3 comments · Fixed by #15
Closed

Releasing from the first changelog entry #14

Fryuni opened this issue Mar 22, 2020 · 3 comments · Fixed by #15
Assignees
Labels
bug Looks like an issue v3 Release v3.x.x

Comments

@Fryuni
Copy link

Fryuni commented Mar 22, 2020

Description:

Inconsistent generation of releases for the first changelog entry

Tag:

0.0.1-beta1

Workflow:

- name: Release
  uses: docker://antonyurchenko/git-release:v3
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    DRAFT_RELEASE: "true"
    PRE_RELEASE: "false"
    CHANGELOG_FILE: "CHANGELOG.md"
    ALLOW_EMPTY_CHANGELOG: "true"
    ALLOW_TAG_PREFIX: "false"

Changelog:

# Changelog

## [0.0.1-beta1](https://github.com/croct-tech/plug-js/tree/0.0.1-beta1) (2020-03-22)

[Full Changelog](https://github.com/croct-tech/plug-js/compare/20cdc015ba4f2f5b2ec9881e9bd72ea09b6bc381...0.0.1-beta1)

Log:

WARNING 'ALLOW_EMPTY_CHANGELOG' enabled              
FATAL empty changelog for requested version: '0.0.1-beta1' 

Problem:

This regex will match the line starting with [Full Changelog] and return one line above.

Is there a reason for this check before returning len(content)? This matching will cause all releases from a first entry that have any line starting with a link to have an incomplete body, and is not consistent with what would happen with multiple entries.
With multiple entries like:

# Changelog

## [0.0.1-beta2](https://github.com/croct-tech/plug-js/tree/0.0.1-beta2) (2020-03-22)

[Full Changelog](https://github.com/croct-tech/plug-js/compare/0.0.1-beta1...0.0.1-beta2)

## [0.0.1-beta1](https://github.com/croct-tech/plug-js/tree/0.0.1-beta1) (2020-03-22)

Some message
[Full Changelog](https://github.com/croct-tech/plug-js/compare/20cdc015ba4f2f5b2ec9881e9bd72ea09b6bc381...0.0.1-beta1)

generating a release for the tag 0.0.1-beta2 will include the full changelog link on the release body, but would not on 0.0.1-beta1

@anton-yurchenko
Copy link
Owner

Hello @Fryuni,
Your changelog does not seem to follow keepachangelog guidelines.
I believe that your issue will be fixed as soon as you change your changelog format.

@Fryuni
Copy link
Author

Fryuni commented Mar 25, 2020

Keepachangelog does not specify that there should not be comments on a release, and a link at the start of plain line will still break the first release even with the link url at the bottom like they do.

This changelog is exactly the one generated by the github changelog generator, which is also based on keepachangelog, the difference being linking to the tree at the title with the diff below and the inline links instead of at the end, it gives the same result.

We ended up using a different approach, so no worries. Just know that it will break it there is any comment starting with a link

@anton-yurchenko anton-yurchenko mentioned this issue Mar 25, 2020
@anton-yurchenko
Copy link
Owner

You are right @Fryuni, links in a body of the release should be ignored.
Thank you.

@anton-yurchenko anton-yurchenko linked a pull request Mar 25, 2020 that will close this issue
@anton-yurchenko anton-yurchenko added bug Looks like an issue v3 Release v3.x.x labels Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Looks like an issue v3 Release v3.x.x
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants