Skip to content

Commit e9c236d

Browse files
feat: change token value (#9)
1 parent bbf2495 commit e9c236d

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The purpose of this Orb is to add a concept of a queue to specific branch workfl
1111

1212
## Configuration Requirements
1313

14-
In order to use this orb you will need to export a `CIRCLECI_TOKEN` secret added to a context of your choosing. It will authentcation against the CircleCI API to check on workflow status. (see: https://circleci.com/docs/api/v2/index.html#section/Authentication)
14+
In order to use this orb you will need to export a `CIRCLECI_API_TOKEN` secret added to a context of your choosing. It will authentcation against the CircleCI API to check on workflow status. (see: https://circleci.com/docs/api/v2/index.html#section/Authentication)
1515

1616
---
1717

src/examples/example.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ usage:
1010
- workflow-queue/queue:
1111
name: workflow-queue
1212
context: <context-key>
13-
circleci-api-key: <CIRCLECI_API_TOKEN>
1413
only-on-branch: main

src/scripts/queue.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ load_variables(){
2020
: "${CIRCLE_REPOSITORY_URL:?"Required Env Variable not found!"}"
2121
: "${CIRCLE_JOB:?"Required Env Variable not found!"}"
2222
# Only needed for private projects
23-
if [ -z "${CIRCLECI_TOKEN}" ]; then
24-
echo "CIRCLECI_TOKEN not set. Private projects will be inaccessible."
23+
if [ -z "${CIRCLECI_API_TOKEN}" ]; then
24+
echo "CIRCLECI_API_TOKEN not set. Private projects will be inaccessible."
2525
else
2626
fetch "https://circleci.com/api/v2/me" "/tmp/me.cci"
2727
me=$(jq -e '.id' /tmp/me.cci)
@@ -36,7 +36,7 @@ fetch(){
3636
method=${3:-GET}
3737
debug "Performing API ${method} Call to ${url} to ${target}"
3838

39-
http_response=$(curl -s -X "${method}" -H "Circle-Token: ${CIRCLECI_TOKEN}" -H "Content-Type: application/json" -o "${target}" -w "%{http_code}" "${url}")
39+
http_response=$(curl -s -X "${method}" -H "Circle-Token: ${CIRCLECI_API_TOKEN}" -H "Content-Type: application/json" -o "${target}" -w "%{http_code}" "${url}")
4040
if [ "${http_response}" != "200" ]; then
4141
echo "ERROR: Server returned error code: ${http_response}"
4242
debug "${target}"

0 commit comments

Comments
 (0)