> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.github.list.FindPullRequest

- Component: `appmixer.github.list.FindPullRequest`
- Kind: Action
- Version: 1.0.1
- Visibility: Public
- Connector: [appmixer.github 4.2.0](https://connectors.appmixer.com/connector/appmixer.github/4.2.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.github/4.2.0/component/appmixer.github.list.FindPullRequest>

Finds pull requests that match the search criteria.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Repository (`repositoryId`) | text | Enter the repository in `owner/repo` format (e.g. `octocat/Hello-World`). You can also pick from the dynamically loaded list of your repositories. |
| Pull Request State (`state`) | select | Select the pull request state. |
| Pull Request Title (`title`) | text | Enter keywords or phrases from the pull request title. The search is flexible and may match partial titles. Keep in mind that entering partial words like may match multiple results, while more specific phrases will give more focused results. |
| Labels (`labels`) | multiselect | Select the labels of the pull requests to filter. |
| Output Type (`outputType`) | select | Choose whether you want to receive the result set as one complete list of pull requests, one PR item at a time, stream the PR items to a file or the first PR out of the result. |

## Output ports

### Port `pullRequests`

Variables are loaded dynamically from `/component/appmixer/github/list/FindPullRequest?outPort=pullRequests&ignoreAuth=true`.

### Port `notFound`

_No fields defined for this port._

## Full metadata (component.json)

```json
{
  "name": "appmixer.github.list.FindPullRequest",
  "author": "Appmixer <info@appmixer.com>",
  "icon": "(data URI omitted)",
  "description": "Finds pull requests that match the search criteria.",
  "version": "1.0.1",
  "private": false,
  "auth": {
    "service": "appmixer:github",
    "scope": [
      "user",
      "public_repo",
      "repo",
      "notifications",
      "gist"
    ]
  },
  "quota": {
    "manager": "appmixer:github",
    "resources": "requests",
    "scope": {
      "userId": "{{userId}}"
    }
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "repositoryId": {
            "type": "string",
            "pattern": "[^/]+[/][^/]+"
          },
          "state": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "labels": {
            "type": [
              "array",
              "string"
            ]
          },
          "outputType": {
            "type": "string"
          }
        },
        "required": [
          "repositoryId",
          "outputType"
        ]
      },
      "inspector": {
        "inputs": {
          "repositoryId": {
            "type": "text",
            "group": "config",
            "label": "Repository",
            "index": 1,
            "tooltip": "Enter the repository in `owner/repo` format (e.g. `octocat/Hello-World`). You can also pick from the dynamically loaded list of your repositories.",
            "source": {
              "url": "/component/appmixer/github/list/ListRepos?outPort=repositories",
              "data": {
                "transform": "./transformers#reposToSelectArray"
              }
            }
          },
          "state": {
            "type": "select",
            "group": "config",
            "label": "Pull Request State",
            "index": 2,
            "tooltip": "Select the pull request state.",
            "default": "all",
            "options": [
              {
                "label": "Open",
                "value": "open"
              },
              {
                "label": "Closed",
                "value": "closed"
              },
              {
                "label": "All",
                "value": "all"
              }
            ]
          },
          "title": {
            "type": "text",
            "group": "config",
            "label": "Pull Request Title",
            "index": 3,
            "tooltip": "Enter keywords or phrases from the pull request title. The search is flexible and may match partial titles. Keep in mind that entering partial words like may match multiple results, while more specific phrases will give more focused results."
          },
          "labels": {
            "type": "multiselect",
            "group": "config",
            "label": "Labels",
            "index": 4,
            "source": {
              "url": "/component/appmixer/github/list/ListLabels?outPort=labels",
              "data": {
                "properties": {
                  "repositoryId": "inputs/in/repositoryId"
                },
                "transform": "./transformers#labelsToSelectArray",
                "generateOptions": true
              }
            },
            "tooltip": "Select the labels of the pull requests to filter."
          },
          "outputType": {
            "type": "select",
            "group": "config",
            "label": "Output Type",
            "index": 5,
            "tooltip": "Choose whether you want to receive the result set as one complete list of pull requests, one PR item at a time, stream the PR items to a file or the first PR out of the result.",
            "defaultValue": "file",
            "options": [
              {
                "label": "First PR",
                "value": "first"
              },
              {
                "label": "One at a time",
                "value": "object"
              },
              {
                "label": "All at once",
                "value": "array"
              },
              {
                "label": "Save to file",
                "value": "file"
              }
            ]
          }
        },
        "groups": {
          "config": {
            "label": "Configuration",
            "index": 1
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "pullRequests",
      "source": {
        "url": "/component/appmixer/github/list/FindPullRequest?outPort=pullRequests&ignoreAuth=true",
        "data": {
          "properties": {
            "generateOutputPortOptions": true
          },
          "messages": {
            "in/outputType": "inputs/in/outputType",
            "in/state": "inputs/in/state",
            "in/repositoryId": "inputs/in/repositoryId",
            "in/title": "inputs/in/title"
          }
        }
      }
    },
    {
      "name": "notFound"
    }
  ]
}
```
