quiet

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package quiet reaches into the areas of a repo that the gathered PRs miss. When the PR limit stops the PRs before the date bound does, history starts where the PRs do, so a long-lived area with little recent work has no PR or change gathered and comes out thin or folded into a neighbour. For each cluster of files that change together in the history between the date bound and the PRs' start, and that no later change touches, Reach finds the PRs of its newest few changes through the forge and gives them, with those changes, to the gather. It reads the forge and never writes to it.

Index

Constants

View Source
const PerCluster = 3

PerCluster is the most PRs Reach gathers for one quiet cluster. A first guess, to be tuned from real runs (measure-before-budget).

Variables

This section is empty.

Functions

func PR

func PR(p forge.PR) store.GatheredPR

PR is the gathered form of a forge's PR.

Types

type Summary

type Summary struct {
	Clusters int    `json:"clusters"`
	PRs      int    `json:"prs"`
	Why      string `json:"why,omitempty"`
}

Summary says what Reach did: how many clusters were quiet, how many PRs it gathered for them, and why it stopped early, when it did.

func Add

func Add(g *store.Gather, histSince time.Time, f forge.Forge) *Summary

Add keeps the changes of g since histSince, where its PRs start, and adds to g what Reach finds in the older ones. It returns what Reach did.

func Reach

func Reach(recent, older []store.GatheredChange, f forge.Forge, have map[int]bool) ([]store.GatheredPR, []store.GatheredChange, Summary)

Reach returns the PRs and changes to add to a gather whose PRs reach back only as far as recent's changes: for each cluster of older's changes (reading.Clusters) none of whose files a change of recent touches, the PRs of its PerCluster newest changes in older that touch it, with those changes, skipping PRs have holds. older is newest first. A PR the forge gives without a title or a merge date takes its change's subject and date. A forge that cannot answer stops Reach, and the Summary says why; what was found before is kept.

Jump to

Keyboard shortcuts

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