/
GitLab Description Template

GitLab Description Template

참고 자료 : https://docs.gitlab.com/ee/user/project/description_templates.html

Issue 및 Merge Request에 대한 설명으로 사용할 템플릿을 정의할 수 있습니다.

이러한 템플릿은 프로젝트, 그룹 또는 인스턴스에서 정의할 수 있습니다. 프로젝트는 상위 수준에서 정의된 템플릿을 상속합니다.

이러한 템플릿을 사용할 수 있습니다 :

  • 기능 제안, 기능 개선 또는 버그 보고서 등 워크플로우의 여러 단계에 사용할 수 있습니다.

  • 특정 프로젝트의 모든 Issue 또는 Merge Request의 Description 항목의 레이아웃이 일관되도록 하기 위해.

  • 서비스 데스크 이메일 템플릿의 경우.

설명 템플릿이 작동하려면 다음과 같아야 합니다 :

  • .md 확장자로 저장되어 있어야 합니다.

  • 프로젝트 리포지토리의 .gitlab/issue_templates 또는 .gitlab/merge_request_templates 디렉터리에 저장되어 있어야 한다.

  • 기본 브랜치에 있어야 합니다.

Issue 템플릿 만들기

GitLab 저장소의 .gitlab/issue_templates/ 디렉터리에 새로운 Markdown(.md) 파일을 만듭니다.

Issue description 템플릿을 만드는 절차는 다음과 같습니다 :

  1. 상단 바에서 메인 Main menu > Projects를 선택하고 프로젝트를 찾습니다.

  2. 왼쪽 사이드바에서 Repository를 선택합니다.

  3. 기본 브랜치 옆에서 +를 선택합니다.

  4. New file을 선택합니다.

  5. 기본 브랜치 옆의 File name 텍스트 상자에 .gitlab/issue_templates/mytemplate.md를 입력합니다. 여기서 mytemplate는 이슈 템플릿의 이름입니다.

  6. 기본 브랜치에 커밋합니다.

제대로 작동하는지 확인하려면 새 Issue를 만들고 템플릿 선택 드롭다운 목록에서 설명 템플릿을 찾을 수 있는지 확인해야 합니다.

Merge Request 템플릿 만들기

이슈 템플릿과 마찬가지로 GitLab 저장소의 .gitlab/merge_request_templates/ 디렉토리에 새 마크다운(.md) 파일을 생성합니다. Issue 템플릿과 달리 병합 요청에는 커밋 메시지와 브랜치 이름의 내용에 따라 달라지는 추가 상속 규칙이 있습니다.

  1. 상단 바에서 메인 Main menu > Projects를 선택하고 프로젝트를 찾습니다.

  2. 왼쪽 사이드바에서 Repository를 선택합니다.

  3. 기본 브랜치 옆에서 +를 선택합니다.

  4. New file을 선택합니다.

  5. 기본 브랜치 옆의 File name 텍스트 상자에 .gitlab/merge_request_templates/mytemplate.md를 입력합니다. 여기서 mytemplate는 이슈 템플릿의 이름입니다.

  6. 기본 브랜치에 커밋합니다.

제대로 작동하는지 확인하려면 새 Merge Request를 만들고 템플릿 선택 드롭다운 목록에서 설명 템플릿을 찾을 수 있는지 확인해야 합니다.

Merge Request 템플릿에서 지원되는 변수

Variable

Description

Output example

Variable

Description

Output example

%{all_commits}

Messages from all commits in the merge request. Limited to 100 most recent commits. Skips commit bodies exceeding 100 KiB and merge commit messages.

  • Feature introduced

This commit implements feature
Changelog:added

  • Bug fixed

  • Documentation improved

This commit introduced better docs.

%{co_authored_by}

Names and emails of commit authors in a Co-authored-by Git commit trailer format. Limited to authors of 100 most recent commits in merge request.

Co-authored-by: Zane Doe <zdoe@example.com>
Co-authored-by: Blake Smith <bsmith@example.com>

%{first_commit}

Full message of the first commit in merge request diff.

Update README.md

%{first_multiline_commit}

Full message of the first commit that’s not a merge commit and has more than one line in message body. Merge request title if all commits aren’t multiline.

Update README.md

Improved project description in readme file.

%{source_branch}

The name of the branch being merged.

my-feature-branch

%{target_branch}

The name of the branch that the changes are applied to.

main

 

Related content

GitLab Label 관리
GitLab Label 관리
More like this
GitLab Issue Board 최적화
GitLab Issue Board 최적화
More like this
GitLab의 Issue 생성
GitLab의 Issue 생성
Read with this
스마트 값 - 일반
스마트 값 - 일반
More like this
GitLab Issue를 Epic으로 Promote
GitLab Issue를 Epic으로 Promote
Read with this
GitLab 이슈 생성
GitLab 이슈 생성
More like this