diff --git a/plugins/config/src/RefNameAliasAdapter/RefNameAliasAdapter.ts b/plugins/config/src/RefNameAliasAdapter/RefNameAliasAdapter.ts index 8a1eee56ef..fa06e2a54e 100644 --- a/plugins/config/src/RefNameAliasAdapter/RefNameAliasAdapter.ts +++ b/plugins/config/src/RefNameAliasAdapter/RefNameAliasAdapter.ts @@ -15,12 +15,14 @@ export default class RefNameAliasAdapter return [] } const results = await openLocation(loc).readFile('utf8') + const refColumn = readConfObject(this.config, 'refNameColumn') return results .trim() .split('\n') .filter(f => !!f && !f.startsWith('#')) .map(row => { - const [refName, ...aliases] = row.split('\t') + const aliases = row.split('\t') + const [refName] = aliases.splice(refColumn, 1) return { refName, aliases } }) } diff --git a/plugins/config/src/RefNameAliasAdapter/configSchema.ts b/plugins/config/src/RefNameAliasAdapter/configSchema.ts index 03c0b8fd32..98ff9789dc 100644 --- a/plugins/config/src/RefNameAliasAdapter/configSchema.ts +++ b/plugins/config/src/RefNameAliasAdapter/configSchema.ts @@ -10,6 +10,10 @@ export default ConfigurationSchema( locationType: 'UriLocation', }, }, + refNameColumn: { + type: 'number', + defaultValue: 0, + }, }, { explicitlyTyped: true }, )