semantic-release / semantic-release/release-notes-generator

Cross-reference to issues within different projects

Open
#751 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
368
Forks
55
Avg merge
10m
Merged PRs (30d)
1

Description

Our setup consists of:

  • 1 repo: management-repo containing all issues
  • various repo's with the actual code (e.g. code-1, code-2, code-99)

If changes are made people refer to the issue in the management repo like this: fix: something (management-repo#1234) or fix: management-repo#1234 something fixed.
However, the release generator links all of these issues against the code repository instead of the management repo.

Within GitLab, if the MR has a reference to an external repo it gets linked properly (e.g. in the MR title).
I tried to set the issuePrefixes to ["management-repo#"] but this still links the found issue to the code-repo rather than the issue-repo.

Is there a way to tell the release-notes-generator to use a different base URL for the issues? It appears that the only way of doing that would be overwriting the commit.hbs and hardcoding the part of the owner + repository or is there an easier way of achieving this?


edit:

It seems that issueUrlFormat: "{{host}}/{{owner}}/management-repo/-/issues/{{id}}", does the trick, however this only makes the second portion clickable instead of the entire line. I was hoping setting issuePrefixes: ["management-repo#"] in parserOpts but this somehow adds in , closes management-repo#1234 rather than making the occurrences clickable.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with packages/conventional-changelog-writer/templates/commit.hbs and the parserOpts settings for issuePrefixes and issueUrlFormat. Reproduce the GitLab reference example, then trace how the generator parses management-repo#1234 and renders links; done means the full reference is clickable and points to management-repo without hardcoding a template.

Written by the indexing model from the issue text.

Assessment

Tech stack
gitlab, javascript
Domain
release
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.