/go-jira

Go package for working with Atlassian JIRA REST API

Primary LanguageGoApache License 2.0Apache-2.0

PkgGoDev GitHub Actions Status codebeat badge

InstallationCompatibilityUsage exampleBuild StatusLicense


go-jira is a Go package for working with Jira REST API.

Currently, this package support only getting data from API (i.e., you cannot create or modify data using this package).

Note, that this is beta software, so it's entirely possible that there will be some significant bugs. Please report bugs so that we are aware of the issues.

Installation

Make sure you have a working Go 1.14+ workspace (instructions), then:

go get pkg.re/essentialkaos/go-jira.v2

For update to latest stable release, do:

go get -u pkg.re/essentialkaos/go-jira.v2

Compatibility

Version 6.x 7.x 8.x cloud
1.x Full Partial Partial No
2.x Full Full Full No

Usage example

package main

import (
  "fmt"
  "pkg.re/essentialkaos/go-jira.v2"
)

func main() {
  api, err := jira.NewAPI("https://jira.domain.com", "john", "MySuppaPAssWOrd")
  api.SetUserAgent("MyApp", "1.2.3")

  if err != nil {
    fmt.Printf("Error: %v\n", err)
    return
  }

  issue, err := api.GetIssue(
    "SAS-1956", jira.IssueParams{
      Expand: []string{"changelog"},
    },
  )

  if err != nil {
    fmt.Printf("Error: %v\n", err)
    return
  }

  fmt.Println("%-v\n", issue)
}

Build Status

Branch Status
master (Stable) CI
develop (Unstable) CI

License

Apache License, Version 2.0