Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions jira.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ done

# Set the base request command.
basereq="${jiraclicmd} --server ${jiraserver} --user ${jirauser} --password ${jirapass}"
# Set the base API request command.
# Remove trailing slash from jiraserver if present
jiraserver_clean="${jiraserver%/}"
baseapireq="${jiraserver_clean}/rest/api/3/"
7 changes: 4 additions & 3 deletions tracker_automations/component_leads_integration_mover/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,11 @@ function verify_revievers_availability() {
# File where accountID will be stored.
accountfile=${WORKSPACE}/component_leads_integration_mover_accountid.txt
echo -n > "${accountfile}"
${basereq} --action getUser --userEmail ${availableCLR} --quiet --file "${accountfile}" > /dev/null
CLRAccountID=$(cat "${accountfile}")
curl -u ${jirauser}:${jirapass} \
-X GET "${baseapireq}user/search?query=${availableCLR}" > "${accountfile}"
CLRAccountID=$(grep -o '"accountId":"[^"]*"' "${accountfile}" | head -n1 | sed 's/"accountId":"\([^"]*\)"/\1/')
rm "${accountfile}"
availableProfiles+=("[~${CLRAccountID}]")
availableProfiles+=("[~accountId:${CLRAccountID}]")
done
outcomedesc=$(IFS=, ; echo "Sending to CLR, there are available reviewers for the issue: ${availableProfiles[*]}")
return # Outcome set, and function finished we are done.
Expand Down
Loading