post

package
v0.174.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 5 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 post checks a report before it is posted with the Slack connector, whose message is standard Markdown it converts for Slack: that every pull request or issue it mentions is a link to that pull request or issue in its own repository, and that its times are the person's.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(text string) []string

Check returns what is wrong with a report's links, one problem per entry; none: it passes.

func Linked added in v0.54.0

func Linked(text string, owners map[string]string, here string) string

Linked rewrites text so it passes Check: every [owner/]repo#n or bare #n outside a link and a code span becomes a link to its issue, its owner the one owners has for the repository, a bare #n in here (owner/repo); a beekeeper note or timer is "note <n>"; a reference it cannot place loses its # ("repo 12").

func Owners added in v0.54.0

func Owners(repos ...string) map[string]string

Owners maps each repository name of the owner/repo names to its owner, lowercased, for Linked.

func Report

func Report(text string, zone *time.Location, now time.Time) []string

Report is every check a report passes: Check and Zone.

func SingleRepo added in v0.171.0

func SingleRepo(text string) string

SingleRepo returns the single owner/repo that text names by a full GitHub issue or pull request URL or an owner/repo#N reference, or "" when none or more than one.

func Unlinked added in v0.171.0

func Unlinked(text, here string) []string

Unlinked lists the bare #N and owner/repo#N references in text (outside fenced code blocks, inline code spans, CSS colour literals and URLs) that have no matching full GitHub issue or pull request URL in text, each formatted as "<ref> without its full URL (<url>)". When here is "owner/repo" (or text links one repository), a bare #N names that repository in its URL.

func UnlinkedLines added in v0.171.0

func UnlinkedLines(text, here string) [][]string

UnlinkedLines returns, for each line of text (0-indexed), the unlinked #N and owner/repo#N references on that line, evaluated against the full document's code boundaries and linked URLs.

func Zone

func Zone(text string, zone *time.Location, now time.Time) []string

Zone checks that a report tells its times in zone, the person's: its first line names the zone's abbreviation at now (EEST, CET), and no time is in UTC unless zone is.

Types

This section is empty.

Jump to

Keyboard shortcuts

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