diff --git a/README.md b/README.md index 57e90799..267eb738 100644 --- a/README.md +++ b/README.md @@ -63,12 +63,12 @@ JIRA_PASS="jira-password-OR-api-token" # to enable session cookie authorization # COOKIE_AUTH_ENABLED=true ``` -**Note:** + +**Important Note:** As of March 15, 2018, in accordance to the [Atlassian REST API Policy](https://developer.atlassian.com/platform/marketplace/atlassian-rest-api-policy/), Basic auth with password to be deprecated. Instead of password, you should using [API token](https://confluence.atlassian.com/cloud/api-tokens-938839638.html). -**important-note:** If you are using previous versions(a prior v1.2), you should move config.jira.json to .env and will edit it. - +**Laravel Users:** If you are developing with laravel framework(5.x), you must append above configuration to your application .env file. ## use array @@ -84,11 +84,9 @@ $iss = new IssueService(new ArrayConfiguration( 'jiraHost' => 'https://your-jira.host.com', // for basic authorization: 'jiraUser' => 'jira-username', - 'jiraPassword' => 'jira-password', + 'jiraPassword' => 'jira-password-OR-api-token', // to enable session cookie authorization (with basic authorization only) 'cookieAuthEnabled' => true, - // for OAuth authorization: - 'oauthAccessToken' => 'access-token', ) )); ``` @@ -117,6 +115,8 @@ $iss = new IssueService(new ArrayConfiguration( - [Change assignee](#change-assignee) - [Remove issue](#remove-issue) - [Add comment](#add-comment) +- [Get comment](#get-comment) +- [Delete comment](#delete-comment) - [Perform a transition on an issue](#perform-a-transition-on-an-issue) - [Perform an advanced search, using the JQL](#perform-an-advanced-search) - [Simple JQL](#simple-query) @@ -711,6 +711,60 @@ COMMENT; ``` +#### Get comment + +[See Jira API reference](https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/issue-getComments) + +```php +getComments($issueKey); + + var_dump($comments); + +} catch (JiraException $e) { + $this->assertTrue(false, 'get Comment Failed : '.$e->getMessage()); +} + +``` + +#### Delete comment + +[See Jira API reference](https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/issue-deleteComment) + +```php +deleteComment($issueKey, commentId); + +} catch (JiraException $e) { + $this->assertTrue(false, 'Delete comment Failed : '.$e->getMessage()); +} + +``` + #### Perform a transition on an issue Note: this library uses goal **status names** instead of **transition names**.