Skip to main content

문제 양식 구문

문제 양식에 대해 다양한 입력 유형, 유효성 검사, 기본 담당자, 기본 레이블을 정의할 수 있습니다.

참고: 이슈 양식은 현재 베타로 제공되며 변경될 수 있습니다.

문제 양식에 대한 YAML 구문 정보

YAML 양식 정의 파일을 리포지토리의 /.github/ISSUE_TEMPLATE 폴더에 추가하여 사용자 지정 문제 양식을 만들 수 있습니다. YAML을 처음 사용하며 자세히 알아보려는 경우 “Y분 안에 YAML 알아보기”를 참조하세요. 문제 양식에 대해 다양한 입력 유형, 유효성 검사, 기본 담당자, 기본 레이블을 정의할 수 있습니다.

참가자가 문제 양식을 작성하면 각 입력에 대한 응답이 Markdown으로 변환되고 문제 본문에 추가됩니다. 참가자는 문제 양식으로 만든 문제를 편집할 수 있으며 다른 사용자는 다른 메서드를 통해 생성된 문제와 같은 문제와 상호 작용할 수 있습니다.

문제 양식은 끌어오기 요청에 지원되지 않습니다. 협력자가 사용할 리포지토리에 끌어오기 요청 템플릿을 만들 수 있습니다. 자세한 내용은 "리포지토리에 대한 끌어오기 요청 템플릿 만들기"을 참조하세요.

이 예제 YAML 구성 파일은 여러 입력을 사용하여 버그를 보고하는 문제 양식을 정의합니다.

참고: required 필드 키는 공용 리포지토리에서만 지원됩니다. 프라이빗 및 내부 리포지토리에서 모든 필드는 선택 사항입니다.

YAML
name: Bug Report
description: File a bug report
title: "[Bug]: "
labels: ["bug", "triage"]
projects: ["octo-org/1", "octo-org/44"]
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)
      default: 0
    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

최상위 구문

모든 문제 양식 구성 파일은 name, description, body 키-값 쌍으로 시작해야 합니다.

YAML
name:
description:
body:

각 문제 양식에 대해 다음 최상위 키를 설정할 수 있습니다.

Key설명필수Type
name문제 양식 템플릿의 이름입니다. Markdown 템플릿을 비롯한 다른 모든 템플릿에서 고유해야 합니다.Required문자열
description템플릿 선택기 인터페이스에 표시되는 문제 양식 서식 파일에 대한 설명입니다.Required문자열
body양식의 입력 형식 정의입니다.Required배열
assignees이 템플릿으로 만든 문제에 자동으로 할당되는 사용자입니다.선택 사항배열 또는 쉼표로 구분된 문자열
labels이 템플릿으로 생성된 문제에 자동으로 추가될 레이블입니다. 리포지토리에 레이블이 아직 없으면 이슈에 자동으로 추가되지 않습니다.선택 사항배열 또는 쉼표로 구분된 문자열
title문제 제출 양식에 미리 채워지는 기본 제목입니다.선택 사항문자열
projects이 템플릿으로 생성된 이슈가 있는 프로젝트는 자동으로 추가됩니다. 이 키의 형식은 PROJECT-OWNER/PROJECT-NUMBER입니다.
참고: 문제를 여는 사용자에게 지정된 프로젝트에 대한 쓰기 권한이 있어야 합니다. 이 템플릿을 사용하는 사용자가 쓰기 액세스 권한을 갖지 않는 경우 프로젝트의 자동 추가 워크플로를 사용하도록 설정하는 것이 좋습니다. 자세한 내용은 "항목 자동 추가"를 참조하세요.
선택 사항배열 또는 쉼표로 구분된 문자열

사용 가능한 body 입력 형식 및 해당 구문은 "GitHub 양식 스키마 구문"을(를) 참조하세요.

Markdown 문제 템플릿을 YAML 문제 양식 서식 파일로 변환

리포지토리에서 Markdown 및 YAML 문제 템플릿을 모두 사용할 수 있습니다. Markdown 문제 템플릿을 YAML 문제 양식 서식 파일로 변환하려면 새 YAML 파일을 만들어 문제 양식을 정의해야 합니다. 기존 Markdown 문제 템플릿을 YAML 문제 양식으로 수동으로 변환할 수 있습니다. 자세한 내용은 "리포지토리에 대한 문제 템플릿 구성"을 참조하세요.

YAML 문제 양식에 동일한 파일 이름을 사용하려면 리포지토리에 새 파일을 커밋할 때 Markdown 문제 템플릿을 삭제해야 합니다.

Markdown 문제 템플릿 및 해당 YAML 문제 양식 서식 파일의 예는 다음과 같습니다.

Markdown 문제 템플릿

Markdown
---
name: 🐞 Bug
about: File a bug/issue
title: '[BUG] <title>'
labels: Bug, Needs Triage
assignees: ''

---

<!--
Note: Please search to see if an issue already exists for the bug you encountered.
-->

### Current Behavior:
<!-- A concise description of what you're experiencing. -->

### Expected Behavior:
<!-- A concise description of what you expected to happen. -->

### Steps To Reproduce:
<!--
Example: steps to reproduce the behavior:
1. In this environment...
1. With this config...
1. Run '...'
1. See error...
-->

### Environment:
<!--
Example:
- OS: Ubuntu 20.04
- Node: 13.14.0
- npm: 7.6.3
-->

### Anything else:
<!--
Links? References? Anything that will give us more context about the issue that you are encountering!
-->

YAML 문제 양식 템플릿

YAML
name: 🐞 Bug
description: File a bug/issue
title: "[BUG] <title>"
labels: ["Bug", "Needs Triage"]
body:
- type: checkboxes
  attributes:
    label: Is there an existing issue for this?
    description: Please search to see if an issue already exists for the bug you encountered.
    options:
    - label: I have searched the existing issues
      required: true
- type: textarea
  attributes:
    label: Current Behavior
    description: A concise description of what you're experiencing.
  validations:
    required: false
- type: textarea
  attributes:
    label: Expected Behavior
    description: A concise description of what you expected to happen.
  validations:
    required: false
- type: textarea
  attributes:
    label: Steps To Reproduce
    description: Steps to reproduce the behavior.
    placeholder: |
      1. In this environment...
      1. With this config...
      1. Run '...'
      1. See error...
  validations:
    required: false
- type: textarea
  attributes:
    label: Environment
    description: |
      examples:
        - **OS**: Ubuntu 20.04
        - **Node**: 13.14.0
        - **npm**: 7.6.3
    value: |
        - OS:
        - Node:
        - npm:
    render: markdown
  validations:
    required: false
- type: textarea
  attributes:
    label: Anything else?
    description: |
      Links? References? Anything that will give us more context about the issue you are encountering!

      Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
  validations:
    required: false

추가 참고 자료