Viewing Pull Request Details

You can view, add, edit, and delete review comments to the PR.

    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 that has pull requests.
    4. Click Pull Requests from the left-side menu of the repository details page.
    5. Click a pull request.
    6. Under Resources, you can select the following options:
      • Activity: Displays all the activities associated with the pull request that includes, approvals, commits, comments, lifecycle, and reviewers. By default, all the activities are displayed. You can filter to view only specific activity in the activity list. In the comment, you can tag users to send them PR event notifications. Also, attachments such as images can be added with the comment.
      • Differences: A summary of the updates is displayed. Differences in the committed files between the source and destination branches are highlighted. You can view the changes inline or side-by-side. Users and reviewers can collaborate on the PR by adding comments and responding to comments in the appropriate files.
      • Commits: Displays a list of all the commits associated with the branch along with commit name, author, commit date, and commit Id. Each commit can be clicked to access the committed file details. You can search commits based on the commit name. A filter is available to sort the commits based on author, start date or end date.
      • Pipelines: In the OCI DevOps, a build run can be automatically triggered when you commit the changes to a code repository. You can view the status of the build run under the pull request. Any new commits to the source branch cancels the previous build run.
      • Attachments: Displays attachments added to the pull request. You have option to add or delete attachments to the PR.
    7. To configure notification settings, click the Notifications tab.

      You can opt to receive or ignore notifications for the pull requests. Notifications are sent as emails. You can unsubscribe anytime using the link given in the email to stop receiving email notifications. Supported PR event notifications are:

      • Pull request: create, update, merge, decline, reopen, and delete
      • Reviewer: add, remove, approve PR
      • Commit: to source branch
      • Comment: add, reply, delete, edit
    8. Select one of the following notification options:
      • Watch: By default, this option is selected, and notification is sent for all the events.
      • Mention: Only when the user is mentioned, for example in the PR comment, notification is sent.
      • Ignore: Notifications aren't sent for any events.
      Note

      Users need to have at least read access to the PR to change notification preferences. PR authors receive all the event notifications by default. PR reviewers are notified based on their notification preference. Notifications can be set for DevOps project and code repository. However, notification for the pull request takes precedence over the setting for project and repository. For more information, see Overview of Notifications.

    9. Click Save.
  • To decline a pull request, run the decline command:

    oci devops pull-request decline --pull-request-id

    To list pull requests, run the list-pull-requests command:

    oci devops pull-request list-pull-requests --compartment-id --created-by --destination-branch --display-name --pull-request-id --limit --page --page-size --repository-id--reviewer-principal-id --sort-by --sort-order --source-repository-id

    To unsubscribe pull request, run the unsubscribe command:

    oci devops pull-request unsubscribe --file --pull-request-id --token

    To view the changes, run the get-pull-request-change-summary-metrics command:

    oci devops pull-request get-pull-request-change-summary-metrics --pull-request-id

    To list pull request activities, run the list-pull-request-activities command:

    oci devops pull-request list-pull-request-activities --pull-request-id --activity-type --limit --page --page-size --sort-order

    To list pull request file changes, run the list-pull-request-file-changes command:

    oci devops pull-request list-pull-request-file-changes --pull-request-id --limit --page --page-size

    To create pull request attachment, run the create-pull-request-attachment command:

    oci devops pull-request create-pull-request-attachment --content-disposition --create-pull-request-attachment-body --pull-request-id

    To delete pull request attachment, run the delete-pull-request-attachment command:

    oci devops pull-request delete-pull-request-attachment --attachment-id --pull-request-id

    To get pull request attachment, run the get-pull-request-attachment command:

    oci devops pull-request get-pull-request-attachment --attachment-id --pull-request-id

    To get pull request attachment content, run the get-pull-request-attachment-content command:

    To list pull request attachment, run the list-pull-request-attachments command:

    oci devops pull-request list-pull-request-attachments --pull-request-id --compartment-id --limit --page --page-size --sort-by --sort-order

    To get pull request notification preference for user, run the get-pull-request-notification-preference command:

    oci devops pull-request get-pull-request-notification-preference --principal-id --pull-request-id

    To update pull request notification preference for an user, run the update-pull-request-notification-preference command:

    oci devops pull-request update-pull-request-notification-preference --notification-preference --principal-id --pull-request-id

    To create pull request comment, run the create-pull-request-comment command:

    oci devops pull-request-comment create-pull-request-comment -data --pull-request-id --commit-id --file-path --file-type --line-number --parent-id

    To delete pull request comment, run the delete-pull-request-comment command:

    oci devops pull-request-comment delete-pull-request-comment --comment-id --pull-request-id

    To edit pull request comment, run the update-pull-request-comment command:

    oci devops pull-request-comment update-pull-request-comment --comment-id --pull-request-id --data
  • To get a list of pull request activities, use the ListPullRequestActivities operation.

    To get a list of pull request GIT commits, use the ListPullRequestCommits operation.

    To retrieve the summary metric of the pull request differences, use the GetPullRequestChangeSummaryMetrics operation.

    To get a list of pull request attachments, use the ListPullRequestAttachments operation.

    To create pull request attachment, use the CreatePullRequestAttachment operation.

    To get a list of pull request comments, use the ListPullRequestComments operation.

    To create pull request comment use the CreatePullRequestComment operation.