CircleCI-Public / jira-connect-orb

Display the status of CircleCI workflows and deployments in Jira!
https://circleci.com/orbs/registry/orb/circleci/jira
MIT License
25 stars 27 forks source link

Check ISSUE_KEYS #12

Closed KyleTryon closed 5 years ago

KyleTryon commented 5 years ago

Checklist

Motivation, issues

If a user has not created an issue ticket, the Jira orb will fail but continue to show a success and green build. The only failure check currently is if we get a 200 back from Jira but Jira can send back errors too.

Description

Added if statement at the end of parse_jira_key_array to verify the ISSUE_KEYS are collected.

KyleTryon commented 5 years ago

There is actually a much larger issue than that, sorry I had misunderstood something. I was not checking the response. Fixing now, will still need to be tested.

KyleTryon commented 5 years ago

testing.

KyleTryon commented 5 years ago

Orb circleci/jira@dev:kylet was published.

KyleTryon commented 5 years ago

@eddiewebb Is this ok to be merged?

eddiewebb commented 5 years ago

whoops bin/bash: -c: line 164: syntax error near unexpected token!'`

also tests failing (requires bats) bats tests

let me take a look

eddiewebb commented 5 years ago

Checking text was a bad path since acceptedX and rejectedX are always there, and just may or may not be empty...

I realized since we already require jq, we could do better.

Now checks length of accepted objects (build or deploy must be there) and pretty-prints the error message if not.

Fail - https://circleci.com/gh/eddiewebb/circleci-samples/594 Pass - https://circleci.com/gh/eddiewebb/circleci-samples/591