Using the GitHub CLI instead of making curl API requests should simplify the code and will be the more reliable and error-prone approach.
https://cli.github.com/
Code:
|
auth_status=$(curl -sL --write-out '%{http_code}' --output /dev/null -H "${AUTH_HEADER}" -H "${HEADER}" "${PULLS_URL}") |
|
PULL_REQUESTS=$(echo "$(curl -sSL -H "${AUTH_HEADER}" -H "${HEADER}" -X GET "${PULLS_URL}${PULL_REQUESTS_QUERY_PARAMS}")" | jq --raw-output '.[] | .head.ref ') |
|
PULL_RESPONSE=$(curl -sSL -H "${AUTH_HEADER}" -H "${HEADER}" -X POST --data "${PULL_RESPONSE_DATA}" "${PULLS_URL}") |
|
curl -sSL -H "${AUTH_HEADER}" -H "${HEADER}" -X PATCH --data "${LABELS_DATA}" "${ISSUE_URL}" |
|
curl -sSL -H "${AUTH_HEADER}" -H "${HEADER}" -X POST --data "${ASSIGNEES_DATA}" "${ASSIGNEES_URL}" |
|
curl -sSL -H "${AUTH_HEADER}" -H "${HEADER}" -X POST --data "${REVIEWERS_DATA}" "${REVIEWERS_URL}" |
Using the GitHub CLI instead of making curl API requests should simplify the code and will be the more reliable and error-prone approach.
https://cli.github.com/
Code:
github-action/entrypoint.sh
Line 93 in c953b17
github-action/entrypoint.sh
Line 115 in c953b17
github-action/entrypoint.sh
Line 133 in c953b17
github-action/entrypoint.sh
Line 166 in c953b17
github-action/entrypoint.sh
Line 183 in c953b17
github-action/entrypoint.sh
Line 213 in c953b17