git

package
v0.0.0-...-1ab3394 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GiteaClient *gitea.Client

Functions

func GenerateCommmitEmail

func GenerateCommmitEmail(id uint64) string

func ModifyMultipleFiles

func ModifyMultipleFiles(repoOwner, repoName string, request ModifyRequest) error

ModifyMultipleFiles sends a request to the Gitea API to modify multiple files.

Types

type File

type File struct {
	Content   string    `json:"content"`
	Operation Operation `json:"operation"`
	Path      string    `json:"path"`
}

File represents a single file operation.

type ModifyRequest

type ModifyRequest struct {
	Author    gitea.Identity `json:"author"`
	Branch    string         `json:"branch"`
	Committer gitea.Identity `json:"committer"`
	Files     []File         `json:"files"`
	Message   string         `json:"message"`
	NewBranch string         `json:"new_branch"`
	Signoff   bool           `json:"signoff"`
}

ModifyRequest represents the JSON body structure for the API request.

type Operation

type Operation string
const (
	OperationCreate Operation = "create"
	OperationDelete Operation = "delete"
	OperationUpdate Operation = "update"
)

Jump to

Keyboard shortcuts

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