jq is useful to slice, filter, map and transform structured json data.
brew install jq
| #!/usr/bin/env php | |
| <?php | |
| if ($argc < 3) { | |
| die("Usage: ./jtt.php ISSUE-1 30m optional comment here\n"); | |
| } | |
| $username = 'EMAIL_GOES_HERE'; | |
| $token = 'API_KEY_HERE'; // see https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-basic-authentication/ | |
| $team = 'TEAM_NAME_HERE'; |
| <?php | |
| use GuzzleHttp\Client; | |
| use GuzzleHttp\Exception\ConnectException; | |
| use GuzzleHttp\Exception\RequestException; | |
| use GuzzleHttp\Handler\CurlHandler; | |
| use GuzzleHttp\HandlerStack; | |
| use GuzzleHttp\Psr7\Request as Psr7Request; | |
| use GuzzleHttp\Psr7\Response as Psr7Response; | |
| use Psr\Log\LoggerInterface; | |
| const MAX_RETRIES = 2; |