Help us shape the future of Go! Take the 2026 Go Developer Survey

jira

package
v0.34.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultJiraConfig = JiraConfig{
	NotifierConfig: amcommoncfg.NotifierConfig{
		VSendResolved: true,
	},
	APIType: "auto",
	Summary: JiraFieldConfig{
		Template: `{{ template "jira.default.summary" . }}`,
	},
	Description: JiraFieldConfig{
		Template: `{{ template "jira.default.description" . }}`,
	},
	Priority: `{{ template "jira.default.priority" . }}`,
}

Functions

This section is empty.

Types

type JiraConfig added in v0.33.0

type JiraConfig struct {
	amcommoncfg.NotifierConfig `yaml:",inline" json:",inline"`
	HTTPConfig                 *commoncfg.HTTPClientConfig `yaml:"http_config,omitempty" json:"http_config,omitempty"`

	APIURL  *amcommoncfg.URL `yaml:"api_url,omitempty" json:"api_url,omitempty"`
	APIType string           `yaml:"api_type,omitempty" json:"api_type,omitempty"`

	Project     string          `yaml:"project,omitempty" json:"project,omitempty"`
	Summary     JiraFieldConfig `yaml:"summary,omitempty" json:"summary,omitempty"`
	Description JiraFieldConfig `yaml:"description,omitempty" json:"description,omitempty"`
	Labels      []string        `yaml:"labels,omitempty" json:"labels,omitempty"`
	Priority    string          `yaml:"priority,omitempty" json:"priority,omitempty"`
	IssueType   string          `yaml:"issue_type,omitempty" json:"issue_type,omitempty"`

	ReopenTransition  string         `yaml:"reopen_transition,omitempty" json:"reopen_transition,omitempty"`
	ResolveTransition string         `yaml:"resolve_transition,omitempty" json:"resolve_transition,omitempty"`
	WontFixResolution string         `yaml:"wont_fix_resolution,omitempty" json:"wont_fix_resolution,omitempty"`
	ReopenDuration    model.Duration `yaml:"reopen_duration,omitempty" json:"reopen_duration,omitempty"`

	Fields map[string]any `yaml:"fields,omitempty" json:"custom_fields,omitempty"`
}

func (*JiraConfig) UnmarshalYAML added in v0.33.0

func (c *JiraConfig) UnmarshalYAML(unmarshal func(any) error) error

type JiraFieldConfig added in v0.33.0

type JiraFieldConfig struct {
	// Template is the template string used to render the field.
	Template string `yaml:"template,omitempty" json:"template,omitempty"`
	// EnableUpdate indicates whether this field should be omitted when updating an existing issue.
	EnableUpdate *bool `yaml:"enable_update,omitempty" json:"enable_update,omitempty"`
}

func (*JiraFieldConfig) EnableUpdateValue added in v0.33.0

func (f *JiraFieldConfig) EnableUpdateValue() bool

func (*JiraFieldConfig) UnmarshalYAML added in v0.33.0

func (f *JiraFieldConfig) UnmarshalYAML(unmarshal func(any) error) error

Supports both the legacy string and the new object form.

type Notifier

type Notifier struct {
	// contains filtered or unexported fields
}

Notifier implements a Notifier for JIRA notifications.

func New

func (*Notifier) Notify

func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error)

Notify implements the Notifier interface.

Jump to

Keyboard shortcuts

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