Skip to content

rfldhs/JiraSwift

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JiraSwift

Swift Platforms Xcode License Twitter: @cpageler93

JiraSwift is a HTTP client for Jira implemented in swift based on swift-server/async-http-client.

Framework Usage

JQL Search

let client = Jira.Client(baseURL: "https://jira.tinyspeck.com",
                         username: "your_username",
                         password: "your_password")

do {
    let searchResult = try client.search(jql: "key in (XXX027-65, XXX038-3, XXX027-58)").wait()
    for issue in searchResult.issues {
        print("\(issue.key): \(issue.fields.assignee?.name ?? "NONE" )")
    }
} catch Jira.ClientError.jiraError(let error) {
    print(error.errorMessages)
} catch {
    print(error)
}

Implemented Methods

Implemented Method Route
getMyself() /rest/api/2/myself
search() /rest/api/2/search
getServerInfo() /rest/api/2/serverInfo
projects() /rest/api/2/project
projectTypes() /rest/api/2/project/type

Command Line Interface

Environment

You can either setup your environment

# setup environment
JIRA_URL=https://your_jira_url
JIRA_USERNAME=your_username
JIRA_PASSWORD=your_password

jira search --jql "key in (XYZ027-65, XYZ038-3, XYZ027-58)"

Or pass all values as options to jira the command

jira search --url "https://your_jira_url" \
            --username "your_username" \
            --password "your_password" \
            --jql "key in (XYZ027-65, XYZ038-3, XYZ027-58)"

Commands

Command Description
search Search for Issues with JQL
projects List all projects
project-types List all project types

Contribute

Feel free to add a missing REST API method or create an issue if you want me to implement it!

Jira REST API Documentation

About

Jira Client for Swift

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages

  • Swift 99.3%
  • Other 0.7%