repositories

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: MIT Imports: 10 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 repositories owns the M4 "repositories" plugin. It filters, sorts, and presents the user's repository list — the data the base plugin's paging loop already produced into pc.Data.Computed.RepositoryList.

MVP scope (Phase 3 US1):

  • Featured: filter by `_forks` / `_skipped` and sort by `_order` (stars / forks / watchers).
  • Random: deterministic Fisher-Yates over Featured when `_random=true` (seed via `_random_seed`).

Inputs accepted for upstream-compat but NOT yet wired in this MVP:

  • `plugin_repositories_affiliations`: parsed but ignored. Base surfaces OWNER repositories regardless. Future US2 work will route this through a dedicated GraphQL query.
  • `plugin_repositories_pinned` / `_starred`: when set, the corresponding Result section is populated by reusing Featured as a placeholder. Dedicated `user.pinnedItems` / `user.starredRepositories` GraphQL fragments land alongside the P2 `stars` plugin in US2.

Contracts: specs/004-m4-github-plugins/contracts/plugin-p1-mvp.md §4 Data model: specs/004-m4-github-plugins/data-model.md E-015

Index

Constants

View Source
const Name = "repositories"

Name is the canonical plugin slug.

Variables

View Source
var Plugin plugins.Plugin = &repositoriesPlugin{}

Plugin is the singleton registered with the global plugin registry.

Functions

func Partial

Partial renders the classic SVG fragment for the repositories plugin. DOM contract: emits <a class="repository"> per featured repository.

Types

type Result

type Result struct {
	Skipped       bool                 `json:"skipped,omitempty"`
	SkippedReason string               `json:"-"`
	Featured      []plugins.Repository `json:"featured"`
	Pinned        []plugins.Repository `json:"pinned,omitempty"`
	Starred       []plugins.Repository `json:"starred,omitempty"`
	Random        []plugins.Repository `json:"random,omitempty"`
}

Result is the JSON payload published under data.Plugins["repositories"].

func (*Result) IsSkipped

func (r *Result) IsSkipped() bool

IsSkipped lets the classic dispatcher (and any duck-typed consumer) detect the skipped path uniformly across plugins.

Jump to

Keyboard shortcuts

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