antfu / changelogithub Goto Github PK
View Code? Open in Web Editor NEWGenerate changelog for GitHub
License: MIT License
Generate changelog for GitHub
License: MIT License
I wish the changelog could be generated using only merge commit (git log --merges) to have a tool more inclusive for those want do not want use squash merges.
Add an option which add the --merges
to git commands.
No response
Not sure if this issue must be here or at unjs/changelogen#62
Currently, the generator checks if a ref is a tag by looking at the first letter, if it isn't v
, the process will abort.
Lines 49 to 53 in 6b76405
Maybe we can remove this limit by changing to a more robust checking method, such as the full name of the ref (refs/tag/${tagname}
).
I'm first to use this tool to auto release on github.
But every time release content is:
I see https://github.com/antfu/unplugin-vue-components changelog is:
https://github.com/tjx666/unplugin-externalize-deps/releases
Not need
npm
Is it possible to get the release id after success updating the changelog?
By create-release, it returns some outputs.
By using the release id, i can do further build like this.
Or is there any other way to generate the changelog and to release builds at the same time?
Thanks!
Noting to suggest on codes. Just wish to simplify the process of releasing and building.
No response
No response
Currently, the output option must be used with a provided token. But actually, it can run without token so that we can use this option to maintain a CHANGELOG file or preview the change log locally without a step to get the github token and use the useless option -t
in this case.
In my opinion, it is easy to implement:
From:
if (!config.token) {
console.error(red('No GitHub token found, specify it via GITHUB_TOKEN env. Release skipped.'))
process.exitCode = 1
printWebUrl()
return
}
if (typeof config.output === 'string') {
await fs.writeFile(config.output, md, 'utf-8')
console.log(yellow(`Saved to ${config.output}`))
return
}
To:
if (typeof config.output === 'string') {
await fs.writeFile(config.output, md, 'utf-8')
console.log(yellow(`Saved to ${config.output}`))
return
}
if (!config.token) {
console.error(red('No GitHub token found, specify it via GITHUB_TOKEN env. Release skipped.'))
process.exitCode = 1
printWebUrl()
return
}
No response
No response
By default,Secret names must not start with GITHUB_.
I personally think that the naming of secrets should be modified to avoid confusion for users.If you think it's necessary, I'm more than happy to provide a PR.👋👋
I think it fails to find previous tag when using it at the first time.
git tag v1.0.0
npx changelogithub --dry
See logs below:
changelogithub v0.6.5
Error: Command failed with exit code 128: git --no-pager log undefined...v1.0.0 --pretty="----%n%s|%h|%an|%ae%n%b" --name-status
fatal: ambiguous argument 'undefined...v1.0.0': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
This package is really useful and I am using it for my OSS project. However, my company maintains CHANGELOG.md
file and changelogithub doesn't generate/update changelog.md file.
Maybe passing file option to update the changelog file
N/A
Thanks so much for your tools ❤️
When I tried to implement a github action with this plugin, I couldn't because it is designed only for github.com
. Not only config definition fails e.g. Error: Can not parse GitHub repo from url
but also the endpoint always referes to github.com
making it difficult to add in projects inside Github Enterprise
Add two additional properties in the config to override the default urls so the endpoints will work no matter which Github environment it is.
export default {
baseUrl: "git.custom.com", // default: github.com
baseUrlApi: "git.custom.com/api/v3", // default: api.github.com
repo: "eliamartani/myrepo",
};
I honestly couldn't think of a better suggestion to change the repo
validation so that's why I put the repo in the example
Right now, the only alternative I found is changelogen
but I need to create a release manually.
No response
This is my config, first use actions/create-release@v1
create release and this action will output a upload_url for next step which upload asset, and then npx changelogithub
will got No significant changes
.
It compare:
0b8521fe555b4cd47c93e4a051ac197d8d4d4506 -> v3.31.0 (0 commits)
v3.31.0 hash is 0b8521fe555b4cd47c93e4a051ac197d8d4d4506
, so compare itself with itself. and got nothing else.
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- run: npx changelogithub
continue-on-error: true
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release.zip
asset_name: release-${{ matrix.os }}.zip
asset_content_type: application/zip
When we use keywords (e.g. closes
, fixes
, resolves
) to link an issue in commit message, the changelog will look like this:
Hello! Sorry if this is not related to the repo but I hope it's ok that I ask this here.
In this example GitHub action usage.. do we need to set the token for ${{secrets.GITHUB_TOKEN}}
somewhere?
This happens whenever I try to do a release...
Run npx changelogithub
npm WARN exec The following package was not found and will be installed: changelogithub
changelogithubv0.12.1
v0.2.11 -> v0.2.1[2](https://github.com/walmartwarlord/foodapp/runs/7167987099?check_suite_focus=true#step:4:7) (1 commits)
--------------
--------------
Creating release notes...
FetchError: 403 Forbidden (https://api.github.com/repos/walmartwarlord/foodapp/releases)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async sendRelease (file:///home/runner/.npm/_npx/b22f3b69[8](https://github.com/walmartwarlord/foodapp/runs/7169182091?check_suite_focus=true#step:4:9)9da43b0/node_modules/changelogithub/dist/chunks/generate.mjs:28:15)
at async CAC.<anonymous> (file:///home/runner/.npm/_npx/b22f3b69[9](https://github.com/walmartwarlord/foodapp/runs/7167987099?check_suite_focus=true#step:4:10)db43a0/node_modules/changelogithub/dist/cli.mjs:39:5)
Error: Process completed with exit code 1.
To release with a file by changelogithub
.
I am using it for a tauri-app and I want to release with a compiled file.
maybe like:
- run: npx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
files: ['./dist/index.js', './src-tauri/target/release/app.exe']
No response
No response
Hi, I have a project and have lots of tags. Not all of the tags is starts with v
. E.g.
page_v3.19.1
v3.19.2
page_v3.19.2
v3.19.3
page_v3.19.3
v3.19.4
page_v3.19.4
v3.19.5
page_v3.19.5
v3.19.6
page_v3.19.6
v3.19.7
page_v3.19.7
v3.20.0
page_v3.20.0
v3.20.1
page_v3.20.1
v3.21.0
page_v3.21.0
The prefix with page_v
is have nothing to do with v
, I want to compare prefixes with v
, not page_v
. But I found the code, It always gets the latest tag and did not do anything to filter and compares newer tag.
Line 17 in 9913fd7
Hey,
Before PRing I wanted to ask if this would be considered - currently, changelogithub
outputs a "Contributors" section by default, even though GitHub's releases already has that enabled:
It's kind of a duplication so I thought disabling it by default would be better.
Another idea would be to replace "Contributors" with a "New contributors" section, which I think would make more sense (and that's what GitHub's auto-release note feature does too).
I'm willing to try and PR that if I have your go. :)
Hello, I'm adding a GitHub Action to a private repository. I'm creating the tag and uploading it correctly with the bumpp
library, but when the GitHub Action runs, it returns that it can't find the tag and skips the release. I've attached some screenshots.
Not link to reproduce because it's a private repository.
System:
OS: macOS 14.3.1
CPU: (10) x64 Apple M1 Pro
Memory: 17.59 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v18.12.1/bin/yarn
npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
Browsers:
Chrome: 123.0.6312.124
Safari: 17.3.1
npm
Hey! Nice work on this idea. If you like to, I think would be nice to have action command directly from one package. I plan to expose some more features from changelogen such as server output and version bumps so makes sense to extend it :)
As mentioned in README, we use changelogithub in the Github Actions. But now, we should depend this package directly in the package.json
.
We can build another version for the usage as a Github Actions, like
# - run: npx changelogithub
# env:
# GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- uses: antfu/changelogithub@v0
I think it will be better :)
I have a repo named sznm.dev
and spoker
It works on spoker
but not on sznm.dev
Reproduction link:
https://github.com/sozonome/sznm.dev/runs/6859948295?check_suite_focus=true#step:4:9
I think the issue is within the regex being used in git.ts
https://regex101.com/r/8G1j7G/1
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.