πŸ“‘
Introduction
go-atlassian is a Go module that enables the interaction with the Atlassian Cloud Services.

​
✨
Features

  • Supports Jira Software v3.0 API. (88% mapped)
  • Interacts with the Jira Agile entities such as: Epics, Board, Backlog, Ranks, etc.
  • Interacts with the Jira Service Management entities.
  • Manages the Atlassian Admin Cloud organizations.
  • Manages the Atlassian Admin SCIM workflow.
  • Checks Confluence Cloud content permissions.
  • CRUD Confluence Cloud content (page, blogpost, comment, question).
  • Add attachment into Confluence Cloud contents.
  • Search contents and spaces.
  • Support the Atlassian Document Format (ADF).
  • 100% of code coverage
  • Every method has their corresponding example documented.
  • 3036 Unit Test Cases created and passed.

​
β„Ή
Installation

Make sure you have Go installed (download). Version 1.13 or higher is required.
1
## Jira Software Cloud / Service Management Cloud / Jira Agile Cloud
2
$ go get -u -v github.com/ctreminiom/go-atlassian/jira/
3
​
4
## Atlassian Cloud Admin
5
$ go get -u -v github.com/ctreminiom/go-atlassian/admin/
6
​
7
## Confluence Cloud
8
$ go get -u -v github.com/ctreminiom/go-atlassian/confluence/
Copied!

​
πŸ“–
Documentation

Documentation is hosted live at https://docs.go-atlassian.io/​

​
πŸ“ˆ
Usage

More examples in jira/examples admin/examples jira/sm/examples directories. Here's a short example of how to get a Jira Issue:
1
package main
2
​
3
import (
4
"context"
5
"github.com/ctreminiom/go-atlassian/jira"
6
"log"
7
"os"
8
)
9
​
10
func main() {
11
​
12
var (
13
host = os.Getenv("HOST")
14
mail = os.Getenv("MAIL")
15
token = os.Getenv("TOKEN")
16
)
17
​
18
atlassian, err := jira.New(nil, host)
19
if err != nil {
20
return
21
}
22
​
23
atlassian.Auth.SetBasicAuth(mail, token)
24
​
25
issue, response, err := atlassian.Issue.Get(context.Background(), "KP-12", nil, []string{"transitions"})
26
if err != nil {
27
if response != nil {
28
log.Println("Response HTTP Response", response.Bytes.String())
29
log.Println(response.Code)
30
}
31
log.Fatal(err)
32
}
33
​
34
log.Println("Response HTTP Code", response.Code)
35
log.Println("HTTP Endpoint Used", response.Endpoint)
36
​
37
log.Println(issue.Key)
38
log.Println(issue.Fields.Reporter.AccountID)
39
​
40
for _, transition := range issue.Transitions {
41
log.Println(transition.Name, transition.ID, transition.To.ID, transition.HasScreen)
42
}
43
​
44
}
Copied!

​
πŸ“¦
JetBrains OS licenses

go-atlassian had been being developed with GoLand under the free JetBrains Open Source license(s) granted by JetBrains s.r.o., hence I would like to express my thanks here.

​
✈
GitBook Host

go-atlassian documentation is hosted using the GitBook non-profit / open-source plan so hence I would like to express my thanks here.

​
⭐
Project assistance

If you want to say thank you or/and support active development of go-atlassian:
  • Add a GitHub Star to the project.
  • Write interesting articles about project on Dev.to, Medium or personal blog.
  • Support the project by donating a cup of coffee.
  • Contributions, issues and feature requests are welcome!
  • Feel free to check issues page.
​​
​
​

​
πŸ’‘
Inspiration

The project was created with the purpose to provide a unique point to provide an interface for interacting with Atlassian products. This module is highly inspired by the Go library https://github.com/andygrunwald/go-jira but focused on Cloud solutions.

​
πŸ§ͺ
Run Test Cases

1
go test -v ./...
Copied!

​
πŸ‘Ύ
License

Copyright Β© 2021 Carlos Treminio. This project is MIT licensed.
​​
​
​
Last modified 1mo ago