4 min read

getRepoIssues Documentation

Overview

This node is designed to fetch issues from a specified GitHub repository using the GitHub API. It establishes a connection to the GitHub service, validates that required inputs are provided, and retrieves the issues associated with the specified repository. This logic serves as a backend utility function that supports a variety of applications requiring integration with GitHub data.

Purpose

The primary purpose of this function is to enable users to easily access issues in a given GitHub repository programmatically. This capability is essential for applications that need to analyze or manipulate GitHub issues, providing insights into project progress, issue tracking, and collaboration.

Settings

The following settings are defined for this node:

1. inputs

a. owner

b. repo

c. page (optional)

d. perPage (optional)

e. state (optional)

2. config

3. context

How It Works

The function starts by attempting to build a connection instance to GitHub using a secure connection, passing the 'github' integration type and the current execution context.

It then checks if the input parameters owner and repo are provided. If either is missing, an error is thrown.

If valid inputs are present, the function uses the established GitHub connection to request issues from the specified repository using the provided pagination and state parameters. The results from the API call are returned as an output object; specifically, the issues data is encapsulated in output1.

If an error occurs during any phase of the process, a structured error message is returned, indicating the nature of the issue encountered.

Data Expectations

This node expects inputs structured as follows:

Use Cases & Examples

Use Cases

  1. Project Management Dashboard: A company uses a dashboard application that aggregates GitHub issues to visualize project progress and track outstanding tasks based on issue states (open/closed).

  2. Automated Reporting Tool: An automation service generates weekly reports of issues in specific repositories to inform team members about outstanding work and priorities.

  3. Bug Tracking System: A development team integrates GitHub issues into their internal bug tracking system, allowing them to monitor and manage bug reports directly from their workflow.

Example Configuration

Use Case: Project Management Dashboard

Configuration to Retrieve Open Issues from a Repository:

json
{
  "inputs": {
    "owner": "my-org",
    "repo": "my-repo",
    "page": 1,
    "perPage": 10,
    "state": "open"
  },
  "config": {},
  "context": {}
}

In this configuration:

This setup would enable the dashboard to display up to 10 currently open issues from my-repo, facilitating project tracking for the team.