GitHub App icon

GitHub App

Consume GitHub API using GitHub App authentication

Repository → Get Pull Requests

AI-generated

Overview

This node operation retrieves pull requests from a specified GitHub repository. It allows users to fetch pull requests based on various filters such as state (open, closed, all), sorting criteria (created date, updated date, popularity, long-running), and direction (ascending or descending). Users can choose to return all pull requests or limit the number of results. This operation is useful for monitoring repository activity, reviewing code changes, or integrating pull request data into workflows.

Use Case Examples

  1. A developer wants to list all open pull requests in a repository to review pending code changes.
  2. A project manager needs to fetch the most popular pull requests sorted by the number of comments to prioritize reviews.
  3. An automation workflow retrieves all pull requests that have been open for more than a month and had recent activity to identify long-running issues.

Properties

Name Meaning
Repository Owner The owner of the GitHub repository, which can be specified by selecting from a list, providing a URL, or entering the owner name directly.
Repository Name The name of the GitHub repository, which can be specified by selecting from a list, providing a URL, or entering the repository name directly.
Return All Whether to return all pull requests or limit the number of results.
Limit The maximum number of pull requests to return when 'Return All' is false. The maximum allowed value is 100.
Filters Additional filters to refine the pull requests returned, including state, sort order, and direction.

Output

JSON

  • id - Unique identifier of the pull request.
  • number - Pull request number in the repository.
  • state - State of the pull request (open, closed, etc.).
  • title - Title of the pull request.
  • user
    • login - Username of the pull request author.
  • created_at - Date and time when the pull request was created.
  • updated_at - Date and time when the pull request was last updated.
  • body - Description or body content of the pull request.

Dependencies

  • GitHub API access with authentication via GitHub App credentials

Troubleshooting

  • Ensure the repository owner and repository name are correctly specified and accessible with the provided credentials.
  • If the node returns an error about invalid JSON inputs, verify that any JSON parameters are correctly formatted.
  • API rate limits from GitHub may affect the ability to retrieve pull requests; ensure proper authentication and consider handling rate limits in workflows.

Links

Discussion