{"id":21561672,"url":"https://github.com/testmonitor/jira-client","last_synced_at":"2025-09-07T20:16:32.273Z","repository":{"id":47104472,"uuid":"222957448","full_name":"testmonitor/jira-client","owner":"testmonitor","description":"This package provides a very basic, convenient, and unified PHP wrapper for Jira.","archived":false,"fork":false,"pushed_at":"2025-09-04T13:45:53.000Z","size":78,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-04T15:31:15.576Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"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/testmonitor.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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}},"created_at":"2019-11-20T14:35:23.000Z","updated_at":"2025-09-04T13:45:57.000Z","dependencies_parsed_at":"2024-03-11T14:43:25.871Z","dependency_job_id":"ed4ceacc-4e80-4444-84df-0b350d0a5bc3","html_url":"https://github.com/testmonitor/jira-client","commit_stats":{"total_commits":34,"total_committers":4,"mean_commits":8.5,"dds":0.4117647058823529,"last_synced_commit":"01c95b906392947bb9879829a619b284102ed440"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/testmonitor/jira-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testmonitor%2Fjira-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testmonitor%2Fjira-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testmonitor%2Fjira-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testmonitor%2Fjira-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/testmonitor","download_url":"https://codeload.github.com/testmonitor/jira-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testmonitor%2Fjira-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273715128,"owners_count":25154974,"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-09-05T02:00:09.113Z","response_time":402,"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":"2024-11-24T09:27:33.938Z","updated_at":"2025-09-07T20:16:32.250Z","avatar_url":"https://github.com/testmonitor.png","language":"PHP","readme":"# TestMonitor Jira Client\n\n[![Latest Stable Version](https://poser.pugx.org/testmonitor/jira-client/v/stable)](https://packagist.org/packages/testmonitor/jira-client)\n[![CircleCI](https://img.shields.io/circleci/project/github/testmonitor/jira-client.svg)](https://circleci.com/gh/testmonitor/jira-client)\n[![StyleCI](https://styleci.io/repos/222957448/shield)](https://styleci.io/repos/222957448)\n[![codecov](https://codecov.io/gh/testmonitor/jira-client/graph/badge.svg?token=2G489JEVA8)](https://codecov.io/gh/testmonitor/jira-client)\n[![License](https://poser.pugx.org/testmonitor/jira-client/license)](https://packagist.org/packages/testmonitor/jira-client)\n\nThis package provides a very basic, convenient, and unified wrapper for Jira.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Examples](#examples)\n- [Tests](#tests)\n- [Changelog](#changelog)\n- [Contributing](#contributing)\n- [Credits](#credits)\n- [License](#license)\n\n## Installation\n\nTo install the client you need to require the package using composer:\n\n    $ composer require testmonitor/jira-client\n\nUse composer's autoload:\n\n```php\nrequire __DIR__.'/../vendor/autoload.php';\n```\n\nYou're all set up now!\n\n## Usage\n\nThis client only supports **oAuth authentication**. You'll need an Atlassian Jira application to proceed. If you haven't done so,\nplease read up with the [Jira authentication docs](https://developer.atlassian.com/console/myapps/) on how\nto create an application.\n\nWhen your Jira application is up and running, start with the oAuth authorization:\n\n```php\n$oauth = [\n    'clientId' =\u003e '12345',\n    'clientSecret' =\u003e 'abcdef',\n    'redirectUrl' =\u003e 'https://redirect.myapp.com/',\n];\n\n$jira = new \\TestMonitor\\Jira\\Client($oauth);\n\nheader('Location: ' . $jira-\u003eauthorizationUrl());\nexit();\n```\n\nThis will redirect the user to a page asking confirmation for your app getting access to Jira. Make sure your redirectUrl points\nback to your app. This URL should point to the following code:\n\n```php\n$oauth = [\n    'clientId' =\u003e '12345',\n    'clientSecret' =\u003e 'abcdef',\n    'redirectUrl' =\u003e 'https://redirect.myapp.com/',\n];\n\n$jira = new \\TestMonitor\\Jira\\Client($oauth);\n\n$token = $jira-\u003efetchToken($_REQUEST['code']);\n```\n\nWhen everything went ok, you should have an access token (available through Token object).\n\nFor any subsequent action, you'll need to retrieve your cloud ID to proceed:\n\n```php\n$oauth = [\n    'clientId' =\u003e '12345',\n    'clientSecret' =\u003e 'abcdef',\n    'redirectUrl' =\u003e 'https://redirect.myapp.com/',\n];\n\n$token = new \\TestMonitor\\Jira\\AccessToken('eyJ0...', '0/34ccc...', 1574601877); // the token you got last time\n$jira = new \\TestMonitor\\Jira\\Client($oauth, null, $token);\n\n$account = $jira-\u003eaccount();\n```\n\nUse the cloud ID as a parameter when instantiating the client:\n\n```php\n$oauth = [\n    'clientId' =\u003e '12345',\n    'clientSecret' =\u003e 'abcdef',\n    'redirectUrl' =\u003e 'https://redirect.myapp.com/',\n];\n\n$token = new \\TestMonitor\\Jira\\AccessToken('eyJ0...', '0/34ccc...', 1574601877);\n$jira = new \\TestMonitor\\Jira\\Client($oauth, $account-\u003eid, $token);\n```\n\nThat's it!\n\nPlease note that the access token will be valid for **one hour**. When it expires, you'll need to refresh it:\n\n```php\nif ($token-\u003eexpired()) {\n    $newToken = $jira-\u003erefreshToken();\n}\n```\n\nThe new token will be valid again for the next hour.\n\n## Examples\n\nRetrieve the details for a project using its key:\n\n```php\n$project = $jira-\u003eproject('KEY');\n```\n\nOr create a new issue using the first available issue type:\n\n```php\n$issueTypes = $jira-\u003eissueTypes('KEY');\n\n$issue = $jira-\u003ecreateIssue(new \\TestMonitor\\Jira\\Resources\\Issue([\n    'summary' =\u003e 'It is time Marty!',\n    'description' =\u003e 'Great Scot!',\n    'project' =\u003e $project,\n    'type' =\u003e $issueType[0],\n]));\n```\n\n## Tests\n\nThe package contains integration tests. You can run them using PHPUnit.\n\n    $ vendor/bin/phpunit\n\n\n## Changelog\n\nRefer to [CHANGELOG](CHANGELOG.md) for more information.\n\n## Contributing\n\nRefer to [CONTRIBUTING](CONTRIBUTING.md) for contributing details.\n\n## Credits\n\n- **Thijs Kok** - _Lead developer_ - [ThijsKok](https://github.com/thijskok)\n- **Stephan Grootveld** - _Developer_ - [Stefanius](https://github.com/stefanius)\n- **Frank Keulen** - _Developer_ - [FrankIsGek](https://github.com/frankisgek)\n\n## License\n\nThe MIT License (MIT). Refer to the [License](LICENSE.md) for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestmonitor%2Fjira-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftestmonitor%2Fjira-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestmonitor%2Fjira-client/lists"}