Description
Context
Github and gitlab flavored markdown have their own parsing tools to detection links to issues with a simple #<number>
or !<number>
for gitlab's MR.
Example here : #103 #14 automatically add links to the corresponding issue and pull requests
Would it be interesting to have a dedicated plugin for myst ?
Many projects do have a CHANGELOG.md file, which uses this syntaxe and it would be nice to be able to convert it to a sphinx page with myst. See a changelog example here : https://github.com/github-tools/github-release-notes/blob/master/CHANGELOG.md
Also, note that there exists a project that tries to recreate the #{number}
feel for changelog with sphinx, but it works directive that are then not parsed by github/gitlab : https://github.com/sloria/sphinx-issues .
In a sense, we want the other way around, to transform #{number}
patterns into proper directives 😃
Proposal
Provide a plugin that you can parameter so that {character}{number}
are substituted to links to the corresponding issue/PR of you own project {website}/{user}/{project}/{task}/{number}
for e.g. this project, the parameters would be :
website = "https://github.com/"
user = "exectuablebooks"
project = "mdit-py-plugins"
issue_character = "#"
issue_task = "issues"
For a project in gitlab the parameters would be :
website = "https://gitlab.com/"
user = "exectuablebooks"
project = "mdit-py-plugins"
issue_character = "#"
issue_task = "issues"
pull_request_character="!"
pull_request_task = "merge_requests"
Note that for github, there is a confusion between patterns for issues and pull requests, but that's ok since github automatically redirect to the right url. For example #105 automatically redirects to #105
Tasks and updates
No response