Make sure that the CircleCI API token is truly required.
Review Request #12482 — Created July 21, 2022 and submitted — Latest diff uploaded
When configuring CircleCI, the API token field is required, but this is
only an aspect of the form field. We ended up running into some
situations (particularly in unit testing) where the integration was
configured but the API token was unset. In this case, we'd end up with
bad requests.This change checks for an empty or missing API token, and preemptively
fails the operation. The error will be logged as well as included in the
status update.
- Tested that attempting to start a request with a missing API token
produced the correct log and error. - Ran unit tests.