Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
allanlei committed Jan 30, 2024
1 parent f7c216d commit 47e6a68
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
11 changes: 8 additions & 3 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ function versionFilter({
depth === versionMarkerDepth,
[
text?.startsWith(versionText || ''),
tokens?.[0].type === 'link' && tokens?.[0]?.text.startsWith(versionText || '')
tokens?.[0].type === 'link' &&
tokens?.[0]?.text.startsWith(versionText || '')
].some(Boolean)
].every(Boolean)
}
Expand All @@ -59,9 +60,7 @@ export async function run(): Promise<void> {
changelog = changelog.slice(versionStartIndex)

if (versionStartIndex === -1) {
return core.setFailed(
`Could not find version ${versionText} in changelog`,
)
return core.setFailed(`Could not find version ${versionText} in changelog`)
}

// Slice the end
Expand Down

0 comments on commit 47e6a68

Please sign in to comment.