For most development teams, the final step in the development process is a pull request and CodeStream allows you to keep that workflow inside your IDE. The Pull Requests section of the CodeStream pane lists all open pull requests that are relevant to you.
Important
Pull request creation is available for GitHub, GitHub Enterprise, GitLab, GitLab Self-Managed, Bitbucket, and Bitbucket Server. Pull request review is only available for GitHub, GitHub Enterprise, GitLab, and GitLab Self-Managed.
The pull request section seperates PRs by those waiting for review, those assigned to you, those created by you, and the most recent PRs.
Click on any pull request in the list to edit, review or even merge the code. You’ll see the pull request get expanded in a tree view that provides access to the pull request’s details, as well as all of the files that were changed. The things that you do most frequently… adding and viewing comments… are easily accessible. Just click on any file to open the diff and start reviewing the changes.
You can use your IDE’s built-in diff navigation to move between the changes in a file. Select a block of code to add a comment. Note that CodeStream allows you to comment on lines of code that aren't part of the changeset. These comments are added as a single comment ("comment now" in GitLab's vernacular) to the pull request and aren't part of any review you may have in progress.
In VS Code, you’ll see a comment button appear over in the CodeStream pane.
In a JetBrains IDE you’ll see a comment button appear in the diff gutter, and clicking it will allow you to comment right in the editor.
As you add comments they’ll appear nested under the appropriate file in the tree view, making it easy for you, and the pull request’s author, to get at them.
Clicking on a comment will open the discussion and scroll you to the corresponding block of code in the diff.
Need to make a requested change? Just click “Open Local File” to go straight to where you need to do your work. Or click “Show Comment in Diff” just to its left to jump to the location for any other comments in the current file.
As you work your way through the files in the pull request, click the circle to mark a file as viewed. And when you're done, click the green Review button to submit the review.
Click the PR Details entry in the tree to manage the pull request. You’ll see an interface just like what you’re used to seeing on GitHub (as depicted below) or on GitLab, so the mechanisms for changing a pull requests reviewers, assignees, and labels should be very familiar.
Managing the list of pull requests
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.
When you hover over a pull request's row you'll see options to view the pull request on your code-hosting service, copy the pull request's URL, checkout the branch, and refresh the pull request to make sure what you're looking at is up to date.
Hover over any section's heading for options to refresh the list pull requests in that section, edit the section's query, or to delete the section.
If you want to view, or review, a pull request that isn't in your list just grab the URL and then click on the Load PR from URL section.Paste in the URL and you can view the pull request right inside CodeStream.
When you hover over the Pull Requests section heading, icons appear at the right.
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. If your GitLab organization supports multiple reviewers and assignees, there's also an option to enable this.
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.
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:
CodeStream automatically detects when you're working on a fork and allows you to set both the base and head repositories.
You can also create a pull request from within a CodeStream feedback request. Once the feedback request has been approved, you'll see an option to open a pull request at the top. Before you can create a pull request, make sure you've committed and pushed any changes included in your feedback request.
When you create a pull request from a feedback request, CodeStream connects the dots between the two by adding a link to the pull request in the feedback request.
Add a link to the feedback request, along with information about who did the review and when, in the description of the pull request.
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
repo:USERNAME/REPOSITORY
author:USERNAME
assignee:USERNAME
mentions:USERNAME
team:ORGNAME/TEAMNAME
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.
Return all issues or just those that are opened or closed
order_by
string
Return requests ordered by created_at or updated_at fields. Default is created_at.
sort
string
Return requests sorted in asc or desc order. Default is desc.
milestone
string
Return merge requests for a specific milestone. None returns merge requests with no milestone. Any returns merge requests that have an assigned milestone.
view
string
If simple, returns the iid, URL, title, description, and basic state of merge request.
labels
string
Return merge requests matching a comma separated list of labels. None lists all merge requests with no labels. Any lists all merge requests with at least one label. No+Label (Deprecated) lists all merge requests with no labels. Predefined names are case-insensitive.
with_labels_details
boolean
If true, response returns more details for each label in labels field: :name, :color, :description, :description_html, :text_color. Default is false.
with_merge_status_recheck
boolean
If true, this projection requests (but does not guarantee) that the merge_status field be recalculated asynchronously. Default is false.
created_after
datetime
Return merge requests created on or after the given time. Expected in ISO 8601 format (2019-03-15T08:00:00Z)
created_before
datetime
Return merge requests created on or before the given time. Expected in ISO 8601 format (2019-03-15T08:00:00Z)
updated_after
datetime
Return merge requests updated on or after the given time. Expected in ISO 8601 format (2019-03-15T08:00:00Z)
updated_before
datetime
Return merge requests updated on or before the given time. Expected in ISO 8601 format (2019-03-15T08:00:00Z)
scope
string
Return merge requests for the given scope: created_by_me, assigned_to_me or all. Defaults to created_by_me
author_id
integer
Returns merge requests created by the given user id. Mutually exclusive with author_username. Combine with scope=all or scope=assigned_to_me.
author_username
string
Returns merge requests created by the given username. Mutually exclusive with author_id.
assignee_id
integer
Returns merge requests assigned to the given user id. None returns unassigned merge requests. Any returns merge requests with an assignee.
reviewer_id
integer
Returns merge requests which have the user as a reviewer with the given user id. None returns merge requests with no reviewers. Any returns merge requests with any reviewer. Mutually exclusive with reviewer_username.
reviewer_username
string
Returns merge requests which have the user as a reviewer with the given username. None returns merge requests with no reviewers. Any returns merge requests with any reviewer. Mutually exclusive with reviewer_id.
my_reaction_emoji
string
Return merge requests reacted by the authenticated user by the given emoji. None returns issues not given a reaction. Any returns issues given at least one reaction.
source_branch
string
Return merge requests with the given source branch.
target_branch
string
Return merge requests with the given target branch.
search
string
Search merge requests against their title and description.
in
string
Modify the scope of the search attribute. title, description, or a string joining them with comma. Default is title,description.
wip
string
Filter merge requests against their wip status. yes to return only draft merge requests, no to return non-draft merge requests.
not
hash
Return merge requests that do not match the parameters supplied. Accepts: labels, milestone, author_id, author_username, assignee_id, assignee_username, reviewer_id, reviewer_username, my_reaction_emoji. See example above for how to format not as a hash type.
environment
string
Returns merge requests deployed to the given environment. Expected in ISO 8601 format (2019-03-15T08:00:00Z)
deployed_before
datetime
Return merge requests deployed before the given date/time. Expected in ISO 8601 format (2019-03-15T08:00:00Z)
deployed_after
datetime
Return merge requests deployed after the given date/time. Expected in ISO 8601 format (2019-03-15T08:00:00Z)
Return issues assigned to the given user id. Mutually exclusive with assignee_username. None returns unassigned issues. Any returns issues with an assignee.
assignee_username
string array
Return issues assigned to the given username. Similar to assignee_id and mutually exclusive with assignee_id. In GitLab CE, the assignee_username array should only contain a single value. Otherwise, an invalid parameter error is returned.
author_id
integer
Return issues created by the given user id. Mutually exclusive with author_username. Combine with scope=all or scope=assigned_to_me.
author_username
string
Return issues created by the given username. Similar to author_id and mutually exclusive with author_id.
confidential
boolean
Filter confidential or public issues.
created_after
datetime
Return issues created on or after the given time. Expected in ISO 8601 format (2019-03-15T08:00:00Z)
created_before
datetime
Return issues created on or before the given time. Expected in ISO 8601 format (2019-03-15T08:00:00Z)
due_date
string
Return issues that have no due date, are overdue, or whose due date is this week, this month, or between two weeks ago and next month. Accepts: 0 (no due date), overdue, week, month, next_month_and_previous_two_weeks.
iids[]
integer array
Return only the issues having the given iid
in
string
Modify the scope of the search attribute. title, description, or a string joining them with comma. Default is title,description
issue_type
string
Filter to a given type of issue. One of issue, incident, or test_case.
iteration_id
integer
Return issues assigned to the given iteration ID. None returns issues that do not belong to an iteration. Any returns issues that belong to an iteration. Mutually exclusive with iteration_title.
iteration_title
string
Return issues assigned to the iteration with the given title. Similar to iteration_id and mutually exclusive with iteration_id.
labels
string
Comma-separated list of label names, issues must have all labels to be returned. None lists all issues with no labels. Any lists all issues with at least one label. Predefined names are case-insensitive.
milestone
string
The milestone title. None lists all issues with no milestone. Any lists all issues that have an assigned milestone.
my_reaction_emoji
string
Return issues reacted by the authenticated user by the given emoji. None returns issues not given a reaction. Any returns issues given at least one reaction.
non_archived
boolean
Return issues only from non-archived projects. If false, the response returns issues from both archived and non-archived projects. Default is true.
not
Hash
Return issues that do not match the parameters supplied. Accepts: assignee_id, assignee_username, author_id, author_username, iids, iteration_id, iteration_title, labels, milestone, and weight.
order_by
string
Return issues ordered by created_at, updated_at, priority, due_date, relative_position, label_priority, milestone_due, popularity, weight fields. Default is created_at.
scope
string
Return issues for the given scope: created_by_me, assigned_to_me or all. Defaults to created_by_me.
search
string
Search issues against their title and description.
sort
string
Return issues sorted in asc or desc order. Default is desc.
state
string
Return all issues or just those that are opened or closed
updated_after
datetime
Return issues updated on or after the given time. Expected in ISO 8601 format (2019-03-15T08:00:00Z)
updated_before
datetime
Return issues updated on or before the given time. Expected in ISO 8601 format (2019-03-15T08:00:00Z)
weight
integer
Return issues with the specified weight. None returns issues with no weight assigned. Any returns issues with a weight assigned.
project_id
integer
Returns issues for the given project.
group_id
integer
Returns issues for the given group.
To search in a specific project use parameter project_id=X. Project IDs are listed when viewing the project on GitLab. Searching through a project, by default, uses scope=all and will return all merge requests or issues for the project specified. Only one project_id may be listed at a time.
project_id=23&state=opened&assignee_id=@me
iids[]=1&project_id=473&labels=bug
To search in a specific group use parameter group_id=X. Group IDs are listed when viewing the group on GitLab. Searching through a group, by default, uses scope=all and will return all merge request or issues for the group specified. Only one group_id may be listed at a time.
group_id=23&state=opened&assignee_id=@me
iids[]=1&group_id=473&labels=bug
By default, custom filters use scope=all which searches across all of GitLab. To avoid pulling all merge requests or issues listed on GitLab, you will need to refine this search using at least one of the following qualifiers:
scope=assigned\_to\_me
scope=created\_by\_me
project_id
group_id
author_id
author_username
assignee_id
assignee_username
my\_reaction\_emoji
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.