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

Configurable submit issues links #256

Open
Tracked by #1841
ouuan opened this issue Apr 21, 2020 · 0 comments
Open
Tracked by #1841

Configurable submit issues links #256

ouuan opened this issue Apr 21, 2020 · 0 comments
Assignees

Comments

@ouuan
Copy link
Contributor

ouuan commented Apr 21, 2020

By "submit issues links", I mean these lines:

{{ $issuesURL := printf "%s/issues/new?title=%s" $gh_repo (htmlEscape $.Title )}}
<a href="{{ $editURL }}" target="_blank"><i class="fa fa-edit fa-fw"></i> {{ T "post_edit_this" }}</a>
<a href="{{ $issuesURL }}" target="_blank"><i class="fab fa-github fa-fw"></i> {{ T "post_create_issue" }}</a>
{{ if $gh_project_repo }}
{{ $project_issueURL := printf "%s/issues/new" $gh_project_repo }}
<a href="{{ $project_issueURL }}" target="_blank"><i class="fas fa-tasks fa-fw"></i> {{ T "post_create_project_issue" }}</a>

Now the submit issues links are repo/issues/new, but one may want to use other links.

For example, a repo may have issue templates, but repo/issues/new won't let users choose the template, so one may want to use repo/issues/new/choose instead.

However, we can't simply use repo/issues/new/choose instead, otherwise ?title=%s will be broken, as the user will be redirected to repo/issues/new without parameters like ?title=%s if there's no issue template in the repo.

So, I suggest making these links customizable, or at least make it able to use repo/issues/new/choose instead of repo/issues/new.

An example of a repo with issue templates: https://github.com/cpeditor/cpeditor/issues/new/choose.

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

No branches or pull requests

2 participants