跳到主要内容

Draft Pull Requests

Draft Pull Requests are Pull Requests that are in an unsubmitted state, which allows you to mark them as drafts when creating a Pull Request. This enables you to work on, edit, and discuss the Pull Request further after creation without immediately triggering automatic merging. This is particularly useful for collaborating with your team when the Pull Request is not yet fully ready or during initial work.

How to Create Draft Pull Requests


  1. Creating a draft Pull Request is similar to creating a regular Pull Request, except that on the creation page, you click "Add [WIP]" in the title to add the WIP marker. image-20241231180553988

Editing Drafts


Once the Draft Pull Request is successfully created, you can perform the following actions:

  1. Edit: Click on the Pull Request title to enter the editing mode for the title.

  2. Assignees and Reviewers: You can add assignees and reviewers to the Draft Pull Request.

image-20241231180903708

  1. Update Code: Based on team feedback, you can update the code in the branch, and the Draft Pull Request will automatically reflect these changes.

  2. If you want to remove the draft status, you can click "Ready for review." If you want to close the draft, simply click "Close."

image-20241231181642131

Through the Draft Pull Request feature, GitCode provides a more flexible way to collaborate, discuss, and manage the code merge process. This allows teams to better plan and control code changes while ensuring the quality and stability of the code.