mindsers / changelog-reader-action Goto Github PK
View Code? Open in Web Editor NEWA GitHub action to read and get data from the CHANGELOG.md file ๐
License: MIT License
A GitHub action to read and get data from the CHANGELOG.md file ๐
License: MIT License
As reported by some users in #75, the set-output
warning have not been fixed with the 2.2.1 version:
https://github.com/mindsers/changelog-reader-action/blob/master/dist/index.js#L2878
See #75 (comment) for fix
Improve the validation feature by adding human readable messages that explain what validation rules break the workflow.
It should act like a regular linter.
Putting validation_depth
at more than 0 can break the workflow. Which is expected. But the end user doesn't know what is currently breaking the workflow.
Display in the standard output the reason why a workflow is broken by this action.
Something like the other linter's output would be awesome:
The current used node verion is deprecated to use with Gh. Seems like there is no option to keep usng node12.
The following actions uses node12 which is deprecated and will be forced to run on node16: mindsers/[email protected]. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Hello there!
First of all, thank you for the great tool! We integrated it into our pipelines for several of our projects and it works well in most cases, but not in all of the cases.
It looks like the tool only supports simple cases of versioning (MAJOR.MINOR.PATCH format), but ignores entities in CHANGELOG.md which contains pre-release and/or build metadata information.
Well, I understand it might be up to the author which version standard to support but it looks like "semver" is well-documented and therefore wide-spread.
E.G:
NodeJS: https://github.com/conventional-changelog/standard-version
Your can check out for the details, documentation and test cases on: https://semver.org/
Thanks!
Would you be open to a contribution that allows changelog-reader-action
to export a tmp file path that contains the changelog entry? This would be helpful to avoid shell escape sequence on richer markdown content. I've ran into issues with this for integrations that require a path to a file containing release notes (like goreleaser for example). I'd be happy to contribute this feature if you'd be open to it ๐
I was thinking:
outputs.changesFile
- a path to a temporary file containing the text for the changelog entry.
Then I can use it like so:
name: release
on:
push:
tags:
- 'v*'
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Extract Version from Tag
id: tag_name
run: |
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v}
shell: bash
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Generate Release Changes
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
version: ${{ steps.tag_name.outputs.current_version }}
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist --release-notes ${{ steps.changelog_reader.outputs.changesFile }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
It would be helpful if this action added additional information to the output to support the actions/create-release action. Specifically properties: tag_name, release_name, prerelease, body.
I have a workflow that is triggered when new tags are created, and I don't always know the path to the CHANGELOG.md file. I'm trying to accomplish something like this:
- name: Get path for changelog
id: changelog_path
shell: bash
run: |
echo ::set-output name=path::$(ls ./**/${{ steps.app_short_name.outputs.name }}/CHANGELOG.md)
- name: Extract changelog
if: ${{ steps.app_short_name.outputs.name && steps.check.outputs.result != 'stop' }}
id: changelog_reader
uses: mindsers/changelog-reader-action@v1
with:
version: steps.tag_version.outputs.current_version
path: steps.changelog_path.outputs.path
Sadly this seems to fail, even though the path it's searching for returns a valid changelog. But maybe I'm going about this the wrong way. Any help is appreciated!
Since the latest update (v2.1.0), the contents of the changelog are not captured and outputted by the action.
##[debug]Evaluating condition for step: 'Get Changelog Content'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Get Changelog Content
##[debug]Loading inputs
##[debug]Evaluating: env.version_num
##[debug]Evaluating Index:
##[debug]..Evaluating env:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'version_num'
##[debug]=> '1.1.0'
##[debug]Result: '1.1.0'
##[debug]Loading env
Run mindsers/changelog-reader-action@v[2](https://github.com/0x5c/hexchat-void-repos/runs/7059293304?check_suite_focus=true#step:4:2)
::group::Parse data
Parse data
::group::Validate data
Validate data
::set-output name=version::1.1.0
##[debug]steps.changelog_reader.outputs.version='1.1.0'
::set-output name=date::2022-0[6](https://github.com/0x5c/hexchat-void-repos/runs/7059293304?check_suite_focus=true#step:4:6)-26
##[debug]steps.changelog_reader.outputs.date='2022-06-26'
::set-output name=status::released
##[debug]steps.changelog_reader.outputs.status='released'
::set-output name=changes::
##[debug]steps.changelog_reader.outputs.changes=''
##[debug]Node Action run completed with exit code 0
##[debug]Finishing: Get Changelog Content
If the user passes a specific version to target in the input param, the action should return an error that the targeted version was not found.
Hey, I really like this action but sadly somehow it fails currently with my CHANGELOG.md with error:
##[error](intermediate value)(intermediate value)(intermediate value) is not iterable
See log here: https://github.com/svenstaro/site24x7_exporter/runs/842970939?check_suite_focus=true
My CHANGELOG.md: https://github.com/svenstaro/site24x7_exporter/blob/eca02aa02160f9c22d9145eb1bc5dfb08988b9b8/CHANGELOG.md
I believe my CHANGELOG.md is compliant to the expected format but obviously something throws the action off.
The vague output makes it fairly hard to see what the error is, sadly.
The output body in Markdown format with a newline will make the release body keep newlines.
The one newline should show as space with Markdown format, and the multi newlines should show as one newline.
Could you parse the changelog body with the correct format to output?
After the new release, my deployment is not getting the version entry. The actions is raising the error:
Error: releasedVersions is not defined
##[warning]Failed to download action 'https://api.github.com/repos/mindsers/changelog-reader-action/tarball/v1'. Error Response status code does not indicate success: 404 (Not Found).
##[warning]Back off 20.663 seconds before retry.
With the following config and a CHANGELOG.md that only has an [Unreleased]
section, I get this warning: Warning: Unexpected input(s) 'validation_depth', valid inputs are ['path', 'version']
- name: Validate changelog
uses: mindsers/changelog-reader-action@v2
with:
validation_depth: 10
version: Unreleased
I'm working on automating the release process for https://github.com/yannickcr/eslint-plugin-react and ran into an issue where the changelog format used doesn't fully work with this action.
Example version entry:
## [7.29.1] - 2022.02.25
### Fixed
* [`jsx-key`]: prevent false "missing array key" warning ([#3215][] @ljharb)
* [`jsx-indent`]: avoid checking returns sans jsx ([#3218][] @ljharb)
* [`jsx-key`]: avoid a crash ([#3220][] @ljharb)
* version settings: avoid a crash with an invalid version ([#3219][] @ljharb)
[7.29.1]: https://github.com/yannickcr/eslint-plugin-react/compare/v7.29.0...v7.29.1
[#3220]: https://github.com/yannickcr/eslint-plugin-react/issues/3220
[#3219]: https://github.com/yannickcr/eslint-plugin-react/issues/3219
[#3218]: https://github.com/yannickcr/eslint-plugin-react/issues/3218
[#3215]: https://github.com/yannickcr/eslint-plugin-react/issues/3215
There's two issues due to using link references.
[`jsx-key`]
.I worked around the first issue by pulling the common links out in another step and appending them to the release notes.
The second issue is happening because of this line
What's the reason for excluding these? Would you be open to adding a new setting to skip this filter?
It would be nice to have some basic validation of the changelog to ensure developers are incrementing the version in accordance with Semantic Versioning standards and Keep a Changelog formatting.
Proposed Validation Rules:
Adding an input param such as validation_depth
would allow users to configure how much, if any, of their changelog they would like to have validated. Setting a depth to 0 would, in sense, disable validation. This would be a helpful setting in case the codebase maybe had a change log that didn't follow standards when it was started.
I am trying to create unstable releases and use the Unreleased section in a CHANGELOG.md
.
I was hoping that instead of grepping for ##
headers that match a v1.2.3-style semantic version, that when the version was missing, this action would simply pick the first sub-header, regardless of its title.
What do you think about this? Either, supporting "Unreleased" (and similar) as valid version identifier or just taking the versions[0]
instead of running it through findVersionById
?
(Aside: The README claims `validation_depth` is set to `0` by default, but in the screenshot above it's set to `10` and I haven't configured it).
Originally posted by @guihkx in #75 (comment)
Hi!
Thanks for the useful action. Unfortunately lately we started getting this warning:
The
set-output
command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Could you please update your @actions/core
dependency to at least version 1.10.0
.
Thank you!
Deprecation notice is being thrown. Can this get bumped from 12 to 16?
Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: <snip>, mindsers/changelog-reader-action, <snip>
First of all, thanks for making this awesome action! I've been really needing something to essentially lint and extract CHANGELOG.md
details into a GH release.
That said, I did find some issues when trying to utilize this for Python pip packages. As you may or may not know, the regex for Python pip versions in PyPi is quite strict. So there are a limited number of ways that prereleases
can be defined. Specifically, when we define a version as 0.1.0a1
, the parsing fails along with the prerelease designation. Did some debugging myself and determined that the only issue is that the hyphen (-
) is strictly enforced for prereleases.
I have a version that works for our needs on my fork but unsure how it will affect other use-cases. I'll soon issue a PR so that we can discuss any unwanted impact to see if we can determine a good way to handle all cases including Python prereleases.
In my changelog file I already had a entry:
## [1.0.0-beta.0] - 2022-07-20
### Added
- Initial project files
When adding another entry for 1.0.0-beta.1 I end up getting this error message:
Only 'fixed, security' sections are allowed
So the current entries look like this:
## [1.0.0-beta.1] - 2022-07-24
### Added
- Interceptor adding a Bearer Token to HTTP requests with an URL matching the defined regular expression
## [1.0.0-beta.0] - 2022-07-20
### Added
- Initial project files
As far as I see there's no reason why I shouldn't be able to have an added
section for my new version as well.
A next step for the action would be to support a configuration file stored in the repository. The goal is to make the configuration "versionable".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.