githubdocs

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package githubdocs implements converting GitHub issues into text docs for rsc.io/gaby/internal/docs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Restart

func Restart(lg *slog.Logger, gh *github.Client)

Restart causes the next call to Sync to behave as if it has never sync'ed any issues before. The result is that all issues will be reconverted to doc form and re-added. Docs that have not changed since the last addition to the corpus will appear unmodified; others will be marked new in the corpus.

func Sync

func Sync(lg *slog.Logger, dc *docs.Corpus, gh *github.Client)

Sync writes to dc docs corresponding to each issue in gh that is new since the last call to Sync.

If an issue is edited on GitHub, it will appear new in gh and the new text will be written to dc, replacing the old issue text. Only the issue body (what looks like the top comment in the UI) is saved as a document. The document ID for each issue is its GitHub URL: "https://github.com/<org>/<repo>/issues/<n>".

Types

This section is empty.

Jump to

Keyboard shortcuts

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