codetracker

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: ISC Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeTracker

type CodeTracker interface {
	// Update updates the code stats for a (organization, repos, start end date)
	Update(repos []string, start, end int64)

	// UserInfo returns pull request, review and commit information about
	// a given user over a given start and stop time.
	UserInfo(username string, start, end int) (*UserInformationResult, error)
}

CodeTracker interface for getting Code Stats from a git based code tracking site (Github/Gitlab etc).

type CommitInformation

type CommitInformation struct {
	Repository string `json:"repository"`
	URL        string `json:"url"`
	SHA        string `json:"sha"`
	Additions  int    `json:"additions"`
	Deletions  int    `json:"deletions"`
	Date       int64  `json:"date"`
}

CommitInformation contains all the details of a review of a pull request.

type PullRequestInformation

type PullRequestInformation struct {
	Repository string `json:"repository"`
	URL        string `json:"url"`
	Number     int    `json:"number"`
	Additions  int64  `json:"additions"`
	Deletions  int64  `json:"deletions"`
	Date       string `json:"date"`
	State      string `json:"state"`
}

PullRequestInformation contains all the specific details of pull request.

type ReviewInformation

type ReviewInformation struct {
	Repository string `json:"repository"`
	URL        string `json:"url"`
	Number     int    `json:"number"`
	Additions  int    `json:"additions"`
	Deletions  int    `json:"deletions"`
	Date       string `json:"date"`
	State      string `json:"state"`
}

ReviewInformation contains all the details of a review of a pull request.

type UserInformationResult

type UserInformationResult struct {
	User       string                   `json:"user"`
	MergedPRs  []PullRequestInformation `json:"mergedprs"`
	UpdatedPRs []PullRequestInformation `json:"updatedprs"`
	Commits    []CommitInformation      `json:"commits"`
	Reviews    []ReviewInformation      `json:"reviews"`
	Year       int                      `json:"year"`
	Month      int                      `json:"month"`
}

UserInformationResult models the data from the userinformation command.

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

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