Merge pull request #484 from mikepenz/feature/explicit_locale
Use `en` locale for `tag.toLocaleLowerCase`
This commit is contained in:
+20
-12
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -129,7 +129,7 @@ const mapPullRequest = (
|
||||
author: pr.user?.login || '',
|
||||
repoName: pr.base.repo.full_name,
|
||||
labels: new Set(
|
||||
pr.labels?.map(lbl => lbl.name?.toLocaleLowerCase() || '') || []
|
||||
pr.labels?.map(lbl => lbl.name?.toLocaleLowerCase('en') || '') || []
|
||||
),
|
||||
milestone: pr.milestone?.title || '',
|
||||
body: pr.body || '',
|
||||
|
||||
+3
-1
@@ -67,7 +67,9 @@ export class Tags {
|
||||
const length = tags.length
|
||||
if (tags.length > 1) {
|
||||
for (let i = 0; i < length; i++) {
|
||||
if (tags[i].name.toLocaleLowerCase() === tag.toLocaleLowerCase()) {
|
||||
if (
|
||||
tags[i].name.toLocaleLowerCase('en') === tag.toLocaleLowerCase('en')
|
||||
) {
|
||||
if (ignorePreReleases) {
|
||||
core.info(
|
||||
`ℹ️ Enabled 'ignorePreReleases', searching for the closest release`
|
||||
|
||||
+5
-5
@@ -98,7 +98,7 @@ export function buildChangelog(
|
||||
for (const [pr, body] of transformedMap) {
|
||||
if (
|
||||
haveCommonElements(
|
||||
ignoredLabels.map(lbl => lbl.toLocaleLowerCase()),
|
||||
ignoredLabels.map(lbl => lbl.toLocaleLowerCase('en')),
|
||||
pr.labels
|
||||
)
|
||||
) {
|
||||
@@ -111,7 +111,7 @@ export function buildChangelog(
|
||||
if (category.exhaustive === true) {
|
||||
if (
|
||||
haveEveryElements(
|
||||
category.labels.map(lbl => lbl.toLocaleLowerCase()),
|
||||
category.labels.map(lbl => lbl.toLocaleLowerCase('en')),
|
||||
pr.labels
|
||||
)
|
||||
) {
|
||||
@@ -121,7 +121,7 @@ export function buildChangelog(
|
||||
} else {
|
||||
if (
|
||||
haveCommonElements(
|
||||
category.labels.map(lbl => lbl.toLocaleLowerCase()),
|
||||
category.labels.map(lbl => lbl.toLocaleLowerCase('en')),
|
||||
pr.labels
|
||||
)
|
||||
) {
|
||||
@@ -344,12 +344,12 @@ function extractValues(
|
||||
if (extractor.method === 'match') {
|
||||
const lables = onValue.match(extractor.pattern)
|
||||
if (lables !== null) {
|
||||
return lables.map(label => label.toLocaleLowerCase())
|
||||
return lables.map(label => label.toLocaleLowerCase('en'))
|
||||
}
|
||||
} else {
|
||||
const label = onValue.replace(extractor.pattern, extractor.target)
|
||||
if (label !== '') {
|
||||
return [label.toLocaleLowerCase()]
|
||||
return [label.toLocaleLowerCase('en')]
|
||||
}
|
||||
}
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user