{"id":30665277,"url":"https://github.com/manomanotech/go-jira-fix-api","last_synced_at":"2025-08-31T20:19:26.574Z","repository":{"id":312258849,"uuid":"1046857635","full_name":"ManoManoTech/go-jira-fix-api","owner":"ManoManoTech","description":"Go client library for Atlassian Jira","archived":false,"fork":false,"pushed_at":"2025-08-29T11:25:56.000Z","size":2212,"stargazers_count":0,"open_issues_count":7,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-29T14:56:33.978Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/andygrunwald/go-jira?tab=doc","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ManoManoTech.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["andygrunwald","benjivesterby"],"custom":"https://paypal.me/andygrunwald"}},"created_at":"2025-08-29T10:39:51.000Z","updated_at":"2025-08-29T11:24:23.000Z","dependencies_parsed_at":"2025-08-29T14:56:37.683Z","dependency_job_id":"4b0c5764-4419-4d7d-b4b6-afca5edf1b6b","html_url":"https://github.com/ManoManoTech/go-jira-fix-api","commit_stats":null,"previous_names":["manomanotech/go-jira-fix-api"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/ManoManoTech/go-jira-fix-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManoManoTech%2Fgo-jira-fix-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManoManoTech%2Fgo-jira-fix-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManoManoTech%2Fgo-jira-fix-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManoManoTech%2Fgo-jira-fix-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ManoManoTech","download_url":"https://codeload.github.com/ManoManoTech/go-jira-fix-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManoManoTech%2Fgo-jira-fix-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273032937,"owners_count":25034069,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-31T20:19:25.325Z","updated_at":"2025-08-31T20:19:26.567Z","avatar_url":"https://github.com/ManoManoTech.png","language":"Go","funding_links":["https://github.com/sponsors/andygrunwald","https://github.com/sponsors/benjivesterby","https://paypal.me/andygrunwald"],"categories":[],"sub_categories":[],"readme":"# go-jira\n\n[![GoDoc](https://godoc.org/github.com/ManoManoTech/go-jira-fix-api?status.svg)](https://godoc.org/github.com/ManoManoTech/go-jira-fix-api)\n[![Build Status](https://github.com/ManoManoTech/go-jira-fix-api/actions/workflows/testing.yml/badge.svg)](https://github.com/ManoManoTech/go-jira-fix-api/actions/workflows/testing.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/ManoManoTech/go-jira-fix-api)](https://goreportcard.com/report/github.com/ManoManoTech/go-jira-fix-api)\n\n[Go](https://golang.org/) client library for [Atlassian Jira](https://www.atlassian.com/software/jira).\n\n![Go client library for Atlassian Jira](./img/logo_small.png \"Go client library for Atlassian Jira.\")\n\n## Features\n\n* Authentication (HTTP Basic, OAuth, Session Cookie)\n* Create and retrieve issues\n* Create and retrieve issue transitions (status updates)\n* Call every API endpoint of the Jira, even if it is not directly implemented in this library\n\nThis package is not Jira API complete (yet), but you can call every API endpoint you want. See [Call a not implemented API endpoint](#call-a-not-implemented-api-endpoint) how to do this. For all possible API endpoints of Jira have a look at [latest Jira REST API documentation](https://docs.atlassian.com/jira/REST/latest/).\n\n## Requirements\n\n* Go \u003e= 1.14\n* Jira v6.3.4 \u0026 v7.1.2.\n\nNote that we also run our tests against 1.13, though only the last two versions\nof Go are officially supported.\n\n## Installation\n\nIt is go gettable\n\n```bash\ngo get github.com/ManoManoTech/go-jira-fix-api\n```\n\nFor stable versions you can use one of our tags with [gopkg.in](http://labix.org/gopkg.in). E.g.\n\n```go\npackage main\n\nimport (\n\tjira \"gopkg.in/andygrunwald/go-jira.v1\"\n)\n...\n```\n\n(optional) to run unit / example tests:\n\n```bash\ncd $GOPATH/src/github.com/ManoManoTech/go-jira-fix-api\ngo test -v ./...\n```\n\n## API\n\nPlease have a look at the [GoDoc documentation](https://godoc.org/github.com/ManoManoTech/go-jira-fix-api) for a detailed API description.\n\nThe [latest Jira REST API documentation](https://docs.atlassian.com/jira/REST/latest/) was the base document for this package.\n\n## Examples\n\nFurther a few examples how the API can be used.\nA few more examples are available in the [GoDoc examples section](https://godoc.org/github.com/ManoManoTech/go-jira-fix-api#pkg-examples).\n\n### Get a single issue\n\nLets retrieve [MESOS-3325](https://issues.apache.org/jira/browse/MESOS-3325) from the [Apache Mesos](http://mesos.apache.org/) project.\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\tjira \"github.com/ManoManoTech/go-jira-fix-api\"\n)\n\nfunc main() {\n\tjiraClient, _ := jira.NewClient(nil, \"https://issues.apache.org/jira/\")\n\tissue, _, _ := jiraClient.Issue.Get(\"MESOS-3325\", nil)\n\n\tfmt.Printf(\"%s: %+v\\n\", issue.Key, issue.Fields.Summary)\n\tfmt.Printf(\"Type: %s\\n\", issue.Fields.Type.Name)\n\tfmt.Printf(\"Priority: %s\\n\", issue.Fields.Priority.Name)\n\n\t// MESOS-3325: Running mesos-slave@0.23 in a container causes slave to be lost after a restart\n\t// Type: Bug\n\t// Priority: Critical\n}\n```\n\n### Authentication\n\nThe `go-jira` library does not handle most authentication directly.  Instead, authentication should be handled within\nan `http.Client`.  That client can then be passed into the `NewClient` function when creating a jira client.\n\nFor convenience, capability for basic and cookie-based authentication is included in the main library.\n\n#### Token (Jira on Atlassian Cloud)\n\nToken-based authentication uses the basic authentication scheme, with a user-generated API token in place of a user's password. You can generate a token for your user [here](https://id.atlassian.com/manage-profile/security/api-tokens). Additional information about Atlassian Cloud API tokens can be found [here](https://confluence.atlassian.com/cloud/api-tokens-938839638.html).\n\nA more thorough, [runnable example](examples/basicauth/main.go) is provided in the examples directory.\n\n```go\nfunc main() {\n\ttp := jira.BasicAuthTransport{\n\t\tUsername: \"username\",\n\t\tPassword: \"token\",\n\t}\n\n\tclient, err := jira.NewClient(tp.Client(), \"https://my.jira.com\")\n\n\tu, _, err := client.User.Get(\"some_user\")\n\n\tfmt.Printf(\"\\nEmail: %v\\nSuccess!\\n\", u.EmailAddress)\n}\n```\n\n#### Basic (self-hosted Jira)\n\nPassword-based API authentication works for self-hosted Jira **only**, and has been [deprecated for users of Atlassian Cloud](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-basic-auth-and-cookie-based-auth/).\n\nThe above token authentication example may be used, substituting a user's password for a generated token.\n\n#### Authenticate with OAuth\n\nIf you want to connect via OAuth to your Jira Cloud instance checkout the [example of using OAuth authentication with Jira in Go](https://gist.github.com/Lupus/edafe9a7c5c6b13407293d795442fe67) by [@Lupus](https://github.com/Lupus).\n\nFor more details have a look at the [issue #56](https://github.com/ManoManoTech/go-jira-fix-api/issues/56).\n\n### Create an issue\n\nExample how to create an issue.\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/ManoManoTech/go-jira-fix-api\"\n)\n\nfunc main() {\n\tbase := \"https://my.jira.com\"\n\ttp := jira.BasicAuthTransport{\n\t\tUsername: \"username\",\n\t\tPassword: \"token\",\n\t}\n\n\tjiraClient, err := jira.NewClient(tp.Client(), base)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\ti := jira.Issue{\n\t\tFields: \u0026jira.IssueFields{\n\t\t\tAssignee: \u0026jira.User{\n\t\t\t\tName: \"myuser\",\n\t\t\t},\n\t\t\tReporter: \u0026jira.User{\n\t\t\t\tName: \"youruser\",\n\t\t\t},\n\t\t\tDescription: \"Test Issue\",\n\t\t\tType: jira.IssueType{\n\t\t\t\tName: \"Bug\",\n\t\t\t},\n\t\t\tProject: jira.Project{\n\t\t\t\tKey: \"PROJ1\",\n\t\t\t},\n\t\t\tSummary: \"Just a demo issue\",\n\t\t},\n\t}\n\tissue, _, err := jiraClient.Issue.Create(\u0026i)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%s: %+v\\n\", issue.Key, issue.Fields.Summary)\n}\n```\n\n### Change an issue status\n\nThis is how one can change an issue status. In this example, we change the issue from \"To Do\" to \"In Progress.\"\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/ManoManoTech/go-jira-fix-api\"\n)\n\nfunc main() {\n\tbase := \"https://my.jira.com\"\n\ttp := jira.BasicAuthTransport{\n\t\tUsername: \"username\",\n\t\tPassword: \"token\",\n\t}\n\n\tjiraClient, err := jira.NewClient(tp.Client(), base)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tissue, _, _ := jiraClient.Issue.Get(\"FART-1\", nil)\n\tcurrentStatus := issue.Fields.Status.Name\n\tfmt.Printf(\"Current status: %s\\n\", currentStatus)\n\n\tvar transitionID string\n\tpossibleTransitions, _, _ := jiraClient.Issue.GetTransitions(\"FART-1\")\n\tfor _, v := range possibleTransitions {\n\t\tif v.Name == \"In Progress\" {\n\t\t\ttransitionID = v.ID\n\t\t\tbreak\n\t\t}\n\t}\n\n\tjiraClient.Issue.DoTransition(\"FART-1\", transitionID)\n\tissue, _, _ = jiraClient.Issue.Get(testIssueID, nil)\n\tfmt.Printf(\"Status after transition: %+v\\n\", issue.Fields.Status.Name)\n}\n```\n### Get all the issues for JQL with Pagination\nJira API has limit on maxResults it can return. You may have a usecase where you need to get all issues for given JQL.\nThis example shows reference implementation of GetAllIssues function which does pagination on Jira API to get all the issues for given JQL\n\nplease look at [Pagination Example](https://github.com/ManoManoTech/go-jira-fix-api/blob/master/examples/pagination/main.go)\n\n\n\n\n### Call a not implemented API endpoint\n\nNot all API endpoints of the Jira API are implemented into *go-jira*.\nBut you can call them anyway:\nLets get all public projects of [Atlassian`s Jira instance](https://jira.atlassian.com/).\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/ManoManoTech/go-jira-fix-api\"\n)\n\nfunc main() {\n\tbase := \"https://my.jira.com\"\n\ttp := jira.BasicAuthTransport{\n\t\tUsername: \"username\",\n\t\tPassword: \"token\",\n\t}\n\n\tjiraClient, err := jira.NewClient(tp.Client(), base)\n\treq, _ := jiraClient.NewRequest(\"GET\", \"rest/api/2/project\", nil)\n\n\tprojects := new([]jira.Project)\n\t_, err = jiraClient.Do(req, projects)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfor _, project := range *projects {\n\t\tfmt.Printf(\"%s: %s\\n\", project.Key, project.Name)\n\t}\n\n\t// ...\n\t// BAM: Bamboo\n\t// BAMJ: Bamboo Jira Plugin\n\t// CLOV: Clover\n\t// CONF: Confluence\n\t// ...\n}\n```\n\n## Implementations\n\n* [andygrunwald/jitic](https://github.com/andygrunwald/jitic) - The Jira Ticket Checker\n\n## Code structure\n\nThe code structure of this package was inspired by [google/go-github](https://github.com/google/go-github).\n\nThere is one main part (the client).\nBased on this main client the other endpoints, like Issues or Authentication are extracted in services. E.g. `IssueService` or `AuthenticationService`.\nThese services own a responsibility of the single endpoints / usecases of Jira.\n\n## Contribution\n\nWe ❤️ PR's\n\nContribution, in any kind of way, is highly welcome!\nIt doesn't matter if you are not able to write code.\nCreating issues or holding talks and help other people to use [go-jira](https://github.com/ManoManoTech/go-jira-fix-api) is contribution, too!\nA few examples:\n\n* Correct typos in the README / documentation\n* Reporting bugs\n* Implement a new feature or endpoint\n* Sharing the love of [go-jira](https://github.com/ManoManoTech/go-jira-fix-api) and help people to get use to it\n\nIf you are new to pull requests, checkout [Collaborating on projects using issues and pull requests / Creating a pull request](https://help.github.com/articles/creating-a-pull-request/).\n\n### Dependency management\n\n`go-jira` uses `go modules` for dependency management.  After cloning the repo, it's easy to make sure you have the correct dependencies by running `go mod tidy`.\n\nFor adding new dependencies, updating dependencies, and other operations, the [Daily workflow](https://github.com/golang/go/wiki/Modules#daily-workflow) is a good place to start.\n\n### Sandbox environment for testing\n\nJira offers sandbox test environments at http://go.atlassian.com/cloud-dev.\n\nYou can read more about them at https://developer.atlassian.com/blog/2016/04/cloud-ecosystem-dev-env/.\n\n## Releasing\n\nInstall [standard-version](https://github.com/conventional-changelog/standard-version)\n```bash\nnpm i -g standard-version\n```\n\n```bash\nstandard-version\ngit push --tags\n```\n\nManually copy/paste text from changelog (for this new version) into the release on Github.com. E.g.\n\n[https://github.com/ManoManoTech/go-jira-fix-api/releases/edit/v1.11.0](https://github.com/ManoManoTech/go-jira-fix-api/releases/edit/v1.11.0)\n\n## License\n\nThis project is released under the terms of the [MIT license](http://en.wikipedia.org/wiki/MIT_License).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanomanotech%2Fgo-jira-fix-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanomanotech%2Fgo-jira-fix-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanomanotech%2Fgo-jira-fix-api/lists"}