class

CRE::Github::Client

Inherits Reference < Object

Thin GitHub REST client. We target fine-grained PATs for rotation since the /user/personal-access-tokens endpoint accepts programmatic creation and deletion when the bearer has the appropriate Apps-managed permission. For the test/portfolio path we mock these endpoints directly.

Constants

DEFAULT_API = "https://api.github.com"

Constructors

new(token : String, api_base : String = DEFAULT_API)
Source

Instance methods

create_pat(name : String, scopes : Array(String), expires_in_days : Int32 = 90) : Token
Source
delete_pat(token_id : Int64) : Nil
Source

Nested types