Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github / gitlab parsing of issues and pull requests #106

Open
ClementPinard opened this issue Mar 20, 2024 · 1 comment
Open

Add github / gitlab parsing of issues and pull requests #106

ClementPinard opened this issue Mar 20, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@ClementPinard
Copy link

ClementPinard commented Mar 20, 2024

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

@ClementPinard ClementPinard added the enhancement New feature or request label Mar 20, 2024
Copy link

welcome bot commented Mar 20, 2024

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant