Discourse에는 현재 Composer를 미리 채워주는 Category Template(카테고리 템플릿) 기능이 있습니다. 유용한 기능이지만, 이보다 한 단계 나아간 기능이라면 GitHub Issues에 존재하는 YAML 정의처럼 커스텀 필드를 가진 사용자 정의 New Topic(새 주제) 양식을 만들 수 있는 기능이 될 수 있습니다.
즉, 다음과 같은 형태입니다…
name: Bug Report
description: File a bug report
title: "[Bug]: "
labels: ["bug", "triage"]
assignees:
- octocat
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: input
id: contact
attributes:
label: Contact Details
description: How can we get in touch with you if we need more info?
placeholder: ex. email@example.com
validations:
required: false
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: Tell us what you see!
value: "A bug happened!"
validations:
required: true
- type: dropdown
id: version
attributes:
label: Version
description: What version of our software are you running?
options:
- 1.0.2 (Default)
- 1.0.3 (Edge)
validations:
required: true
- type: dropdown
id: browsers
attributes:
label: What browsers are you seeing the problem on?
multiple: true
options:
- Firefox
- Chrome
- Safari
- Microsoft Edge
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://example.com)
options:
- label: I agree to follow this project's Code of Conduct
required: true
이것은 다음과 같은 것으로 변환됩니다…
참고로, 단일 필드 유형(예: textarea)만 지원하는 훨씬 기본적인 버전이라도, 현재 Category Templates보다 훨씬 좋은 개선이 될 것입니다!
