Merging a Pull Request

After the pull request is reviewed and approved, it can be merged provided all the configured merge validations are met that are configured in the PR settings.

    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.
    4. Select a pull request that you want to merge and click the Merge button.
    5. If all the merge conditions aren't met, then a list of all merge issues to be resolved is displayed. Merge can't be completed without fixing the issues.
    6. If merge issues aren't there, then select one of the given merge strategies. The available merge strategies depend on how it's configured in the PR settings:
      1. Merge commit
      2. Fast-forward
      3. Fast-forward only
      4. Rebase and fast-forward
      5. Squash, fast-forward only
      6. Rebase and merge
        You can enter an optional commit message.
    7. Click the Merge button.
      If any merge conflicts exists, the details are displayed along with steps to resolve the conflict. If no conflicts, the PR is successfully merged to the destination branch.
  • To merge a pull request, use the MergePullRequest operation.

  • To merge a pull request, run the execute-merge-pull-request command:

    oci devops pull-request execute-merge-pull-request --commit-message --merge-strategy --pull-request-id

    To validate a merge pull request, run the validate-merge-pull-request command:

    oci devops pull-request validate-merge-pull-request --pull-request-id