vermiculus / magithub

**DEPRECATED - please use Forge instead!** -- Magit-based interfaces to GitHub
GNU General Public License v3.0
579 stars 63 forks source link

Support reading .github/ISSUE_TEMPLATE as a folder #388

Open junjizhi opened 5 years ago

junjizhi commented 5 years ago

Github supports multiple issue templates in a .github/ISSUE_TEMPLATE folder. When I submit an issue on a repo with that settings, I got the following error:

Debugger entered--Lisp error: (file-error "Read error" "Is a directory" "/Users/junjizhi/projects/repo/.github/ISSUE_TEMPLATE")
  insert-file-contents("/Users/junjizhi/projects/repo/.github/ISSUE_TEMPLATE")
  ...
  magithub-issue--template-text("ISSUE_TEMPLATE")
  magithub-issue-new(((id . 157747011)  
  call-interactively(magithub-issue-new)
  magit-invoke-popup-action(105)
  funcall-interactively(magit-invoke-popup-action 105)
  call-interactively(magit-invoke-popup-action nil nil)
  command-execute(magit-invoke-popup-action)
vermiculus commented 5 years ago

If ISSUE_TEMPLATE is a folder, are each of the files inside a possible template? Is there any documentation from GitHub on this?

junjizhi commented 5 years ago

@vermiculus yes, here's the doc.

The template query parameter works with templates stored in an ISSUE_TEMPLATE or PULL_REQUEST_TEMPLATE subdirectory within the root,

vermiculus commented 5 years ago

Thanks for the info -- I can take a look at this, but it may be a while. I would of course make time to review a PR if one came my way :-)