people

package
v1.2.10 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: MIT Imports: 16 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 people owns the M4 "people" plugin. User mode fetches followers / following lists via GraphQL. Repository mode fetches contributors / stargazers / watchers through REST repository endpoints so the repository template can reuse the same people partial with real avatar data.

Index

Constants

View Source
const Name = "people"

Name is the canonical plugin slug.

Variables

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

Plugin is the singleton registered with the global plugin registry.

Functions

func Partial

Partial renders the classic SVG fragment for the people plugin. Mirrors upstream org_repo/source/templates/classic/partials/people.ejs.

Output structure (per-type):

<section data-section="people">
  [for each type with non-empty list]:
    <section>
      <h2 class="field"><svg octicon/>${label}</h2>
      <div class="row">
        <section class="people">
          <img class="avatar" src="..." width="${size}" height="${size}" alt="" />
          ...
        </section>
      </div>
    </section>
</section>

The wrapping `<section data-section="people">` is our addition for downstream CSS/JS selectors; the inner per-type `<section>` blocks preserve upstream's flat structure.

Types

type Person

type Person struct {
	Login     string `json:"login"`
	Name      string `json:"name"`
	AvatarURL string `json:"avatarUrl"`
}

Person mirrors one entry from the upstream people list.

type Result

type Result struct {
	Skipped       bool                `json:"skipped,omitempty"`
	SkippedReason string              `json:"-"`
	Mode          string              `json:"mode,omitempty"`
	Size          int                 `json:"size,omitempty"`
	Types         map[string][]Person `json:"types"`
	Counts        map[string]int      `json:"counts,omitempty"`
}

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

Counts carries the true total per type as reported by the API (GraphQL UserConnection.totalCount for user-mode followers/following). It is distinct from len(Types[t]), which is bounded by the fetched page (plugin_people_limit). The header label must read the total (#470), while the avatar list still renders the limited slice. Repo mode is REST-based with no totalCount concept, so its entries are omitted here and the partial falls back to len(list).

func (*Result) IsSkipped

func (r *Result) IsSkipped() bool

IsSkipped lets the classic dispatcher detect the skipped path.

Jump to

Keyboard shortcuts

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