

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# 의 커밋에 대한 설명 AWS CodeCommit
<a name="how-to-commit-comment"></a>

CodeCommit 콘솔을 사용하여 리포지토리의 커밋에 대한 설명을 추가하고, 커밋에 대한 다른 사용자의 설명을 보거나 댓글을 작성할 수 있습니다. 이렇게 하면 다음 사항을 포함한 리포지토리 변경 내용에 대해 논의할 수 있습니다.
+ 변경을 수행한 이유
+ 추가 변경이 필요한지 여부
+ 변경 사항을 다른 브랜치에 병합해야 할지 여부

전체 커밋, 커밋 내 파일 또는 특정 행에 대한 설명을 추가하거나 파일 내에서 변경할 수 있습니다. 코드 행 하나를 선택한 다음 그에 따른 URL을 복사하여 해당 코드 행에 링크를 걸 수 있습니다.

**참고**  
최상의 결과를 위해, IAM 사용자로 로그인할 때 주석 달기 기능을 사용합니다. 주석 달기 기능은 루트 계정 자격 증명, 연동 액세스 권한 또는 임시 자격 증명으로 로그인하는 사용자에 맞게 최적화되지 않았습니다.

**Topics**
+ [리포지토리의 커밋에 대한 주석 보기](#how-to-commit-comment-view-console)
+ [리포지토리의 커밋에 대한 주석 추가 및 댓글 달기](#how-to-commit-comment-add-console)
+ [설명 보기, 추가, 업데이트, 답변 (AWS CLI)](#how-to-commit-comment-cli)

## 리포지토리의 커밋에 대한 주석 보기
<a name="how-to-commit-comment-view-console"></a>

CodeCommit 콘솔을 사용하여 커밋에 대한 주석을 볼 수 있습니다.

**커밋에 대한 설명 보기**

1. [https://console.aws.amazon.com/codesuite/codecommit/home](https://console.aws.amazon.com/codesuite/codecommit/home)에서 CodeCommit 콘솔을 엽니다.

1. **리포지토리**에서, 커밋에 대한 주석을 보고자 하는 리포지토리를 선택합니다.

1. 탐색 창에서 **커밋**을 선택합니다. 주석을 살펴볼 커밋의 커밋 ID를 선택합니다.

   해당 커밋의 페이지와 주석이 표시됩니다.

## 리포지토리의 커밋에 대한 주석 추가 및 댓글 달기
<a name="how-to-commit-comment-add-console"></a>

CodeCommit 콘솔을 사용하여 한 커밋과 상위 커밋의 비교 또는 지정한 두 커밋 간의 비교에 주석을 추가할 수 있습니다. 한 주석에 이모티콘이나 자신의 주석 또는 둘 다 사용하여 댓글을 달 수 있습니다.

### 커밋에 대한 주석 추가 및 댓글 달기 (콘솔)
<a name="how-to-commit-comment-add-cpage"></a>

텍스트나 이모티콘으로 커밋에 주석을 추가하거나 주석에 댓글을 달 수 있습니다. 주석과 이모티콘은 콘솔에 로그인하는 데 사용한 역할이나 IAM 사용자의 것으로 표시됩니다.

**커밋에 주석을 추가하고 주석에 댓글을 달려면**

1. [https://console.aws.amazon.com/codesuite/codecommit/home](https://console.aws.amazon.com/codesuite/codecommit/home)에서 CodeCommit 콘솔을 엽니다.

1. **리포지토리**에서, 커밋에 대한 주석을 작성하려는 리포지토리를 선택합니다.

1. 탐색 창에서 **커밋**을 선택합니다. 주석을 추가하거나 주석에 댓글을 달 커밋의 커밋 ID를 선택합니다.

   해당 커밋의 페이지와 주석이 표시됩니다.

1. 주석을 추가하려면 다음 중 하나를 수행합니다.
   + 일반 설명을 추가하려면 **변경 사항에 대한 주석**에 주석을 입력한 다음 **저장**을 선택합니다. [마크다운](https://en.wikipedia.org/wiki/Markdown)을 사용하거나, 일반 텍스트로 주석을 입력할 수 있습니다.  
![\[커밋의 변경 사항에 대한 일반적인 주석.\]](http://docs.aws.amazon.com/ko_kr/codecommit/latest/userguide/images/codecommit-commenting-changecomment.png)
   + 커밋의 파일에 주석을 추가하려면 해당 파일의 이름을 찾습니다. **파일에 대한 주석**을 선택하여 주석을 입력한 다음 **저장**을 선택합니다.  
![\[커밋의 파일에 대한 주석 추가.\]](http://docs.aws.amazon.com/ko_kr/codecommit/latest/userguide/images/codecommit-commenting-addfilecomment.png)
   + 커밋의 변경된 행에 주석을 추가하려면 변경 내용이 표시된 행으로 이동합니다. 주석 말풍선 ![\[The comment bubble icon that that indicates that you can leave a comment on that line of code.\]](http://docs.aws.amazon.com/ko_kr/codecommit/latest/userguide/images/codecommit-commentbubble.png)를 선택하여 주석을 입력한 다음 **저장**을 선택합니다.  
![\[커밋의 행에 대한 주석 추가.\]](http://docs.aws.amazon.com/ko_kr/codecommit/latest/userguide/images/codecommit-commenting-addlinecomment.png)
**참고**  
주석을 저장한 후 수정할 수 있습니다. 주석의 내용을 삭제할 수도 있습니다. 이 경우 내용이 삭제되었다는 메시지가 뜨며 주석은 유지됩니다. 주석을 저장하기 전에 **마크다운 미리 보기** 모드를 사용하여 주석을 확인하는 것이 좋습니다.

1. 커밋에 대한 설명에 답변하려면 **회신**을 선택합니다. 이모티콘으로 주석에 댓글을 달려면 목록에서 원하는 이모티콘을 선택합니다. 주석 하나당 이모티콘은 하나만 선택할 수 있습니다. 이모티콘 반응을 변경하려면 목록에서 다른 이모티콘을 선택하거나, 반응을 제거하기 위해 **없음**을 선택합니다.  
![\[주석에 댓글 및 이모티콘 반응 추가.\]](http://docs.aws.amazon.com/ko_kr/codecommit/latest/userguide/images/codecommit-commenting-commenttab.png)

### 두 커밋 지정자 비교 시 주석 추가 및 주석에 댓글 달기
<a name="how-to-commit-comment-console-compare"></a>

브랜치, 태그 또는 커밋 간 비교에 대한 주석을 추가할 수 있습니다.

**커밋 지정자 비교 시 주석을 추가하거나 주석에 대한 댓글을 남기려면**

1. [https://console.aws.amazon.com/codesuite/codecommit/home](https://console.aws.amazon.com/codesuite/codecommit/home)에서 CodeCommit 콘솔을 엽니다.

1. **리포지토리**에서, 커밋, 브랜치 또는 태그 지정된 커밋을 비교하려는 리포지토리를 선택합니다.

1. 탐색 창에서 **커밋**을 선택한 다음 **커밋 비교** 탭을 선택합니다.  
![\[임의의 두 커밋 지정자 비교\]](http://docs.aws.amazon.com/ko_kr/codecommit/latest/userguide/images/codecommit-compare-1.png)

1. **대상 주소** 및 **소스** 필드를 사용하여 두 커밋 지정자를 비교합니다. 드롭다운 목록을 사용하거나 커밋 ID를 붙여 넣습니다. **비교**를 선택합니다.  
![\[커밋 ID를 브랜치와 비교할 때의 샘플 결과\]](http://docs.aws.amazon.com/ko_kr/codecommit/latest/userguide/images/codecommit-compare-4.png)

1. 다음 중 한 개 이상을 수행할 수 있습니다.
   + 파일이나 행에 주석을 추가하려면 주석 말풍선을 선택합니다 ![\[The comment bubble icon that that indicates that you can leave a comment on that line of code.\]](http://docs.aws.amazon.com/ko_kr/codecommit/latest/userguide/images/codecommit-commentbubble.png).
   + 비교한 변경 사항에 대한 일반적인 주석을 추가하려면 **변경 사항에 대한 주석**으로 이동합니다.

## 설명 보기, 추가, 업데이트, 답변 (AWS CLI)
<a name="how-to-commit-comment-cli"></a>

다음 명령을 실행하여 주석을 보고, 추가하고, 답변을 달고, 주석 내용을 삭제할 수 있습니다.
+ 두 커밋 간 비교에 대한 주석을 보려면 **[get-comments-for-compared-commit](#how-to-commit-comment-cli-get-comments)**를 실행합니다.
+ 주석에 대한 세부 정보를 보려면 [**get-comment**](#how-to-commit-comment-cli-get-comment-info)를 실행합니다.
+ 작성한 주석의 내용을 삭제하려면 [**delete-comment-content**](#how-to-commit-comment-cli-commit-delete)를 실행합니다.
+ 두 커밋 간 비교에 대한 주석을 작성하려면 [**post-comment-for-compared-commit**](#how-to-commit-comment-cli-comment)을 실행합니다.
+ 주석을 업데이트하려면 [**update-comment**](#how-to-commit-comment-cli-commit-update)를 실행합니다.
+ 주석에 댓글을 달려면 [**post-comment-reply**](#how-to-commit-comment-cli-commit-reply)를 실행합니다.
+ 주석에 이모티콘으로 반응하려면 [**put-comment-reaction**](#how-to-commit-comment-cli-commit-reply-emoji)을 실행합니다.
+ 주석에 대한 이모티콘 반응을 보려면 [**get-comment-reactions**](#how-to-commit-comment-cli-commit-emoji-view)을 실행합니다.

### 커밋에 대한 설명 보기
<a name="how-to-commit-comment-cli-get-comments"></a>

1. 다음을 지정하여 **get-comments-for-compared-commit** 명령을 실행합니다.
   + CodeCommit 리포지토리의 이름(`--repository-name` 옵션 사용)
   + 비교 방향을 설정하기 위한 after 커밋의 전체 커밋 ID(`--after-commit-id option` 사용).
   + 비교 방향을 설정하기 위한 before 커밋의 전체 커밋 ID(`--before-commit-id` 옵션 사용).
   + (선택 사항) 다음 결과 세트를 반환하는 열거형 토큰(`--next-token` 옵션 사용).
   + (선택 사항) 반환된 결과의 수를 제한하는 음수가 아닌 정수(`--max-results` 옵션 사용).

   예를 들어 *MyDemoRepo*라는 리포지토리의 두 커밋 간의 비교에 대해 작성된 설명을 보려면 다음을 수행합니다.

   ```
   aws codecommit get-comments-for-compared-commit --repository-name MyDemoRepo --before-commit-id 6e147360EXAMPLE --after-commit-id 317f8570EXAMPLE
   ```

1. 이 명령이 제대로 실행되면 다음과 비슷하게 출력됩니다.

   ```
   {
      "commentsForComparedCommitData": [ 
         { 
            "afterBlobId": "1f330709EXAMPLE",
            "afterCommitId": "317f8570EXAMPLE",
            "beforeBlobId": "80906a4cEXAMPLE",
            "beforeCommitId": "6e147360EXAMPLE",
            "comments": [ 
               { 
                  "authorArn": "arn:aws:iam::111111111111:user/Li_Juan",
                  "clientRequestToken": "123Example",
                  "commentId": "ff30b348EXAMPLEb9aa670f",
                  "content": "Whoops - I meant to add this comment to the line, not the file, but I don't see how to delete it.",
                  "creationDate": 1508369768.142,
                  "deleted": false,
                  "CommentId": "123abc-EXAMPLE",
                  "lastModifiedDate": 1508369842.278,
                  "callerReactions": [],
                  "reactionCounts": 
                   {
                     "SMILE" : 6,
                     "THUMBSUP" : 1
                   }
               },
               {
                  "authorArn": "arn:aws:iam::111111111111:user/Li_Juan",
                  "clientRequestToken": "123Example",
                  "commentId": "553b509bEXAMPLE56198325",
                  "content": "Can you add a test case for this?",
                  "creationDate": 1508369612.240,
                  "deleted": false,
                  "commentId": "456def-EXAMPLE",
                  "lastModifiedDate": 1508369612.240,
                  "callerReactions": [],
                  "reactionCounts": 
                   {
                     "THUMBSUP" : 2
                   }
                }
            ],
            "location": { 
               "filePath": "cl_sample.js",
               "filePosition": 1232,
               "relativeFileVersion": "after"
            },
            "repositoryName": "MyDemoRepo"
         }
      ],
      "nextToken": "exampleToken"
   }
   ```

### 커밋의 주석에 대한 세부 정보를 보려면
<a name="how-to-commit-comment-cli-get-comment-info"></a>

1. 시스템에서 생성한 설명 ID를 지정하여 **get-comment** 명령을 실행합니다. 예제:

   ```
   aws codecommit get-comment --comment-id ff30b348EXAMPLEb9aa670f
   ```

1. 이 명령이 제대로 실행되면 다음과 비슷한 출력이 반환됩니다.

   ```
   {
      "comment": { 
         "authorArn": "arn:aws:iam::111111111111:user/Li_Juan",
         "clientRequestToken": "123Example",
         "commentId": "ff30b348EXAMPLEb9aa670f",
         "content": "Whoops - I meant to add this comment to the line, but I don't see how to delete it.",
         "creationDate": 1508369768.142,
         "deleted": false,
         "commentId": "",
         "lastModifiedDate": 1508369842.278,
         "callerReactions": [],
         "reactionCounts": 
            {
              "SMILE" : 6,
              "THUMBSUP" : 1
            }
      }
   }
   ```

### 커밋의 주석 내용을 삭제하려면
<a name="how-to-commit-comment-cli-commit-delete"></a>

1. 시스템에서 생성한 설명 ID를 지정하여 **delete-comment-content** 명령을 실행합니다. 예제:

   ```
   aws codecommit delete-comment-content --comment-id ff30b348EXAMPLEb9aa670f
   ```
**참고**  
AWSCodeCommitFullAccess 정책이 적용되었거나 `DeleteCommentContent` 권한이 **허용**으로 설정된 경우에만 주석의 내용을 삭제할 수 있습니다.

1. 이 명령이 제대로 실행되면 다음과 비슷하게 출력됩니다.

   ```
   {
      "comment": { 
         "creationDate": 1508369768.142,  
         "deleted": true,
         "lastModifiedDate": 1508369842.278,
         "clientRequestToken": "123Example",
         "commentId": "ff30b348EXAMPLEb9aa670f",
         "authorArn": "arn:aws:iam::111111111111:user/Li_Juan",
         "callerReactions": [],
         "reactionCounts": 
            {
              "CLAP" : 1
            }
      }
   }
   ```

### 커밋에 설명 작성
<a name="how-to-commit-comment-cli-comment"></a>

1. 다음을 지정하여 **post-comment-for-compared-commit** 명령을 실행합니다.
   + CodeCommit 리포지토리의 이름(`--repository-name` 옵션 사용)
   + 비교 방향을 설정하기 위한 after 커밋의 전체 커밋 ID(`--after-commit-id `옵션 사용).
   + 비교 방향을 설정하기 위한 before 커밋의 전체 커밋 ID(`--before-commit-id` 옵션 사용).
   + 클라이언트에서 생성된 고유한 멱등성 토큰(**--client-request-token** 옵션 사용).
   + 설명의 내용(**--content** 옵션 사용).
   + 다음을 비롯하여 주석을 추가할 위치에 대한 위치 정보 목록.
     + 확장자와 하위 디렉터리를 비롯하여 비교하려는 파일의 이름(**filePath** 속성 사용).
     + 비교한 파일 내 변경의 행 번호(**filePosition** 속성 사용).
     + 변경에 대한 주석이 소스와 대상 브랜치 간의 비교 전인지 후인지 여부(**relativeFileVersion** 속성 사용).

   예를 들어, *"Can you add a test case for this?"*라는 주석을 *MyDemoRepo*라는 리포지토리의 두 커밋을 비교하여 *cl\$1sample.js* 파일을 변경한 것에 대해 추가하려면, 다음과 같이 합니다.

   ```
   aws codecommit post-comment-for-compared-commit --repository-name MyDemoRepo --before-commit-id 317f8570EXAMPLE --after-commit-id 5d036259EXAMPLE --client-request-token 123Example --content "Can you add a test case for this?" --location filePath=cl_sample.js,filePosition=1232,relativeFileVersion=AFTER   
   ```

1. 이 명령이 제대로 실행되면 다음과 비슷하게 출력됩니다.

   ```
   { 
            "afterBlobId": "1f330709EXAMPLE",
            "afterCommitId": "317f8570EXAMPLE",
            "beforeBlobId": "80906a4cEXAMPLE",
            "beforeCommitId": "6e147360EXAMPLE",
            "comment": {
                  "authorArn": "arn:aws:iam::111111111111:user/Li_Juan",
                  "clientRequestToken": "",
                  "commentId": "553b509bEXAMPLE56198325",
                  "content": "Can you add a test case for this?",
                  "creationDate": 1508369612.203,
                  "deleted": false,
                  "commentId": "abc123-EXAMPLE",
                  "lastModifiedDate": 1508369612.203,
                  "callerReactions": [],
                  "reactionCounts": []
                },
                "location": { 
                  "filePath": "cl_sample.js",
                  "filePosition": 1232,
                  "relativeFileVersion": "AFTER"
                },
            "repositoryName": "MyDemoRepo"
    }
   ```

### 커밋에 대한 설명 업데이트
<a name="how-to-commit-comment-cli-commit-update"></a>

1. 시스템에서 생성한 주석 ID와 기존 내용을 교체하려는 내용을 지정하여 **update-comment** 명령을 실행합니다.

   예를 들어, *"Fixed as requested. I'll update the pull request."*라는 내용을 ID가 *442b498bEXAMPLE5756813*인 주석으로 추가하려면, 다음과 같이 합니다.

   ```
   aws codecommit update-comment --comment-id 442b498bEXAMPLE5756813 --content "Fixed as requested. I'll update the pull request."  
   ```

1. 이 명령이 제대로 실행되면 다음과 비슷하게 출력됩니다.

   ```
   { 
       "comment": {
           "authorArn": "arn:aws:iam::111111111111:user/Li_Juan",
           "clientRequestToken": "",
           "commentId": "442b498bEXAMPLE5756813",
           "content": "Fixed as requested. I'll update the pull request.",
           "creationDate": 1508369929.783,
           "deleted": false,
           "lastModifiedDate": 1508369929.287,
           "callerReactions": [],
           "reactionCounts": 
             {
               "THUMBSUP" : 2
             }
       }
    }
   ```

### 커밋에 대한 주석에 댓글을 달려면
<a name="how-to-commit-comment-cli-commit-reply"></a>

1. 풀 요청의 주석에 댓글을 게시하려면 다음을 지정하여 **post-comment-reply** 명령을 실행합니다.
   + 댓글을 달 주석의 시스템 생성 ID(**--in-reply-to** 옵션 사용).
   + 클라이언트에서 생성된 고유한 멱등성 토큰(**--client-request-token** 옵션 사용).
   + 댓글의 내용(**--content** 옵션 사용).

    예를 들어 *"Good catch. I'll remove them."*라는 댓글을 시스템 생성 ID가 *abcd1234EXAMPLEb5678efgh*인 주석에 달려면 다음과 같이 합니다.

   ```
   aws codecommit post-comment-reply --in-reply-to abcd1234EXAMPLEb5678efgh --content "Good catch. I'll remove them." --client-request-token 123Example
   ```

1. 이 명령이 제대로 실행되면 다음과 비슷하게 출력됩니다.

   ```
   { 
       "comment": {
           "authorArn": "arn:aws:iam::111111111111:user/Li_Juan",
           "clientRequestToken": "123Example",
           "commentId": "442b498bEXAMPLE5756813",
           "content": "Good catch. I'll remove them.",
           "creationDate": 1508369829.136,
           "deleted": false,
           "CommentId": "abcd1234EXAMPLEb5678efgh",
           "lastModifiedDate": 150836912.221,
           "callerReactions": [],
           "reactionCounts": []
       }
    }
   ```

### 커밋에 대한 주석에 이모티콘으로 댓글을 달려면
<a name="how-to-commit-comment-cli-commit-reply-emoji"></a>

1. 풀 요청의 주석에 이모티콘으로 댓글을 달거나 이모티콘 반응의 값을 변경하려면 다음과 같이 지정하여 **put-comment-reaction** 명령을 실행합니다.
   + 이모티콘으로 댓글을 달 주석의 시스템 생성 ID.
   + 추가 또는 업데이트하려는 반응의 값. 허용되는 값에는 지원되는 이모티콘, 단축 코드, 유니코드 값 등이 있습니다.<a name="emoji-reaction-table"></a>

   CodeCommit에서 이모티콘에 지원되는 값은 다음과 같습니다.  
****    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/codecommit/latest/userguide/how-to-commit-comment.html)

    예를 들어, 시스템 생성 ID가 *abcd1234EXAMPLEb5678efgh*인 주석에 이모티콘 *:thumbsup:*을 추가하려면 다음과 같이 합니다.

   ```
   aws codecommit put-comment-reaction --comment-id abcd1234EXAMPLEb5678efgh --reaction-value :thumbsup: 
   ```

1. 성공하면 이 명령은 출력을 생성하지 않습니다.

### 주석에 대한 이모티콘 반응을 보려면
<a name="how-to-commit-comment-cli-commit-emoji-view"></a>

1. 이모티콘으로 반응한 사용자를 포함하여 주석에 대한 이모티콘 반응을 보려면 주석의 시스템 생성 ID를 지정하여 **get-comment-reactions** 명령을 실행합니다.

    예를 들어, 시스템 생성 ID가 *abcd1234EXAMPLEb5678efgh*인 주석에 대한 이모티콘 반응을 보려면 다음과 같이 합니다.

   ```
   aws codecommit get-comment-reactions --comment-id abcd1234EXAMPLEb5678efgh 
   ```

1. 이 명령이 제대로 실행되면 다음과 비슷하게 출력됩니다.

   ```
   {
       "reactionsForComment": {
           [
              {
                   "reaction": {
                       "emoji:"👍",
                       "shortCode": "thumbsup",
                       "unicode": "U+1F44D"
                   },
                   "users": [
                       "arn:aws:iam::123456789012:user/Li_Juan",
                       "arn:aws:iam::123456789012:user/Mary_Major",
                       "arn:aws:iam::123456789012:user/Jorge_Souza"
                   ]
               },
               {
                   "reaction": {
                       "emoji": "👎",
                       "shortCode": "thumbsdown",
                       "unicode": "U+1F44E"
                   },
                   "users": [
                       "arn:aws:iam::123456789012:user/Nikhil_Jayashankar"
                   ]
               },
               {
                   "reaction": {
                       "emoji": "😕",
                       "shortCode": "confused",
                       "unicode": "U+1F615"
                   },
                   "users": [
                       "arn:aws:iam::123456789012:user/Saanvi_Sarkar"
                   ]
               }
           ]
       }
   }
   ```