prpattern

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 2 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 prpattern matches a repository's GitHub pull-request URLs. A Cache compiles each repository's patterns once, for a bounded number of repositories.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

Cache holds compiled Sets by repository. The zero value is ready to use.

func (*Cache) For

func (c *Cache) For(repository string) *Set

For is the repository's Set, compiled on first use.

type Set

type Set struct {
	// contains filtered or unexported fields
}

Set is one repository's pull-request patterns. Its zero value, the empty repository's, matches nothing.

func (*Set) IsPR

func (s *Set) IsPR(url string) bool

IsPR reports whether url is exactly a pull request of the repository.

func (*Set) IsTask

func (s *Set) IsTask(url string) bool

IsTask reports whether url is exactly a pull request of the repository whose number has no leading zero: a run's task URL.

func (*Set) Mention

func (s *Set) Mention(text string) string

Mention is the first pull request of the repository text names, or "".

Jump to

Keyboard shortcuts

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