> 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.ListPullRequests

- Component: `appmixer.github.list.ListPullRequests`
- 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.ListPullRequests>

Returns a list of pull requests from a repository.

## 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. |
| State (`state`) | select | Choose whether you want to receive open, closed or all pull requests. Default is open. |
| 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/ListPullRequests?outPort=pullRequests&ignoreAuth=true`.

### Port `notFound`

_No fields defined for this port._

## Full metadata (component.json)

```json
{
  "name": "appmixer.github.list.ListPullRequests",
  "author": "Appmixer <info@appmixer.com>",
  "icon": "(data URI omitted)",
  "description": "Returns a list of pull requests from a repository.",
  "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"
          },
          "outputType": {
            "type": "string"
          }
        },
        "required": [
          "repositoryId"
        ]
      },
      "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": "State",
            "index": 2,
            "options": [
              {
                "label": "Open",
                "value": "open"
              },
              {
                "label": "Closed",
                "value": "closed"
              },
              {
                "label": "All",
                "value": "all"
              }
            ],
            "defaultValue": "open",
            "tooltip": "Choose whether you want to receive open, closed or all pull requests. Default is open."
          },
          "outputType": {
            "type": "select",
            "label": "Output Type",
            "index": 3,
            "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/ListPullRequests?outPort=pullRequests&ignoreAuth=true",
        "data": {
          "properties": {
            "generateOutputPortOptions": true
          },
          "messages": {
            "in/outputType": "inputs/in/outputType",
            "in/state": "inputs/in/state",
            "in/repositoryId": "inputs/in/repositoryId"
          }
        }
      }
    },
    {
      "name": "notFound"
    }
  ]
}
```
