commit

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package commit implements the gitlab_project.commit builtin function: create a commit with one or more file changes on a branch in a GitLab project.

The public API — Spec() and Run() — is what step-runner's builtin wrapper consumes.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrStaleHead is returned when LastCommitID does not match the
	// last-commit-id GitLab has for one of the action paths on the target
	// branch. Indicates a concurrent write touched that file between the
	// caller reading it and this commit.
	ErrStaleHead = errors.New("stale head")

	// ErrInvalidAction is returned when GitLab rejects an action — e.g.
	// `create` on an existing path, `update`/`delete` on a missing path.
	ErrInvalidAction = errors.New("invalid action")

	// ErrNoChange is returned when GitLab reports that the requested actions
	// would not change the branch. Returned by createCommit; commit catches
	// it and resolves to the current branch head so callers see the no-op
	// as a success.
	ErrNoChange = errors.New("no change")
)

Functions

func New

func New(resolveToken apifunc.TokenResolver) runner.BuiltinFunction

Types

This section is empty.

Jump to

Keyboard shortcuts

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