remotedetect

package
v0.0.40 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Platform

type Platform int
const (
	PlatformUnknown Platform = iota
	PlatformGitHub
	PlatformGitLab
)

func DetectPlatform

func DetectPlatform(ctx context.Context, dir string, cfg *config.Config) (Platform, error)

func (Platform) String

func (p Platform) String() string

type ReviewContext

type ReviewContext struct {
	Platform   Platform
	RemoteName string
	RemoteURL  string
	Review     domain.ReviewRef
}

func ResolveReviewContext

func ResolveReviewContext(ctx context.Context, dir string) (ReviewContext, error)

func ResolveReviewContextWithBranch

func ResolveReviewContextWithBranch(ctx context.Context, dir string, headBranch string) (ReviewContext, error)

ResolveReviewContextWithBranch resolves remotes and platform from dir, using the provided headBranch instead of running git branch --show-current. This is necessary for bare repos where --show-current always fails.

Jump to

Keyboard shortcuts

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