Skip to content

Commit bb1e50d

Browse files
committed
fix: resolve wrong changelog parsing
Resolves: #141
1 parent 2425d29 commit bb1e50d

File tree

3 files changed

+454
-339
lines changed

3 files changed

+454
-339
lines changed

.github/workflows/changelog.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ jobs:
1414
generate-changelog:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v4
18-
with:
19-
fetch-depth: 0
20-
- uses: BobAnkh/auto-generate-changelog@master
21-
with:
22-
ACCESS_TOKEN: ${{secrets.GITHUB_TOKEN}}
23-
PATH: 'CHANGELOG.md'
24-
COMMIT_MESSAGE: 'docs(changelog): update release notes'
25-
TYPE: 'feat:Feature,fix:Bug Fixes,docs:Documentation,refactor:Refactor,perf:Performance Improvements'
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
- uses: BobAnkh/auto-generate-changelog@master
21+
with:
22+
ACCESS_TOKEN: ${{secrets.GITHUB_TOKEN}}
23+
PATH: "CHANGELOG.md"
24+
COMMIT_MESSAGE: "docs(changelog): update release notes"
25+
TYPE: "feat:Feature,fix:Bug Fixes,docs:Documentation,refactor:Refactor,perf:Performance Improvements"

README.md

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# auto-generate-changelog
22

3-
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/47a06388ecd34ff5a1d623827d9bb659)](https://www.codacy.com/manual/bobankhshen/auto-generate-changelog/dashboard?utm_source=github.com&utm_medium=referral&utm_content=BobAnkh/auto-generate-changelog&utm_campaign=Badge_Grade)
3+
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/47a06388ecd34ff5a1d623827d9bb659)](https://www.codacy.com/manual/bobankhshen/auto-generate-changelog/dashboard?utm_source=github.com&utm_medium=referral&utm_content=BobAnkh/auto-generate-changelog&utm_campaign=Badge_Grade)
44
![GitHub release (latest by date)](https://img.shields.io/github/v/release/BobAnkh/auto-generate-changelog?color=orange&logo=github-actions)
55
![language-python](https://img.shields.io/github/languages/top/BobAnkh/auto-generate-changelog?logo=python&logoColor=yellow)
66
![LICENSE Apache-2.0](https://img.shields.io/github/license/BobAnkh/auto-generate-changelog?logo=apache)
@@ -27,16 +27,16 @@ jobs:
2727
generate-changelog:
2828
runs-on: ubuntu-latest
2929
steps:
30-
- uses: actions/checkout@v4
31-
with:
32-
fetch-depth: 0
33-
- uses: BobAnkh/auto-generate-changelog@v1.2.5
34-
with:
35-
REPO_NAME: '<YourUserName>/<YourRepoName>'
36-
ACCESS_TOKEN: ${{secrets.GITHUB_TOKEN}}
37-
PATH: 'CHANGELOG.md'
38-
COMMIT_MESSAGE: 'docs(CHANGELOG): update release notes'
39-
TYPE: 'feat:Feature,fix:Bug Fixes,docs:Documentation,refactor:Refactor,perf:Performance Improvements'
30+
- uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 0
33+
- uses: BobAnkh/auto-generate-changelog@v1.3.0
34+
with:
35+
REPO_NAME: "<YourUserName>/<YourRepoName>"
36+
ACCESS_TOKEN: ${{secrets.GITHUB_TOKEN}}
37+
PATH: "CHANGELOG.md"
38+
COMMIT_MESSAGE: "docs(CHANGELOG): update release notes"
39+
TYPE: "feat:Feature,fix:Bug Fixes,docs:Documentation,refactor:Refactor,perf:Performance Improvements"
4040
```
4141
4242
> NOTE: Generating CHANGELOG needs all the commit history so you should set `fetch-depth: 0` with `actions/checkout`
@@ -47,21 +47,21 @@ jobs:
4747

4848
**Please see NOTES below the table for how to set some of the parameters**.
4949

50-
| Inputs | Description | Required | Default |
51-
| --------------------------- | ----------------------------------------------------------------------- | -------- | --------------------------------------------------- |
52-
| REPO_NAME | Repository name | no | `''` which means current repository |
53-
| ACCESS_TOKEN | Github Access Token. See **NOTES 1** | yes | You can just pass `${{secrets.GITHUB_TOKEN}}` |
54-
| PATH | Path to the your file | no | `CHANGELOG.md` |
55-
| BRANCH | The branch to update file specified in PATH | no | `''` which means default branch |
56-
| PULL_REQUEST | Open a new pull request if set to a target branch name. See **NOTES 2** | no | `''` which means not open pull request by default |
57-
| COMMIT_MESSAGE | Commit message | no | `docs(CHANGELOG): update release notes` |
58-
| TYPE | The type of commits you want to add to CHANGELOG. See **NOTES 3** | no | `'feat:Feature,fix:Fix'` |
59-
| COMMITTER | The committer you want to use to update file. See **NOTES 4** | no | `''` which means default committer |
60-
| DEFAULT_SCOPE | The default scope to hold all unscoped commits | no | `general` |
61-
| SUPPRESS_UNSCOPED | Whether to exclude unscoped commits | no | false |
62-
| UNRELEASED_COMMITS | Whether to include unreleased commits in the changelog | no | false |
63-
| REGENERATE_COUNT | Regenerate n recent releases' changelog. See **NOTES 5** | no | 0 |
64-
| REPLACE_EMPTY_RELEASE_INFO | Replace empty release info with some words | no | false |
50+
| Inputs | Description | Required | Default |
51+
| -------------------------- | ----------------------------------------------------------------------- | -------- | ------------------------------------------------- |
52+
| REPO_NAME | Repository name | no | `''` which means current repository |
53+
| ACCESS_TOKEN | Github Access Token. See **NOTES 1** | yes | You can just pass `${{secrets.GITHUB_TOKEN}}` |
54+
| PATH | Path to the your file | no | `CHANGELOG.md` |
55+
| BRANCH | The branch to update file specified in PATH | no | `''` which means default branch |
56+
| PULL_REQUEST | Open a new pull request if set to a target branch name. See **NOTES 2** | no | `''` which means not open pull request by default |
57+
| COMMIT_MESSAGE | Commit message | no | `docs(CHANGELOG): update release notes` |
58+
| TYPE | The type of commits you want to add to CHANGELOG. See **NOTES 3** | no | `'feat:Feature,fix:Fix'` |
59+
| COMMITTER | The committer you want to use to update file. See **NOTES 4** | no | `''` which means default committer |
60+
| DEFAULT_SCOPE | The default scope to hold all unscoped commits | no | `general` |
61+
| SUPPRESS_UNSCOPED | Whether to exclude unscoped commits | no | false |
62+
| UNRELEASED_COMMITS | Whether to include unreleased commits in the changelog | no | false |
63+
| REGENERATE_COUNT | Regenerate n recent releases' changelog. See **NOTES 5** | no | 0 |
64+
| REPLACE_EMPTY_RELEASE_INFO | Replace empty release info with some words | no | false |
6565

6666
**NOTES 1**: `${{secrets.GITHUB_TOKEN}}` has a [rate limit](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting) smaller than Personal Access Token (PAT), so if you have much more requests(commits, prs, etc.) or face a 403 rate-limit-error, use PAT instead.
6767

@@ -77,7 +77,9 @@ jobs:
7777

7878
> ```markdown
7979
> <!-- HIDE IN CHANGELOG BEGIN -->
80+
>
8081
> See CHANGELOG for more details. This line will be hided when changelog is generated.
82+
>
8183
> <!-- HIDE IN CHANGELOG END -->
8284
> ```
8385

0 commit comments

Comments
 (0)