• Log inFree account

Manage pull requests in CodeStream

For most development teams, the final step in the development process is a pull request. Even if your team has decided to use New Relic CodeStream's feedback requests as a replacement for, and not just a precursor to, your end-of-cycle PR-based code reviews, CodeStream allows you to keep all of that workflow inside your IDE. The Pull Requests section of the CodeStream pane lists all open pull requests that are relevant to you, and gives you the ability to control the list via custom queries.


Pull request creation is available for GitHub, GitHub Enterprise, GitLab, GitLab Self-Managed, Bitbucket, and Bitbucket Server. Pull request review is only available in GitHub, GitHub Enterprise, GitLab, and GitLab Self-Managed.

A screenshot showing the pull request section

The pull request section seperates PRs by those waiting for review, those assigned to you, those created by you, and the most recent PRs.

By default, you'll see your pull requests broken out into the following sections, which are really just default queries:

  • Waiting on My Review: Open pull requests where you are a reviewer, or a requested reviewer.
  • Assigned to Me: Open pull requests assigned to you.
  • Created by Me: Open pull requests created by you.
  • Recent: The five most recent pull requests created by you, regardless of status.

Click on any pull request in the list to edit, review or even merge the code. When you hover over a pull request's row you'll see more details, including the repo, branches and status. You'll also see an option to view the pull request on your code-hosting service toward the end of the row.

Hover over any section's heading for options to refresh the list, edit the section's query, or to delete the section.

A screenshot showing the header icons

The first section allows you to load any pull request via URL. Just grab the URL of any pull request, paste it in, and you can view it right inside CodeStream.

A screenshot showing how to open a PR through a url

When you hover over the Pull Requests section heading, icons appear at the right.

A screenshot showing the pull request section heading icons

Options include:

  • Refresh all the sections (or queries) at once.
  • Create a new pull request.
  • Create a new section based on a custom query. Note that there are some special guidelines when creating a custom query for GitHub and GitHub Enterprise or for GitLab and GitLab Self-Managed.
  • Click on the gear icon for more options, including the ability to see pull requests from all repositories, and not just those associated with repositories open in your IDE, and the ability to include labels in the list.

Perks of reviewing using CodeStream

CodeStream does improve upon the GitHub and GitLab experience in a couple of important ways. On GitHub and GitLab you can only view the changes as a series of diff hunks. CodeStream provides that view as well, but if you'd prefer to see the changes in the context of the full file you can use either list view or tree view. Select the code you want to comment on and then click the Comment button, or select Comment from the context menu. When commenting, you can either add a single comment or start a review.

A screenshot showing how to comment in a PR

With CodeStream, you can comment on lines of code that haven't changed. You can select any lines of code in the diff and not just those that are part of the changeset. These comments are added as a single comment to the pull request and aren't part of any review you may have in progress.

Create a pull request

To open a pull request at any time, click the + button at the top of the CodeStream pane or the + button in the header of the Pull Requests section. You can also use a keyboard shortcut (ctlr+shift+/ p, ctrl+/ p on a Mac, and m if you're a GitLab user). CodeStream provides you with tree view, list view, and diff view options for reviewing your changes before opening the pull request.

A screenshot showing how to open a pull request

With a single click you can name the pull request based on the last commit message, the branch name, or, if you started work by selecting a ticket, the ticket title. If you have a ticket selected, you can also explicitly tie the ticket to the pull request; CodeStream will include a link to the ticket in the pull request's description. Before submitting the pull request, review your changes by clicking on any of the files listed below the form.

If the feature branch you're working on doesn't have a remote-tracking branch, when you create a pull request, you can set your remote-tracking branch.

See also the following options to create pull requests:

GitHub custom queries

By default, GitHub's search API does a global search across all of GitHub. As a result, you'll need to make sure that your query includes at least one of the following qualifiers to make sure that the result set is appropriately limited.

  • user:USERNAME
  • org:ORGNAME
  • author:USERNAME
  • assignee:USERNAME
  • mentions:USERNAME
  • commenter:USERNAME
  • involves:USERNAME
  • reviewed-by:USERNAME
  • review-requested:USERNAME
  • team-review-requested:TEAMNAME
  • project:PROJECT_BOARD

More details about GitHub's search syntax can be found here.

GitLab custom queries

All searches are done using attribute=value format with an & between each parameter. For parameters with a space in them, leave them as-is and do not put quotes in the parameter (for example, labels=foo,help wanted). You can use @me to specify your user id and user name otherwise they can be found on GitLab. All filters, by default, have parameter scope=all (see Minimum Qualifiers). To overwrite this, use scope=X. See the examples given below.

Search syntax is derived from GitLab's custom search API. Refer to GitLab's documentation for more details on merge request searches or issue searches.

Review a pull request


Pull request review is currently not available for Bitbucket.

Regardless of where the pull request was created, you can edit, review, and even merge it from within CodeStream. If you know how to work with pull requests on GitHub or GitLab, you'll know how to do it in CodeStream as well.

To review a pull request:

  1. Check the details:
  • You can edit a GitHub pull request's details, such as reviewers, assignees and labels.
  • For a GitLab merge request, you can use edit mode (via the dropdown at the top of the page) or use the sidebar. By default, you can only add a single reviewer and a single assignee to a GitLab merge request. If your organization supports multiple reviewers and assignees, click the gear menu in the heading of the Merge Requests section of the CodeStream pane to enable this.
A screenshot showing how to assign multiple users to PR
  1. Review the conversation and add comments with the ability to @mention your collaborators.
A screenshot showing a conversation in a request
  1. View the changes, add comments, and submit a review.
Copyright © 2022 New Relic Inc.