contributors

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package contributors extracts contributor information from git history.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatContributorsFile

func FormatContributorsFile(contributors []Contributor) string

FormatContributorsFile formats the full CONTRIBUTORS.md content.

func FormatMarkdown

func FormatMarkdown(contributors []Contributor, firstTimers []Contributor) string

FormatMarkdown formats a contributor section for release notes.

Types

type Contributor

type Contributor struct {
	Name   string
	Email  string
	Handle string // GitHub username, extracted from noreply email if possible
	Count  int
}

Contributor represents a person who contributed to the project.

func DetectFirstTime

func DetectFirstTime(all, release []Contributor) []Contributor

DetectFirstTime returns contributors in release who don't appear in all (i.e., first-time contributors for this release).

func ExtractAllContributors

func ExtractAllContributors(repoDir string) ([]Contributor, error)

ExtractAllContributors returns all-time contributors across the entire git history.

func ExtractContributors

func ExtractContributors(repoDir, fromTag, toTag string) ([]Contributor, error)

ExtractContributors returns all unique contributors between two git tags. When fromTag is empty, returns all contributors reachable from toTag (useful for the first release where no previous tag exists).

func ExtractContributorsUpTo

func ExtractContributorsUpTo(repoDir, ref string) ([]Contributor, error)

ExtractContributorsUpTo returns all contributors reachable from the given ref (all ancestors including the ref itself). This is useful for building a historical baseline before a release tag.

Jump to

Keyboard shortcuts

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