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

Curl not using valid token format #76

Closed krestivo-kdinfotech closed 2 years ago

krestivo-kdinfotech commented 2 years ago

Orb version

1.3.1

What happened

Curl failed with code 401. full response below.
{
  "message" : "You must log in first."
}

Exited with code exit status 1

Debug output says

post_to_jira () {
  HTTP_STATUS=$(curl \
  -u "${CIRCLE_TOKEN}:" \
  -s -w "%{http_code}" -o /tmp/curl_response.txt \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -X POST "https://circleci.com/api/v1.1/project/${VCS_TYPE}/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/jira/build" --data @/tmp/jira-status.json)

That does not look like a valid basic auth to me.

Expected behavior

It should post the status. My experience with JIRA basic auth has been that it demands "email@domain.com:token" not "token:" I don't see anything in the documentation for the JIRA orb that states otherwise.