providers

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LinearGraphQLEndpoint = "https://api.linear.app/graphql"
)

Variables

View Source
var JiraIssueTypeToType = map[string]string{
	"bug":   "fix",
	"story": "feat",
	"task":  "chore",
}
View Source
var LabelToType = map[string]string{
	"bug":           "fix",
	"enhancement":   "feat",
	"documentation": "docs",
	"feature":       "feat",
	"feat":          "feat",
	"fix":           "fix",

	"chore":    "chore",
	"refactor": "refactor",
	"test":     "test",
	"ci":       "ci",
	"perf":     "perf",
	"build":    "build",
	"revert":   "revert",
	"style":    "style",
}

Functions

This section is empty.

Types

type GitHubIssue

type GitHubIssue struct {
	Number int           `json:"number"`
	Title  string        `json:"title"`
	Labels []GitHubLabel `json:"labels"`
}

func (*GitHubIssue) ToIssue

func (i *GitHubIssue) ToIssue() *models.Issue

type GitHubIssueProvider

type GitHubIssueProvider struct {
	CheckoutNewConfig config.CheckoutNewGitHubConfig
}

func (*GitHubIssueProvider) Get

func (*GitHubIssueProvider) List added in v0.2.0

func (*GitHubIssueProvider) Name added in v0.3.0

func (p *GitHubIssueProvider) Name() string

type GitHubLabel

type GitHubLabel struct {
	Name string `json:"name"`
}

type IssueProvider

type IssueProvider interface {
	Name() string
	Get(ctx context.Context, issue string) (*models.Issue, error)
	List(ctx context.Context) ([]*models.Issue, error)
}

func NewIssueProvider

func NewIssueProvider(cfg *config.RepositoryConfig, setupCfg *config.SetupConfig) (IssueProvider, error)

type JiraFields

type JiraFields struct {
	Summary   string        `json:"summary"`
	IssueType JiraIssueType `json:"issuetype"`
}

type JiraIssue

type JiraIssue struct {
	Key    string     `json:"key"`
	Fields JiraFields `json:"fields"`
}

func (*JiraIssue) ToIssue

func (i *JiraIssue) ToIssue() *models.Issue

type JiraIssueProvider

type JiraIssueProvider struct {
	Config         *config.JiraConfig
	CheckoutNewCfg config.CheckoutNewJiraConfig
}

func (*JiraIssueProvider) Get

func (*JiraIssueProvider) List added in v0.2.0

func (p *JiraIssueProvider) List(ctx context.Context) ([]*models.Issue, error)

func (*JiraIssueProvider) Name added in v0.3.0

func (p *JiraIssueProvider) Name() string

type JiraIssueType

type JiraIssueType struct {
	Name string `json:"name"`
}

type JiraIssues added in v0.2.0

type JiraIssues struct {
	Issues []JiraIssue `json:"issues"`
}

type LinearIssue added in v0.3.0

type LinearIssue struct {
	Identifier string
	Title      string
	State      struct {
		Name string
		Type string
	}
	Labels struct {
		Nodes []struct {
			Name string
		}
	}
	BranchName string
}

func (*LinearIssue) ToIssue added in v0.3.0

func (i *LinearIssue) ToIssue() *models.Issue

type LinearIssueProvider added in v0.3.0

type LinearIssueProvider struct {
	Config *config.LinearConfig
}

func (*LinearIssueProvider) Get added in v0.3.0

func (*LinearIssueProvider) List added in v0.3.0

func (p *LinearIssueProvider) List(ctx context.Context) ([]*models.Issue, error)

func (*LinearIssueProvider) Name added in v0.3.0

func (p *LinearIssueProvider) Name() string

type LinearIssueQuery added in v0.3.0

type LinearIssueQuery struct {
	Issue LinearIssue `graphql:"issue(id: $id)"`
}

type LinearIssues added in v0.3.0

type LinearIssues struct {
	Viewer struct {
		AssignedIssues struct {
			Nodes []LinearIssue
		} `graphql:"assignedIssues(orderBy: updatedAt, filter: { state: { type: { neq: \"completed\" } } })"`
	}
}

Jump to

Keyboard shortcuts

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