Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions en/docs/connectors/catalog/developer-tools/github/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,33 @@ The `ballerinax/github` package exposes the following clients:

| Client | Purpose |
|--------|---------|
| [`Client`](#client) | Provides access to the GitHub REST API (241 resource functions) for managing repositories, issues, pull requests, organizations, users, and more. |
| [`Client`](#client) | Provides access to the GitHub REST API (903 resource functions) for managing repositories, issues, pull requests, organizations, users, and more. |

---

## Client

Provides access to the GitHub REST API (241 resource functions) for managing repositories, issues, pull requests, organizations, users, and more.
Provides access to the GitHub REST API (903 resource functions) for managing repositories, issues, pull requests, organizations, users, and more.

### Configuration

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `auth` | `http:BearerTokenConfig\|http:OAuth2RefreshTokenGrantConfig` | Required | Authentication configuration. Typically a Personal Access Token supplied as a bearer token (e.g., `{token: "<PAT>"}`). |
| `httpVersion` | `http:HttpVersion` | `HTTP_2_0` | HTTP protocol version. |
| `timeout` | `decimal` | `60` | Request timeout in seconds. |
| `auth` | `http:BearerTokenConfig` | Required | Authentication configuration. Supply a Personal Access Token (PAT) as a bearer token: `{token: "<PAT>"}`. |
| `httpVersion` | `http:HttpVersion` | `HTTP_2_0` | HTTP protocol version used by the client. |
| `http1Settings` | `http:ClientHttp1Settings` | `()` | HTTP/1.x protocol settings including keep-alive and chunking behavior. |
| `http2Settings` | `http:ClientHttp2Settings` | `()` | HTTP/2 protocol settings. |
| `timeout` | `decimal` | `60` | Request timeout in seconds before the connection is closed. |
| `forwarded` | `string` | `"disable"` | Controls whether to set `forwarded` or `x-forwarded` headers. |
| `poolConfig` | `http:PoolConfiguration` | `()` | Connection pool configuration for request pooling. |
| `cache` | `http:CacheConfig` | `()` | HTTP caching configuration. |
| `compression` | `http:Compression` | `COMPRESSION_AUTO` | Compression handling for `accept-encoding` headers. |
| `circuitBreaker` | `http:CircuitBreakerConfig` | `()` | Circuit breaker configuration for fault tolerance. |
| `retryConfig` | `http:RetryConfig` | `()` | Retry configuration for failed requests. |
| `responseLimits` | `http:ResponseLimitConfigs` | `()` | Inbound response size limits. |
| `secureSocket` | `http:ClientSecureSocket` | `()` | SSL/TLS configuration. |
| `proxy` | `http:ProxyConfig` | `()` | Proxy server configuration. |
| `validation` | `boolean` | `true` | When enabled, validates response payloads against declared schemas using the `constraint` package. |

### Initializing the client

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# Github Connector Overview
---
title: GitHub Connector Overview
description: Manage repositories, issues, pull requests, and more using the Ballerina ballerinax/github connector for GitHub's REST API.
keywords: [wso2 integrator, github connector, ballerinax github, rest api, repositories, issues, pull requests]
---

GitHub is a widely used platform for version control and collaboration, allowing developers to work together on projects from anywhere. The Ballerina `ballerinax/github` connector (v5.1.0) provides programmatic access to GitHub through its REST API (version 2022-11-28), enabling you to automate tasks, manage repositories, issues, pull requests, and more directly from Ballerina integration flows.
# GitHub Connector Overview

GitHub is a widely used platform for version control and collaboration, allowing developers to work together on projects from anywhere. The Ballerina `ballerinax/github` connector (v5.1.0) provides programmatic access to GitHub through its REST API (version 2022-11-28), enabling you to automate tasks, manage repositories, issues, pull requests, and more directly from Ballerina integration flows.

## Key features

Expand All @@ -12,20 +17,27 @@ GitHub is a widely used platform for version control and collaboration, allowing
- Organization and team management — list orgs, teams, and members
- Gist management — create, update, list, star, fork, and comment on gists
- Security advisory access — query global and repository-specific security advisories
- GitHub Actions and workflow management — list and trigger workflow runs
- Dependabot, code scanning, and secret scanning alert access
- Event-driven webhook handling for GitHub issues, pull requests, releases, pushes, and repository activity
- Resource-based API design using Ballerina resource functions for intuitive path-based access to GitHub REST endpoints

## Actions

Actions are operations you invoke on GitHub from your integration — managing repositories, creating issues, handling pull requests, and more. The GitHub connector exposes 241 resource functions through a single client:

Actions are operations you invoke on GitHub from your integration — managing repositories, creating issues, handling pull requests, and more. The GitHub connector exposes 903 resource functions through a single client:

| Client | Actions |
|--------|---------|
| `Client` | Repository CRUD, issues, pull requests, branches, releases, organizations, teams, users, gists, security advisories, notifications |
| `Client` | Repository and file management, issues, pull requests, branches, releases, organizations, teams, users, gists, security advisories, notifications, GitHub Actions and workflows, Dependabot alerts, code scanning, secret scanning, packages, deployments, and more |

See the **[Action Reference](actions.md)** for the full list of operations, parameters, and sample code for each client.

## Event-driven integration

To receive GitHub webhook events (issues, pull requests, releases, pushes, and more), use the separate [`ballerinax/trigger.github`](https://github.com/ballerina-platform/module-ballerinax-trigger.github) package. It provides a `Listener` and service types (`IssuesService`, `PullRequestService`, and others) that route incoming GitHub webhook callbacks to typed event handlers.

See the [GitHub Webhooks](../../../develop/integration-artifacts/event/github-webhooks.md) guide for configuration and usage.

## Triggers

Triggers allow your integration to react to GitHub repository activity in real time. The connector provides a webhook listener that receives GitHub events and invokes your service callbacks automatically when issues, pull requests, releases, pushes, and other repository events occur.
Expand All @@ -48,7 +60,6 @@ See the **[Trigger Reference](triggers.md)** for listener configuration, service

* **[Setup Guide](setup-guide.md)**: This guide walks you through creating a GitHub Personal Access Token (PAT) required to authenticate with the GitHub connector.


* **[Action Reference](actions.md)**: Full reference for all clients — operations, parameters, return types, and sample code.

* **[Trigger Reference](triggers.md)**: Reference for event-driven integration using the GitHub webhook listener and service model.
Expand All @@ -61,6 +72,13 @@ As an open source project, WSO2 welcomes contributions from the community.

To contribute to the code for this connector, please create a pull request in the following repository.

* [Github Connector GitHub repository](https://github.com/ballerina-platform/module-ballerinax-github)
* [GitHub Connector repository](https://github.com/ballerina-platform/module-ballerinax-github)

Check the issue tracker for open issues that interest you. We look forward to receiving your contributions.

## What's next

- [Setup Guide](setup-guide.md) — create a GitHub Personal Access Token for authentication
- [Action Reference](actions.md) — full list of operations, parameters, and sample code
- [Example](example.md) — step-by-step integration walkthroughs
- [GitHub Webhooks](../../../develop/integration-artifacts/event/github-webhooks.md) — listen for GitHub events using webhooks
Loading
Loading