jira

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package jira provides a REST API client for Jira Cloud/Server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a Jira REST API client.

func NewClient

func NewClient(baseURL, email, apiToken string) (*Client, error)

NewClient creates a new Jira client. baseURL should be like "https://myorg.atlassian.net"

func (*Client) CreateIssue

func (c *Client) CreateIssue(ctx context.Context, input CreateIssueInput) (*CreateIssueResult, error)

CreateIssue creates a new issue in Jira.

func (*Client) GetIssueStatus

func (c *Client) GetIssueStatus(ctx context.Context, issueKey string) (string, error)

GetIssueStatus fetches the current status of a Jira issue.

func (*Client) TestConnection

func (c *Client) TestConnection(ctx context.Context) error

TestConnection verifies Jira credentials by fetching server info.

type CreateIssueInput

type CreateIssueInput struct {
	ProjectKey  string
	Summary     string
	Description string
	IssueType   string // "Bug", "Task", "Story"
	Priority    string // "Highest", "High", "Medium", "Low", "Lowest"
	Labels      []string
}

CreateIssueInput contains fields for creating a Jira issue.

type CreateIssueResult

type CreateIssueResult struct {
	ID        string `json:"id"`
	Key       string `json:"key"`        // e.g. "PROJ-123"
	SelfURL   string `json:"self"`       // REST API URL
	BrowseURL string `json:"browse_url"` // Human-readable URL
}

CreateIssueResult contains the response from creating a Jira issue.

Jump to

Keyboard shortcuts

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