code

package
v3.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentUserPrincipalID

func CurrentUserPrincipalID(ctx *cmdctx.Ctx) (int, error)

CurrentUserPrincipalID resolves the authenticated user's Code numeric principal ID. The result is memoized within a process lifetime so that repeated calls (e.g. across pages) only hit the API once.

func DefaultBranch

func DefaultBranch(cc *cmdctx.Ctx, repoID string) (string, error)

DefaultBranch returns the default branch name for the given repository.

func GetPRWorkflow

func GetPRWorkflow(ctx *cmdctx.Ctx) error

GetPRWorkflow implements "get pr". It fetches the base pull request (hard fail on error) and the "pr:insight" section (best-effort — a failure only omits it, it never fails the command), then hands everything fetched to renderPR.

func ModuleInit

func ModuleInit(reg registry.ModuleRegistrar)

func PrincipalIDFromEmail

func PrincipalIDFromEmail(cc *cmdctx.Ctx, email string) (int, error)

PrincipalIDFromEmail resolves an email address to a Code numeric principal ID. Returns an error if no match is found or the email matches multiple principals.

func PrincipalIDFromUID

func PrincipalIDFromUID(cc *cmdctx.Ctx, uid string) (int, error)

PrincipalIDFromUID resolves a platform UUID to a Code numeric principal ID. Returns an error if no match is found or the UID matches multiple principals.

Types

This section is empty.

Jump to

Keyboard shortcuts

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