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 || '',
|
author: pr.user?.login || '',
|
||||||
repoName: pr.base.repo.full_name,
|
repoName: pr.base.repo.full_name,
|
||||||
labels: new Set(
|
labels: new Set(
|
||||||
pr.labels?.map(lbl => lbl.name?.toLocaleLowerCase() || '') || []
|
pr.labels?.map(lbl => lbl.name?.toLocaleLowerCase('en') || '') || []
|
||||||
),
|
),
|
||||||
milestone: pr.milestone?.title || '',
|
milestone: pr.milestone?.title || '',
|
||||||
body: pr.body || '',
|
body: pr.body || '',
|
||||||
|
|||||||
+3
-1
@@ -67,7 +67,9 @@ export class Tags {
|
|||||||
const length = tags.length
|
const length = tags.length
|
||||||
if (tags.length > 1) {
|
if (tags.length > 1) {
|
||||||
for (let i = 0; i < length; i++) {
|
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) {
|
if (ignorePreReleases) {
|
||||||
core.info(
|
core.info(
|
||||||
`ℹ️ Enabled 'ignorePreReleases', searching for the closest release`
|
`ℹ️ Enabled 'ignorePreReleases', searching for the closest release`
|
||||||
|
|||||||
+5
-5
@@ -98,7 +98,7 @@ export function buildChangelog(
|
|||||||
for (const [pr, body] of transformedMap) {
|
for (const [pr, body] of transformedMap) {
|
||||||
if (
|
if (
|
||||||
haveCommonElements(
|
haveCommonElements(
|
||||||
ignoredLabels.map(lbl => lbl.toLocaleLowerCase()),
|
ignoredLabels.map(lbl => lbl.toLocaleLowerCase('en')),
|
||||||
pr.labels
|
pr.labels
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
@@ -111,7 +111,7 @@ export function buildChangelog(
|
|||||||
if (category.exhaustive === true) {
|
if (category.exhaustive === true) {
|
||||||
if (
|
if (
|
||||||
haveEveryElements(
|
haveEveryElements(
|
||||||
category.labels.map(lbl => lbl.toLocaleLowerCase()),
|
category.labels.map(lbl => lbl.toLocaleLowerCase('en')),
|
||||||
pr.labels
|
pr.labels
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
@@ -121,7 +121,7 @@ export function buildChangelog(
|
|||||||
} else {
|
} else {
|
||||||
if (
|
if (
|
||||||
haveCommonElements(
|
haveCommonElements(
|
||||||
category.labels.map(lbl => lbl.toLocaleLowerCase()),
|
category.labels.map(lbl => lbl.toLocaleLowerCase('en')),
|
||||||
pr.labels
|
pr.labels
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
@@ -344,12 +344,12 @@ function extractValues(
|
|||||||
if (extractor.method === 'match') {
|
if (extractor.method === 'match') {
|
||||||
const lables = onValue.match(extractor.pattern)
|
const lables = onValue.match(extractor.pattern)
|
||||||
if (lables !== null) {
|
if (lables !== null) {
|
||||||
return lables.map(label => label.toLocaleLowerCase())
|
return lables.map(label => label.toLocaleLowerCase('en'))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const label = onValue.replace(extractor.pattern, extractor.target)
|
const label = onValue.replace(extractor.pattern, extractor.target)
|
||||||
if (label !== '') {
|
if (label !== '') {
|
||||||
return [label.toLocaleLowerCase()]
|
return [label.toLocaleLowerCase('en')]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
|
|||||||
Reference in New Issue
Block a user