magithub icon indicating copy to clipboard operation
magithub copied to clipboard

Support reading .github/ISSUE_TEMPLATE as a folder

Open junjizhi opened this issue 6 years ago • 3 comments

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)

junjizhi avatar Nov 15 '18 23:11 junjizhi

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

vermiculus avatar Nov 16 '18 13:11 vermiculus

@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,

junjizhi avatar Nov 16 '18 14:11 junjizhi

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 :-)

vermiculus avatar Nov 16 '18 18:11 vermiculus