azure

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Azure

type Azure struct {
	Token    string
	RepoID   string
	PrNumber string
	Project  string
	ApiUrl   string
}

func NewAzure

func NewAzure(token string) (b *Azure, err error)

func (*Azure) WriteLineComment

func (c *Azure) WriteLineComment(_, _ string, _ int) error

WriteLineComment writes a single review line on a file of the azure PR

func (*Azure) WriteMultiLineComment

func (c *Azure) WriteMultiLineComment(file, comment string, startLine, endLine int) error

WriteMultiLineComment writes a multiline review on a file in the azure PR

type Body

type Body struct {
	Comments      []Comment     `json:"comments,omitempty"`
	Status        int           `json:"status,omitempty"`
	ThreadContext ThreadContext `json:"threadContext,omitempty"`
}

type Comment

type Comment struct {
	ParentCommentId int    `json:"parentCommentId,omitempty"`
	Content         string `json:"content,omitempty"`
	CommentType     int    `json:"commentType,omitempty"`
}

type LineStruct

type LineStruct struct {
	Line   int `json:"line,omitempty"`
	Offset int `json:"offset,omitempty"`
}

type ThreadContext

type ThreadContext struct {
	FilePath      string     `json:"filePath,omitempty"`
	LeftFileEnd   LineStruct `json:"leftFileEnd,omitempty"`
	LeftFileStart LineStruct `json:"leftFileStart,omitempty"`
}

Jump to

Keyboard shortcuts

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