---
metadata:
  - name: generator
    content: Diplodoc Platform v5.57.3
alternate:
  - https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/pr-create.md
  - https://sourcecraft.dev/portal/docs/ru/sourcecraft/operations/pr-create.md
  - href: en/sourcecraft/operations/pr-create.md
    type: text/markdown
    title: Markdown version
  - href: ../../llms.txt
    type: text/markdown
    title: llms.txt
title: How to create a pull request in a SourceCraft repository
description: Follow this guide to create a pull request in a SourceCraft repository.
---
> **Documentation Index:** Fetch the complete configuration index at https://sourcecraft.dev/portal/docs/en/llms.txt


# Creating a pull request in a SourceCraft repository

<!-- source: en/_includes/sourcecraft/pr-description.md -->
A _pull request_ is a request to merge changes from one branch into another, usually the project’s main branch. A pull request contains a description of changes, comparison of branches, a discussion for review, and may be integrated with [CI/CD processes](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/ci-cd.md). This makes it easier for teams to collaborate and allows you to review and approve updates based on the [defined rules](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/code-review.md) before they are added to the main project.
<!-- endsource: en/_includes/sourcecraft/pr-description.md -->

To create a [pull request](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/index.md#pr):
1. Open the SourceCraft [home page](https://sourcecraft.dev).
1. On the ![image](../../_assets/console-icons/house.svg) **Home** tab:
   * If you are working in a private repository, go to ![image](../../_assets/console-icons/archive.svg) **Repositories** under ![image](../../_assets/console-icons/layout-tabs.svg) **Your craftspace**.
   * If you are working in an organization repository:
      1. Open the ![image](../../_assets/console-icons/suitcase.svg) **Organizations** section and select the organization.
      1. In the ![image](../../_assets/console-icons/layout-tabs.svg) **Organization craftspace** section, navigate to ![image](../../_assets/console-icons/archive.svg) **Repositories**.
1. Select the repository to create a pull request in.
1. Under ![image](../../_assets/console-icons/code.svg) **Code** on the repository page, go to ![image](../../_assets/console-icons/code-pull-request.svg) **Pull requests**.
1. In the top-right corner, click **Create pull request**.
1. In the **source** and **target** lists, select the branches you want to merge.
1. Enter a name for your pull request.
1. Optionally, under **Description**, provide details of the changes you are introducing into the pull request.

    <!-- source: en/_includes/sourcecraft/issue-pr-comment-parsing.md -->
    Descriptions and comments to [issues](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/index.md#issues) and [pull requests](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/index.md#pr) support short links to other issues and pull requests. Such entries automatically convert into hyperlinks that display a summary preview card on hover. Use the following formats:
    * `!<pull_request_number>`: Pull request in the current repository.
    * `<repository_slug>!<pull_request_number>`: Pull request in a different repository of the current organization.
    * `<organization_slug>/<repository_slug>!<pull_request_number>`: Pull request in the specified organization and repository.
    * `#<issue_number>`: Issue in the current repository.
    * `<repository_slug>#<issue_number>`: Issue in the a different repository of the current organization.
    * `<organization_slug>/<repository_slug>#<issue_number>`: Issue in the specified organization and repository.
    <!-- endsource: en/_includes/sourcecraft/issue-pr-comment-parsing.md -->

    You can [use](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/generate-description.md) Code Assistant to generate a description; to do this, click ![image](../../_assets/console-icons/sparkles-fill.svg)</svg> **Generate with AI**.

    <!-- source: en/_includes/sourcecraft/ai-gen-desc-time.md -->
    Description generation may take a while.
    <!-- endsource: en/_includes/sourcecraft/ai-gen-desc-time.md -->

    <!-- source: en/_includes/sourcecraft/agents-md-tip.md -->
    {% note tip %}

    You can [set](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/generate-description.md#rules) the rules Code Assistant will follow to generate descriptions in the `AGENTS.md` file at the repository root.

    {% endnote %}
    <!-- endsource: en/_includes/sourcecraft/agents-md-tip.md -->

1. Optionally, view the changes:
    * The ![image](../../_assets/console-icons/file-code.svg) **Files changed** tab gives a list of modified files and the changes made to them in `.diff` format.

      To view the changes in _before/after_ format, click ![image](../../_assets/console-icons/layout-columns.svg).

      To view all files in the branch you want to pull changes from, click **Full tree**.

    * The ![image](../../_assets/console-icons/code-commit-horizontal.svg) **Commits** tab shows the commit history for the branch you want to pull changes from.
1. Optionally, under **Reviewers**, select the pull request reviewers.
1. Click **Publish pull request**.

    You can also save your pull request as a draft to complete it later instead of creating it right away. To do this, click **Save as draft**.

## Creating a pull request from a draft {#create-from-draft}

1. Open the SourceCraft [home page](https://sourcecraft.dev).
1. On the ![image](../../_assets/console-icons/house.svg) **Home** tab, under ![image](../../_assets/console-icons/layout-tabs.svg) **Your craftspace**, navigate to ![image](../../_assets/console-icons/archive.svg) **Repositories**.
1. Select the repository to create a pull request in.
1. Under ![image](../../_assets/console-icons/code.svg) **Code** on the repository page, go to ![image](../../_assets/console-icons/code-pull-request.svg) **Pull requests**.
1. In the search bar, select the filter by the `Draft` status.
1. Select the draft to create a pull request from.
1. Click **Publish pull request**.

#### Useful links {#see-also}

* [All guides on pull requests in SourceCraft](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/index.md#pr)
* [SourceCraft resource relationships](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/index.md)
