hallmark icon indicating copy to clipboard operation
hallmark copied to clipboard

Unable to use GitLab references without prefix

Open sleeyax opened this issue 5 months ago • 3 comments

Not sure what I'm doing wrong but I have the following in package.json:

"hallmark": {
    "autolinkReferences": {
      "prefix": "#",
      "url": "https://gitlab.com/company/project/-/issues/<num>"
    }
  }

And added the following entry:

## [0.0.1] - 2024-02-05

### Changed

### Added

- Add feature (#1)

### Removed

### Fixed

Then hallmark fix generates the following:

## [0.0.1] - 2024-02-05

### Changed

### Added

- Add feature ([#1](https://github.com/company/project/issues/1))

### Removed

### Fixed

As you can see, the link should be to gitlab.com but it's generating a link pointing to github.com instead.

sleeyax avatar Feb 05 '24 10:02 sleeyax

That plugin relies on prefixes like JIRA-123, GH-123, GL-123, rather than a hash. The #123 syntax is reserved for GitHub atm and handled by a different plugin (which causes the above output).

vweevers avatar Feb 05 '24 11:02 vweevers

Oh that's too bad. Is it possible at all to configure # to apply gitlab instead? I don't use GitHub for this project.

sleeyax avatar Feb 05 '24 12:02 sleeyax

Not currently. I see that remark-github has a buildUrl option that we can maybe use to override the github.com domain. We'd also need an option on this end (or maybe detect the use of GitLab by repository info in package.json).

vweevers avatar Feb 05 '24 12:02 vweevers