jira

package
v0.0.0-...-15e285d Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxSummaryLenRunes     = 255
	MaxDescriptionLenRunes = 32767
)
View Source
const FullValidConfigForTesting = `` /* 609-byte string literal not displayed */

FullValidConfigForTesting is a string representation of a JSON object that contains all fields supported by the notifier Config. It can be used without secrets.

View Source
const FullValidSecretsForTesting = `{
	"user": "test-user",
	"password": "test-password"    
}`

FullValidSecretsForTesting is a string representation of JSON object that contains all fields that can be overridden from secrets

Variables

View Source
var (
	DefaultSummary     = `{{ template "jira.default.summary" . }}`
	DefaultDescription = `{{ template "jira.default.description" . }}`
	DefaultPriority    = `{{ template "jira.default.priority" . }}`
)

Functions

This section is empty.

Types

type Config

type Config struct {
	URL *url.URL

	Project     string
	Summary     string
	Description string
	Labels      []string
	Priority    string
	IssueType   string

	ReopenTransition  string
	ResolveTransition string
	WontFixResolution string
	ReopenDuration    model.Duration

	DedupKeyFieldName string
	Fields            map[string]any

	User     string
	Password string
	Token    string
}

func NewConfig

func NewConfig(jsonData json.RawMessage, decryptFn receivers.DecryptFunc) (Config, error)

type Notifier

type Notifier struct {
	*receivers.Base
	// contains filtered or unexported fields
}

Notifier implements a Notifier for JIRA notifications. Can use V2 and V3 API to create issues, depending on Config.URL https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post

func New

func New(cfg Config, meta receivers.Metadata, template *templates.Template, sender receivers.WebhookSender, logger logging.Logger) *Notifier

func (*Notifier) Notify

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

Notify implements the Notifier interface.

func (*Notifier) SendResolved

func (n *Notifier) SendResolved() bool

Jump to

Keyboard shortcuts

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