relatedwork

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package relatedwork owns dependency-neutral relationship facts extracted from stored thread text. It performs no I/O and treats source text as data.

Index

Constants

View Source
const (
	// RelationExplicitReference is a source-text reference with no stronger
	// closing, dependency, or blocking phrase.
	RelationExplicitReference = "explicit_reference"
	// RelationMentions is an inbound pull-request reference without closing semantics.
	RelationMentions = "mentions"
	// RelationClaimsToClose is an explicit closing-keyword or GitHub closing-issue relationship.
	RelationClaimsToClose = "claims_to_close"
	// RelationReplaces means the source says it supersedes the referenced thread.
	RelationReplaces = "replaces"
	// RelationSupersededBy means the source says the referenced thread supersedes it.
	RelationSupersededBy = "superseded_by"
	// RelationDependsOn means the source states that it requires the referenced thread.
	RelationDependsOn = "depends_on"
	// RelationBlocks means the source states that it blocks the referenced thread.
	RelationBlocks = "blocks"
	// RelationCrossReference is an explicit GitHub timeline cross-reference.
	RelationCrossReference = "cross_reference"
	// RelationClusterCandidate is a stored duplicate-cluster relationship.
	RelationClusterCandidate = "cluster_candidate"
)

Variables

This section is empty.

Functions

func Priority

func Priority(relation string) int

Priority orders relationship specificity for deterministic de-duplication.

Types

type Reference

type Reference struct {
	Repo     domain.RepoRef
	Kind     domain.ThreadKind
	Number   int
	Relation string
	Evidence string
}

Reference is one exact GitHub thread reference and the strongest lexical relationship stated for it in the same source text. Kind can be empty for GitHub's ambiguous owner/repo#N and #N syntax.

func Extract

func Extract(text string, defaultRepo domain.RepoRef) []Reference

Extract returns sorted, unique references from unquoted prose. Fenced code, inline code, indented code, and blockquotes are excluded so copied examples cannot become collision or blocker evidence.

Jump to

Keyboard shortcuts

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