Skip to content

Commit 380635c

Browse files
chore(deps): bump @actions/github from 5.1.1 to 6.0.0 (#470)
* Bump @actions/github from 5.1.1 to 6.0.0 Bumps [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github) from 5.1.1 to 6.0.0. - [Changelog](https://github.com/actions/toolkit/blob/main/packages/github/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github) --- updated-dependencies: - dependency-name: "@actions/github" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * update make_latest type Signed-off-by: Rui Chen <[email protected]> * run dist update Signed-off-by: Rui Chen <[email protected]> * run fmt change Signed-off-by: Rui Chen <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Rui Chen <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Rui Chen <[email protected]>
1 parent 20adb42 commit 380635c

File tree

5 files changed

+137
-169
lines changed

5 files changed

+137
-169
lines changed

dist/index.js

+3-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

+104-151
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"author": "softprops",
2323
"dependencies": {
2424
"@actions/core": "^1.10.0",
25-
"@actions/github": "^5.1.1",
25+
"@actions/github": "^6.0.0",
2626
"@octokit/plugin-retry": "^7.1.1",
2727
"@octokit/plugin-throttling": "^9.3.1",
2828
"glob": "^11.0.0",

src/github.ts

+18-4
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export interface Releaser {
4444
target_commitish: string | undefined;
4545
discussion_category_name: string | undefined;
4646
generate_release_notes: boolean | undefined;
47-
make_latest: string | undefined;
47+
make_latest: "true" | "false" | "legacy" | undefined;
4848
}): Promise<{ data: Release }>;
4949

5050
updateRelease(params: {
@@ -59,7 +59,7 @@ export interface Releaser {
5959
prerelease: boolean | undefined;
6060
discussion_category_name: string | undefined;
6161
generate_release_notes: boolean | undefined;
62-
make_latest: string | undefined;
62+
make_latest: "true" | "false" | "legacy" | undefined;
6363
}): Promise<{ data: Release }>;
6464

6565
allReleases(params: {
@@ -93,8 +93,15 @@ export class GitHubReleaser implements Releaser {
9393
target_commitish: string | undefined;
9494
discussion_category_name: string | undefined;
9595
generate_release_notes: boolean | undefined;
96-
make_latest: string | undefined;
96+
make_latest: "true" | "false" | "legacy" | undefined;
9797
}): Promise<{ data: Release }> {
98+
if (
99+
typeof params.make_latest === "string" &&
100+
!["true", "false", "legacy"].includes(params.make_latest)
101+
) {
102+
params.make_latest = undefined;
103+
}
104+
98105
return this.github.rest.repos.createRelease(params);
99106
}
100107

@@ -110,8 +117,15 @@ export class GitHubReleaser implements Releaser {
110117
prerelease: boolean | undefined;
111118
discussion_category_name: string | undefined;
112119
generate_release_notes: boolean | undefined;
113-
make_latest: string | undefined;
120+
make_latest: "true" | "false" | "legacy" | undefined;
114121
}): Promise<{ data: Release }> {
122+
if (
123+
typeof params.make_latest === "string" &&
124+
!["true", "false", "legacy"].includes(params.make_latest)
125+
) {
126+
params.make_latest = undefined;
127+
}
128+
115129
return this.github.rest.repos.updateRelease(params);
116130
}
117131

0 commit comments

Comments
 (0)