풀 요청 업데이트 - AWS CodeCommit

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

풀 요청 업데이트

풀 요청 업데이트는 공개 풀 요청의 소스 브랜치에 커밋을 푸시하여 추가 코드를 변경하는 것으로 수행할 수 있습니다. 자세한 내용은 에서 커밋 만들기 AWS CodeCommit 단원을 참조하세요.

AWS CodeCommit 콘솔 또는 AWS CLI를 사용하여 풀 요청의 제목이나 설명을 업데이트할 수 있습니다. 다음과 같은 경우에는 풀 요청의 제목이나 설명을 업데이트 하는 것이 좋을 수도 있습니다.

  • 다른 사용자가 설명을 이해하지 못하거나 원래 제목이 오해의 소지가 있을 경우.

  • 보류 중인 풀 요청의 소스 브랜치에 대한 변경 사항을 제목이나 설명에 반영하려는 경우.

풀 요청 업데이트 (콘솔)

CodeCommit 콘솔을 사용하여 CodeCommit 리포지토리에서 풀 요청의 제목 및 설명을 업데이트할 수 있습니다. 풀 요청에서 코드를 업데이트하려면 공개 풀 요청의 소스 브랜치에 커밋을 푸시합니다.

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

  2. 리포지토리에서, 풀 요청을 업데이트하려는 리포지토리의 이름을 선택합니다.

  3. 탐색 창에서 풀 요청을 선택합니다.

  4. 기본적으로 모든 미해결 풀 요청 목록이 표시됩니다. 업데이트하려는 진행 중 풀 요청을 선택합니다.

  5. 풀 요청에서 세부 정보를 선택한 다음 세부 정보 편집을 선택하여 제목 또는 설명을 편집합니다.

    참고

    닫히거나 병합된 풀 요청의 제목 또는 설명은 업데이트할 수 없습니다.

풀 요청 업데이트 (AWS CLI)

CodeCommit에서 AWS CLI 명령을 사용하려면 AWS CLI를 설치합니다. 자세한 내용은 명령줄 참조 단원을 참조하세요.

다음 명령도 사용할 수 있습니다.

AWS CLI를 사용하여 CodeCommit 리포지토리의 풀 요청을 업데이트하려면

  1. 리포지토리에서 풀 요청의 제목을 업데이트하려면 다음을 지정하여 update-pull-request-title 명령을 실행합니다.

    • 풀 요청의 ID(--pull-request-id 옵션 사용).

    • 풀 요청의 이름(--title 옵션 사용).

    예를 들어 ID가 47인 풀 요청의 제목을 업데이트하려면:

    aws codecommit update-pull-request-title --pull-request-id 47 --title "Consolidation of global variables - updated review"

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

    { "pullRequest": { "approvalRules": [ { "approvalRuleContent": "{\"Version\": \"2018-11-08\",\"DestinationReferences\": [\"refs/heads/main\"],\"Statements\": [{\"Type\": \"Approvers\",\"NumberOfApprovalsNeeded\": 2,\"ApprovalPoolMembers\": [\"arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*\"]}]}", "approvalRuleId": "dd8b17fe-EXAMPLE", "approvalRuleName": "2-approver-rule-for-main", "creationDate": 1571356106.936, "lastModifiedDate": 571356106.936, "lastModifiedUser": "arn:aws:iam::123456789012:user/Mary_Major", "originApprovalRuleTemplate": { "approvalRuleTemplateId": "dd8b26gr-EXAMPLE", "approvalRuleTemplateName": "2-approver-rule-for-main" }, "ruleContentSha256": "4711b576EXAMPLE" } ], "authorArn": "arn:aws:iam::123456789012:user/Li_Juan", "clientRequestToken": "", "creationDate": 1508530823.12, "description": "Review the latest changes and updates to the global variables. I have updated this request with some changes, including removing some unused variables.", "lastActivityDate": 1508372657.188, "pullRequestId": "47", "pullRequestStatus": "OPEN", "pullRequestTargets": [ { "destinationCommit": "9f31c968EXAMPLE", "destinationReference": "refs/heads/main", "mergeMetadata": { "isMerged": false, }, "repositoryName": "MyDemoRepo", "sourceCommit": "99132ab0EXAMPLE", "sourceReference": "refs/heads/variables-branch" } ], "title": "Consolidation of global variables - updated review" } }
  2. 풀 요청의 설명을 업데이트하려면 다음을 지정하여 update-pull-request-description 명령을 실행합니다.

    • 풀 요청의 ID(--pull-request-id 옵션 사용).

    • 설명(--description 옵션 사용).

    예를 들어 ID가 47인 풀 요청의 설명을 업데이트하려면 다음과 같이 합니다.

    aws codecommit update-pull-request-description --pull-request-id 47 --description "Updated the pull request to remove unused global variable."

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

    { "pullRequest": { "authorArn": "arn:aws:iam::111111111111:user/Li_Juan", "clientRequestToken": "", "creationDate": 1508530823.155, "description": "Updated the pull request to remove unused global variable.", "lastActivityDate": 1508372423.204, "pullRequestId": "47", "pullRequestStatus": "OPEN", "pullRequestTargets": [ { "destinationCommit": "9f31c968EXAMPLE", "destinationReference": "refs/heads/main", "mergeMetadata": { "isMerged": false, }, "repositoryName": "MyDemoRepo", "sourceCommit": "99132ab0EXAMPLE", "sourceReference": "refs/heads/variables-branch" } ], "title": "Consolidation of global variables" } }