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

Create issue from markdown template #5503

Merged

Conversation

Balastrong
Copy link
Contributor

@Balastrong Balastrong commented Nov 23, 2023

I was wondering why #1792 is still open so I tried to create a proof of concept for that.

At the current state I can read from {docs,.github}/ISSUE_TEMPLATE/*.md and put the files to the quick pick to get selected by the user.
If a file is selected I read the content and roughly parse title and body to pass them to makeNewIssueFile, otherwise the existing default file is opened.

template.mov

If it's something worth working on I'll be happy to put some more effort in either in this PR of in future ones, for example:

  • Add a "blank" option to the quick pick
  • Improve the parsing logic
  • Parse more fields from the metadata
  • Display the template name instead of the file name on the quick pick
  • Add support for yaml issue forms

Copy link
Member

@alexr00 alexr00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Balastrong, I'd be happy to take a PR for this, thank you! #1792 it has not been high enough priority to work on, and a PR will solve that. What you have looks like a good start, but I do think some of your bullet points are needed, specifically "blank" and template name, before this feature is ready.

@Balastrong
Copy link
Contributor Author

Thank you @alexr00! I'll work on that :)

@Balastrong
Copy link
Contributor Author

I added the two features :)

You can now find a "Blank issue" option at the end of the list and you will also get the blank template if you press Esc.
Issue names are now displayed in the list (I also added the description as it came basically for free)

demo2.mov

@Balastrong Balastrong marked this pull request as ready for review November 25, 2023 19:26
@alexr00 alexr00 added this to the December 2023 milestone Nov 28, 2023
@joaomoreno joaomoreno removed this from the December 2023 milestone Dec 11, 2023
@alexr00 alexr00 added this to the December / January 2024 milestone Dec 12, 2023
Copy link
Member

@alexr00 alexr00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you! I restored the behavior where you don't have to chose a repo if the active file belongs to a repo and made a few style changes.

@alexr00 alexr00 enabled auto-merge (squash) December 12, 2023 10:47
@alexr00 alexr00 merged commit a0349e5 into microsoft:main Dec 12, 2023
3 checks passed
@Balastrong Balastrong deleted the feature/create-issue-from-markdown-templates branch December 12, 2023 13:09
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

Successfully merging this pull request may close these issues.

4 participants