Creating a Pull Request

Create pull request to trigger a build run to deploy the code changes.

Each service in Oracle Cloud Infrastructure (OCI) integrates with Identity and Access Management (IAM) for authentication and authorization. To grant users permission to access the DevOps code repositories and other resources, you must create dynamic groups and IAM policies.

For creating dynamic groups and policies for code repositories, see Code Repository Policies. For more details, see DevOps IAM Policies.

Before creating a pull request, you need to clone the required code repository or fork the repository to create a copy, make updates and commit the changes.

For accessing DevOps using the Oracle Cloud Console, REST API, and CLI, see Accessing DevOps.

    1. Open the navigation menu and click Developer Services. Under DevOps, click Projects.
    2. Select a project and from the left-side menu, click Code Repositories.
    3. Select a code repository and click the Pull Requests link on the left-side menu.
      Note

      Pull request is applicable only for hosted and forked repositories.
    4. Click the Create pull request button.
    5. Enter a unique name for the pull request.
    6. Select a source branch and a destination branch. You can also enter the commit Id for both.
      Note

      You can't create a duplicate PR if already a PR exists between the selected source and destination branches.
    7. If you selected a forked repository to create the PR, then select a destination repository and the associated destination branch.
    8. Add reviewers to approve the pull request.
    9. To add tags to the repository, click Show tagging options.

      Tagging is a metadata system that lets you organize and track the resources in the tenancy.

      If you have permissions to create a resource, you also have permissions to add free-form tags to it.

      To add a defined tag, you must have permissions to use the tag namespace.

      For more information, see Resource Tags.

    10. Click Create pull request and add description button.
    11. Enter a description for the pull request. You can attach any related files to the PR such as screenshots. Files can be added from the local system or you can select files stored in the Object Storage.
    12. Click the Finish creating pull request button.

    The pull request is successfully created, displaying the PR details such as source branch name, commit history with user name, merge validations if configured, and any associated build pipeline that's set to run when triggered by a commit. See Viewing Pull Request Details.

  • To create a pull request, run the create command:

    oci devops pull-request create  --display-name --repository-id --source-branch --description --destination-branch --reviewers --source-repository-id
  • To create a pull request, use the CreatePullRequest operation.