• /
  • ログイン
  • 無料アカウント

CodeStream pull requests section

重要

The Pull Requests section currently only supports GitHub, GitHub Enterprise, GitLab, and GitLab Self-Managed. Unless you're already connected to one of those services, the section will only appear if you have a repository from one these services open in 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.

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 there include the ability to refresh all the sections (or queries) at once, create a new pull request, and to 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.

A screenshot showing the PR section settings menu

Use this menu to fine-tune your pull request settings.

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 examples given below.

Merge request search syntax

state=opened&author_id=@me
state=closed&assignee_username=@me&labels=help wanted
assignee_id=5&scope=created_by_me
labels=foo,help wanted&scope=created_by_me
iids[]=1,2&milestone=1.0.0&my_reaction_emoji=star&scope=assigned_to_me
project_id=23&state=opened&reviewer_id=@me
scope=assigned_to_me&not[labels]=duplicate&not[milestone]=review
AttributeTypeDescription
statestringReturn all issues or just those that are opened or closed
order_bystringReturn requests ordered by created_at or updated_at fields. Default is created_at.
sortstringReturn requests sorted in asc or desc order. Default is desc.
milestonestringReturn merge requests for a specific milestone. None returns merge requests with no milestone. Any returns merge requests that have an assigned milestone.
viewstringIf simple, returns the iid, URL, title, description, and basic state of merge request.
labelsstringReturn 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_detailsbooleanIf true, response returns more details for each label in labels field: :name, :color, :description, :description_html, :text_color. Default is false.
with_merge_status_recheckbooleanIf true, this projection requests (but does not guarantee) that the merge_status field be recalculated asynchronously. Default is false.
created_afterdatetimeReturn merge requests created on or after the given time. Expected in ISO 8601 format (2019-03-15T08:00:00Z)
created_beforedatetimeReturn merge requests created on or before the given time. Expected in ISO 8601 format (2019-03-15T08:00:00Z)
updated_afterdatetimeReturn merge requests updated on or after the given time. Expected in ISO 8601 format (2019-03-15T08:00:00Z)
updated_beforedatetimeReturn merge requests updated on or before the given time. Expected in ISO 8601 format (2019-03-15T08:00:00Z)
scopestringReturn merge requests for the given scope: created_by_me, assigned_to_me or all. Defaults to created_by_me
author_idintegerReturns merge requests created by the given user id. Mutually exclusive with author_username. Combine with scope=all or scope=assigned_to_me.
author_usernamestringReturns merge requests created by the given username. Mutually exclusive with author_id.
assignee_idintegerReturns merge requests assigned to the given user id. None returns unassigned merge requests. Any returns merge requests with an assignee.
reviewer_idintegerReturns 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_usernamestringReturns 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_emojistringReturn 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_branchstringReturn merge requests with the given source branch.
target_branchstringReturn merge requests with the given target branch.
searchstringSearch merge requests against their title and description.
instringModify the scope of the search attribute. title, description, or a string joining them with comma. Default is title,description.
wipstringFilter merge requests against their wip status. yes to return only draft merge requests, no to return non-draft merge requests.
nothashReturn 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.
environmentstringReturns merge requests deployed to the given environment. Expected in ISO 8601 format (2019-03-15T08:00:00Z)
deployed_beforedatetimeReturn merge requests deployed before the given date/time. Expected in ISO 8601 format (2019-03-15T08:00:00Z)
deployed_afterdatetimeReturn merge requests deployed after the given date/time. Expected in ISO 8601 format (2019-03-15T08:00:00Z)
project_idintegerReturns merge requests for the given project.
group_idintegerReturns merge requests for the given group.

Issue search syntax

state=opened&author_id=@me
state=closed&assignee_username=@me&labels=help wanted
assignee_id=5&scope=created_by_me
labels=foo,help wanted&scope=created_by_me
iids[]=1,2&milestone=1.0.0&my_reaction_emoji=star&scope=assigned_to_me
project_id=23&state=opened&assignee_id=@me
AttributeTypeDescription
assignee_idintegerReturn issues assigned to the given user id. Mutually exclusive with assignee_username. None returns unassigned issues. Any returns issues with an assignee.
assignee_usernamestring arrayReturn 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_idintegerReturn issues created by the given user id. Mutually exclusive with author_username. Combine with scope=all or scope=assigned_to_me.
author_usernamestringReturn issues created by the given username. Similar to author_id and mutually exclusive with author_id.
confidentialbooleanFilter confidential or public issues.
created_afterdatetimeReturn issues created on or after the given time. Expected in ISO 8601 format (2019-03-15T08:00:00Z)
created_beforedatetimeReturn issues created on or before the given time. Expected in ISO 8601 format (2019-03-15T08:00:00Z)
due_datestringReturn 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 arrayReturn only the issues having the given iid
instringModify the scope of the search attribute. title, description, or a string joining them with comma. Default is title,description
issue_typestringFilter to a given type of issue. One of issue, incident, or test_case.
iteration_idintegerReturn 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_titlestringReturn issues assigned to the iteration with the given title. Similar to iteration_id and mutually exclusive with iteration_id.
labelsstringComma-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.
milestonestringThe milestone title. None lists all issues with no milestone. Any lists all issues that have an assigned milestone.
my_reaction_emojistringReturn 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_archivedbooleanReturn issues only from non-archived projects. If false, the response returns issues from both archived and non-archived projects. Default is true.
notHashReturn 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_bystringReturn issues ordered by created_at, updated_at, priority, due_date, relative_position, label_priority, milestone_due, popularity, weight fields. Default is created_at.
scopestringReturn issues for the given scope: created_by_me, assigned_to_me or all. Defaults to created_by_me.
searchstringSearch issues against their title and description.
sortstringReturn issues sorted in asc or desc order. Default is desc.
statestringReturn all issues or just those that are opened or closed
updated_afterdatetimeReturn issues updated on or after the given time. Expected in ISO 8601 format (2019-03-15T08:00:00Z)
updated_beforedatetimeReturn issues updated on or before the given time. Expected in ISO 8601 format (2019-03-15T08:00:00Z)
weightintegerReturn issues with the specified weight. None returns issues with no weight assigned. Any returns issues with a weight assigned.
project_idintegerReturns issues for the given project.
group_idintegerReturns issues for the given group.

Searching by project

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

Searching by group

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

Minimum qualifiers

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.

問題を作成する
Copyright © 2022 New Relic Inc.