File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1212 runs-on : ubuntu-latest
1313 steps :
1414 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
15+ with :
16+ fetch-depth : 0
1517 - name : Determine changed files
1618 id : changed-files
1719 run : |
2527 script : |
2628 const fs = require('fs')
2729 const files = '${{ steps.changed-files.outputs.files }}'.trim().split(/\r?\n/)
28- const nameIdRegex = /\[(?<name>[^\]]+)\]\(https:\/\/github\.com\/(?<id>[^\)]+)\)/g
30+ const nameIdRegex = /\[(?<name>[^\]]+)\]\(https:\/\/github\.com\/(?<id>[^\)/ ]+)\)/g
2931 const contributorNames = new Map()
3032 for (file of files) {
3133 let lines = fs.readFileSync(file, {encoding: 'utf8'}).split(/\r?\n/)
@@ -35,10 +37,10 @@ jobs:
3537 }
3638 }
3739 }
38- let boolean hasMultipleNames = false
40+ let hasMultipleNames = false
3941 for (const [profile, names] of contributorNames) {
4042 if (names.size > 1) {
41- core.error(' Multiple names found for profile '" + profile + "': ' + Array.from(names).join(', '))
43+ core.error(" Multiple names found for profile '" + profile + "': " + Array.from(names).join(', '))
4244 hasMultipleNames = true
4345 }
4446 }
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ jobs:
127127 profile = committerProfile
128128 }
129129 contributors.add(profile)
130- computeIfAbsent(contributorNames, profile, () => new Set()).add(authorName)
130+ computeIfAbsent(contributorNames, profile, () => new Set()).add(authorName.trim() )
131131 } else { // author is null for directly pushed commits, which happens e.g. for I-build submodule updates
132132 console.log("Skip commit of " + authorName)
133133 }
@@ -144,11 +144,11 @@ jobs:
144144 const acknowledgementsFile = 'website/news/${{ inputs.eclipse-version }}/acknowledgements.md'
145145 let lines = fs.readFileSync(acknowledgementsFile, {encoding: 'utf8'}).split(/\r?\n/)
146146
147- const nameIdRegex = /\[(?<name>[^\]]+)\]\(https:\/\/github\.com\/(?<id>[^\)]+)\)/g
147+ const nameIdRegex = /\[(?<name>[^\]]+)\]\(https:\/\/github\.com\/(?<id>[^\)/ ]+)\)/g
148148 const existingContributorNames = new Map()
149149 for (line of lines) {
150150 for (match of line.matchAll(nameIdRegex)) {
151- existingContributorNames.set(match.groups.id, match.groups.name)
151+ existingContributorNames.set(match.groups.id.trim() , match.groups.name.trim() )
152152 }
153153 }
154154 // ------------------------------------------------------
You can’t perform that action at this time.
0 commit comments