githubapi

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package githubapi provides shared helpers for authenticated GitHub API requests. Both the EIP and consensus-specs fetchers use these helpers to build requests with optional bearer-token auth from GITHUB_TOKEN or GH_TOKEN environment variables.

Index

Constants

View Source
const APIBase = "https://api.github.com"

APIBase is the root URL for the GitHub REST API.

Variables

This section is empty.

Functions

func NewRequest

func NewRequest(ctx context.Context, url string) (*http.Request, error)

NewRequest creates an HTTP GET request for the GitHub API. If GITHUB_TOKEN or GH_TOKEN is set, a Bearer authorization header is added automatically.

func Token

func Token() string

Token returns the first non-empty value from GITHUB_TOKEN or GH_TOKEN.

Types

This section is empty.

Jump to

Keyboard shortcuts

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