github

package
v0.0.0-...-806d58d Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	Login string `json:"login"`
}

type Comment

type Comment struct {
	Url string `json:"url"`
	// Bodyが空文字列のものは無視する
	Body      string `json:"body"`
	Author    Author `json:"author"`
	CreatedAt string `json:"createdAt"`
}

type Comments

type Comments struct {
	Edges []struct {
		Node   Comment `json:"node"`
		Cursor string  `json:"cursor"`
	} `json:"edges"`
	PageInfo PageInfo `json:"pageInfo"`
}

type CsvReviewCommentWithTimestamp

type CsvReviewCommentWithTimestamp struct {
	csv.CsvReviewComment
	// contains filtered or unexported fields
}

type Errors

type Errors []struct {
	Type    string `json:"type"`
	Message string `json:"message"`
}

type GitHub

type GitHub struct {
	Config     *cfg.Config
	HttpClient *http.Client
}

func (*GitHub) ParsePullRequest

func (gitHub *GitHub) ParsePullRequest() (*csv.CsvData, error)

type PageInfo

type PageInfo struct {
	HasNextPage bool   `json:"hasNextPage"`
	EndCursor   string `json:"endCursor"`
}

type ReviewCommentsRoot

type ReviewCommentsRoot struct {
	Data struct {
		Repository struct {
			PullRequest struct {
				Author        Author `json:"author"`
				ReviewThreads struct {
					Edges []struct {
						Node struct {
							Id         string   `json:"id"`
							IsResolved bool     `json:"isResolved"`
							Comments   Comments `json:"comments"`
						} `json:"node"`
						Cursor string `json:"cursor"`
					} `json:"edges"`
					PageInfo PageInfo
				} `json:"reviewThreads"`
			} `json:"pullRequest"`
		} `json:"repository"`
	} `json:"data"`
	Errors Errors `json:"errors"`
}

type ReviewTimeRoot

type ReviewTimeRoot struct {
	Data struct {
		Repository struct {
			PullRequest struct {
				Additions int    `json:"additions"`
				Deletions int    `json:"deletions"`
				Title     string `json:"title"`
				Body      string `json:"body"`
				Author    Author `json:"author"`
				// レビュー時間の取得元候補
				Comments Comments `json:"comments"`
				// レビュー時間の取得元候補
				Reviews Comments `json:"reviews"`
			} `json:"pullRequest"`
		} `json:"repository"`
	} `json:"data"`
	Errors Errors `json:"errors"`
}

Jump to

Keyboard shortcuts

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