-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
Feature: github releases from changelog.md #669
Conversation
Is it possible to make the timestamps match the dates for historical releases? It currently says "3 hours ago" for each release. Is this script idempotent? If I run the script multiple times, will it create duplicate releases or will it do nothing? |
Yes it is idempotent; HTTP
I don't know 🤷 the API doesn't seem to provide such an option: Maybe if we give it the Edit: It doesn't fix the timestamp; the releases API just uses the tag name to get the https://stackoverflow.com/questions/47141323/how-can-i-edit-a-github-release-date |
…d use log.Fatal consistenty remove () around err.
…add error handling for json.Marshal().
…to lastVersion. Also run formatter over code.
…nd including version.
Fixed latest tag bug: LeeWannacott@b01f9ff |
This Pull Request creates a file in
dist/update-release-notes.go
that takes releases from a CHANGELOG.md based on the https://keepachangelog.com/en/1.1.0/ specification and pushes them to GitHub under Releases:Help:
go run update-release-notes.go --help
Example of use:
go run update-release-notes.go -Repo=quick-lint/quick-lint-js -TagsRepo=quick-lint/quick-lint-js -AuthToken=$(cat token.txt)
I ran it on my fork; Here is the result: https://github.com/LeeWannacott/quick-lint-js/releases
ChatGPT's description:
This is a Go (Golang) program that automates the release notes update process for a GitHub repository. The program is intended to be run periodically and automates the process of creating releases and updating release notes by extracting data from a changelog file and comparing it with the repository’s tags and releases.The program is composed of several functions that work together to complete the following tasks:
Parse command line flags.
Get the path to the changelog file.
Extract data from the changelog file.
Get the tags from the GitHub repository.
Validate that all tags in the changelog have corresponding releases in the repository.
Update releases with changed release notes.
Create missing releases.
The program uses the GitHub API to interact with the repository and create or update releases. It also uses Go concurrency features to speed up the process of creating and updating releases.