prx

module
v0.0.0-...-52ee643 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2026 License: Apache-2.0

README

prx

Go library for fetching pull request data from GitHub, GitLab, and Gitea/Codeberg with automatic platform detection, authentication resolution, and caching.

Quick Start

import "github.com/codeGROOVE-dev/prx/pkg/pr"

data, err := pr.Fetch(ctx, "https://github.com/golang/go/pull/12345")
// Works with: GitHub, GitLab, Codeberg, self-hosted instances

Auto-detects platform and resolves authentication from GITHUB_TOKEN/GITLAB_TOKEN/GITEA_TOKEN or CLI tools (gh, glab, tea, berg).

Library Usage

import (
    "github.com/codeGROOVE-dev/prx/pkg/prx"
    "github.com/codeGROOVE-dev/prx/pkg/prx/github"
)

platform := github.NewPlatform(token)
client := prx.NewClient(platform)
data, err := client.PullRequest(ctx, "owner", "repo", 123)

GitLab: gitlab.NewPlatform(token, gitlab.WithBaseURL("https://gitlab.example.com")) | Gitea: gitea.NewPlatform(token, gitea.WithBaseURL("https://gitea.example.com"))

Caching enabled by default. Disable: prx.WithCacheStore(null.New[string, prx.PullRequestData]())

Directories

Path Synopsis
cmd
prx command
Package main provides the prx command-line tool for analyzing pull requests from GitHub, GitLab, and Codeberg/Gitea.
Package main provides the prx command-line tool for analyzing pull requests from GitHub, GitLab, and Codeberg/Gitea.
prx_compare command
Package main provides a comparison utility for REST vs GraphQL PR fetching.
Package main provides a comparison utility for REST vs GraphQL PR fetching.
pkg
prx
Package prx provides a client for fetching pull request events from code hosting platforms.
Package prx provides a client for fetching pull request events from code hosting platforms.
prx/auth
Package auth provides token resolution for different git hosting platforms.
Package auth provides token resolution for different git hosting platforms.
prx/gitea
Package gitea provides a Gitea/Codeberg platform implementation for fetching pull request data from Gitea-based forges.
Package gitea provides a Gitea/Codeberg platform implementation for fetching pull request data from Gitea-based forges.
prx/github
Package github provides a low-level client for the GitHub REST and GraphQL APIs.
Package github provides a low-level client for the GitHub REST and GraphQL APIs.
prx/gitlab
Package gitlab provides a GitLab platform implementation for fetching merge request data from GitLab instances.
Package gitlab provides a GitLab platform implementation for fetching merge request data from GitLab instances.
prx/pr
Package pr provides convenience functions for fetching pull requests with automatic platform detection and authentication resolution.
Package pr provides convenience functions for fetching pull requests with automatic platform detection and authentication resolution.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL