repos

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RepoInSlice added in v0.4.0

func RepoInSlice(repositories []RepoDetails, r string) bool

repoInSlice is a helper function to test if a given repo is already in a list of repos.

Types

type Commit

type Commit struct {
	Sha       string `json:"sha"`
	Author    string `json:"author"`
	Timestamp int64  `json:"timestamp"`
	Message   string `json:"message"`
	URL       string `json:"url"`
}

Commit represents a Git commit.

type Readme

type Readme struct {
	Body string
}

func (*Readme) GithubActions

func (r *Readme) GithubActions() []string

GithubActions tries to extract Github Actions Badges from the README.

func (*Readme) LinkedCharm

func (r *Readme) LinkedCharm(ctx context.Context) *stores.Artifact

LinkedCharm parses the Readme body, and returns a StoreArtifact representing a charm if there is a Charmhub.io badge in the Readme.

func (*Readme) LinkedSnap

func (r *Readme) LinkedSnap(ctx context.Context) *stores.Artifact

LinkedSnap parses the Readme body, and returns a StoreArtifact representing a snap if there is a Snapcraft.io badge in the Readme.

type Release

type Release struct {
	ID         int64  `json:"id"`
	Version    string `json:"version"`
	Timestamp  int64  `json:"timestamp"`
	Title      string `json:"title"`
	Body       string `json:"body"`
	URL        string `json:"url"`
	CompareURL string `json:"compareUrl"`
}

Release refers to either Github Release.

type RepoDetails

type RepoDetails struct {
	Name       string           `json:"name"`
	NewCommits int              `json:"newCommits"`
	URL        string           `json:"url"`
	Releases   []*Release       `json:"releases"`
	Tags       []*Tag           `json:"tags"`
	Commits    []*Commit        `json:"commits"`
	CiActions  []string         `json:"ciActions"`
	Charm      *stores.Artifact `json:"charm"`
	Snap       *stores.Artifact `json:"snap"`
}

RepoDetails represents the serialisable form of a Repository for the Report.

type Repository

type Repository interface {
	Process() error
}

Repository is an interface that provides common methods for different types of repository.

type Tag added in v0.5.0

type Tag struct {
	Name       string `json:"name"`
	Sha        string `json:"sha"`
	Body       string `json:"body"`
	Timestamp  int64  `json:"timestamp"`
	URL        string `json:"url"`
	CompareURL string `json:"compareUrl"`
}

Tag refers to a tag.

Jump to

Keyboard shortcuts

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