You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to open an issue via CLI to gianarb/gianarb.github.com the prompt that lists available template does not show what I expect. It shows wrong templates.
Steps to reproduce the behavior
gh issue create --repo gianarb/gianarb.github.com
Creating issue in gianarb/gianarb.github.com
? Choose a template [Use arrows to move, type to filter]
Beta: Bug report
> beta--feature-request.md
Expected vs actual behavior
As you can see the cli proposes two templates. But my repository only has one
I think that the bug is that, even though you've used the --repo, the issue templates are still read from the same current directory ignoring the --repo flag. This behavior is clearly wrong, as you've demonstrated. We will try to address this.
I tried moving my terminal in the root directory of the project I am referencing to as you suggested, I removed the --repo flag as well, but now I do not get the template selection anymore:
$ gh issue create
Creating issue in gianarb/gianarb.github.com
? Title
Since there is only 1 template in your repo, there is no template chooser. This is by design. Your template will automatically be used when you choose to open the text editor to author the issue body. I can see how this could be confusing after your previous experience, though.
Ah ok! yeah, this is another behavior I was not getting right.
My expectation (just as the UI does), is to see the list of templates in any case (even if we have only one) because we should have something like Blank available to get a clean issue without any template.
But I understand the behavior now that you told me it and I can keep removing the pre-populated information if I do not need them. But from who comes from the UI (everybody) this flow will look a bit weird I presume, but I don't know 👍 no big deal for me
My expectation (just as the UI does), is to see the list of templates in any case (even if we have only one) because we should have something like Blank available to get a clean issue without any template.
That makes sense! We will try to provide an option to use the blank template just like the web UI does. Thank you for the suggestion!
Activity
mislav commentedon Feb 19, 2020
@gianarb Thank you for reporting!
I think that the bug is that, even though you've used the
--repo, the issue templates are still read from the same current directory ignoring the--repoflag. This behavior is clearly wrong, as you've demonstrated. We will try to address this.gianarb commentedon Feb 19, 2020
Hello @mislav ,
I tried moving my terminal in the root directory of the project I am referencing to as you suggested, I removed the
--repoflag as well, but now I do not get the template selection anymore:mislav commentedon Feb 19, 2020
@gianarb Thanks for following up.
Since there is only 1 template in your repo, there is no template chooser. This is by design. Your template will automatically be used when you choose to open the text editor to author the issue body. I can see how this could be confusing after your previous experience, though.
cli/command/title_body_survey.go
Lines 52 to 56 in 61ff5d7
gianarb commentedon Feb 19, 2020
Ah ok! yeah, this is another behavior I was not getting right.
My expectation (just as the UI does), is to see the list of templates in any case (even if we have only one) because we should have something like
Blankavailable to get a clean issue without any template.But I understand the behavior now that you told me it and I can keep removing the pre-populated information if I do not need them. But from who comes from the UI (everybody) this flow will look a bit weird I presume, but I don't know 👍 no big deal for me
mislav commentedon Feb 19, 2020
That makes sense! We will try to provide an option to use the blank template just like the web UI does. Thank you for the suggestion!
vilmibm commentedon Sep 16, 2020
I think we can call this closed as of #950