github

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package github provides functionality for interacting with the GitHub API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractRepoInfo

func ExtractRepoInfo(remoteURL string) (string, string, error)

ExtractRepoInfo extracts owner and repo name from a Git remote URL or the current repository

func InstallPostTagHook

func InstallPostTagHook() error

InstallPostTagHook installs a Git hook that runs after tags are created to create GitHub releases automatically with enhanced release notes

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents a GitHub API client

func NewClient

func NewClient() (*Client, error)

NewClient creates a new GitHub API client

func (*Client) CreateRelease

func (c *Client) CreateRelease(owner, repo, tagName, name, body string, draft, prerelease bool) (map[string]interface{}, error)

CreateRelease creates a new release in the specified repository

func (*Client) GetRepository

func (c *Client) GetRepository(owner, repo string) (map[string]interface{}, error)

GetRepository retrieves a repository by owner and repo name

func (*Client) GetUser

func (c *Client) GetUser() (map[string]interface{}, error)

GetUser retrieves the authenticated user's information

func (*Client) IsAuthenticated

func (c *Client) IsAuthenticated() (bool, error)

IsAuthenticated checks if the client has a valid GitHub token

type ReleaseManager

type ReleaseManager struct {
	// contains filtered or unexported fields
}

ReleaseManager handles GitHub release operations

func NewReleaseManager

func NewReleaseManager(config config.Config) (*ReleaseManager, error)

NewReleaseManager creates a new release manager

func (*ReleaseManager) UpdateReleaseNotes

func (m *ReleaseManager) UpdateReleaseNotes(tagName string, skipApproval bool) error

UpdateReleaseNotes creates or updates GitHub release notes with AI-generated content

Jump to

Keyboard shortcuts

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