Skip to content

Commit bbcf902

Browse files
committed
chore: refresh previous_tag docs and bundle
Signed-off-by: Rui Chen <rui@chenrui.dev>
1 parent b7faba1 commit bbcf902

5 files changed

Lines changed: 12 additions & 12 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ jobs:
173173
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
174174
```
175175

176-
When you use GitHub's built-in `generate_release_notes` support, you can also pin
177-
the comparison base explicitly with `previous_tag`. This is useful when the default
176+
When you use GitHub's built-in `generate_release_notes` support, you can optionally
177+
pin the comparison base explicitly with `previous_tag`. This is useful when the default
178178
comparison range does not match the release series you want to publish.
179179

180180
```yaml
@@ -210,7 +210,7 @@ The following are optional as `step.with` keys
210210
| `token` | String | Authorized GitHub token or PAT. Defaults to `${{ github.token }}` when omitted. A non-empty explicit token overrides `GITHUB_TOKEN`. Passing `""` treats the token as explicitly unset, so omit the input entirely or use an expression such as `${{ inputs.token || github.token }}` when wrapping this action in a composite action. |
211211
| `discussion_category_name` | String | If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see ["Managing categories for discussions in your repository."](https://docs.github.com/en/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository) |
212212
| `generate_release_notes` | Boolean | Whether to automatically generate the name and body for this release. If name is specified, the specified name will be used; otherwise, a name will be automatically generated. If body is specified, the body will be pre-pended to the automatically generated notes. See the [GitHub docs for this feature](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes) for more information |
213-
| `previous_tag` | String | When `generate_release_notes` is enabled, use this tag as GitHub's `previous_tag_name` comparison base. If omitted, GitHub chooses the comparison base automatically. |
213+
| `previous_tag` | String | Optional. When `generate_release_notes` is enabled, use this tag as GitHub's `previous_tag_name` comparison base. If omitted, GitHub chooses the comparison base automatically. |
214214
| `append_body` | Boolean | Append to existing body instead of overwriting it |
215215
| `make_latest` | String | Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Can be `true`, `false`, or `legacy`. Uses GitHub api defaults if not provided |
216216

__tests__/github.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ describe('github', () => {
153153
const generateReleaseNotes = vi.fn(async () => ({
154154
data: {
155155
name: 'Generated release',
156-
body: '## What\\'s Changed\\n* Added support for previous_tag',
156+
body: "## What's Changed\n* Added support for previous_tag",
157157
},
158158
}));
159159
const createRelease = vi.fn(async (params) => ({

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ inputs:
5454
description: "Whether to automatically generate the name and body for this release. If name is specified, the specified name will be used; otherwise, a name will be automatically generated. If body is specified, the body will be pre-pended to the automatically generated notes."
5555
required: false
5656
previous_tag:
57-
description: "When generate_release_notes is enabled, use this tag as GitHub's previous_tag_name comparison base. If omitted, GitHub chooses the comparison base automatically."
57+
description: "Optional. When generate_release_notes is enabled, use this tag as GitHub's previous_tag_name comparison base. If omitted, GitHub chooses the comparison base automatically."
5858
required: false
5959
default: ""
6060
append_body:

dist/index.js

Lines changed: 4 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/github.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ export class GitHubReleaser implements Releaser {
151151
releaseParams.body = releaseNotes.data.body;
152152
}
153153
}
154-
releaseParams.body = releaseParams.body ? this.truncateReleaseNotes(releaseParams.body) : undefined;
154+
releaseParams.body = releaseParams.body
155+
? this.truncateReleaseNotes(releaseParams.body)
156+
: undefined;
155157
return releaseParams;
156158
}
157159

0 commit comments

Comments
 (0)