@samitouri / QOS-React-2 / commits / 5cbe6258bc

Remove unnecessary CIRCLE_CI_API_TOKEN checks (#26499)

Token is not required for GET

Mengdi Chen committed Mar 28, 2023 at 16:31 UTC 5cbe6258bc436b1683080a6d978c27849f1d9a22
3 files changed +2 -20
packages/react-devtools-inline/README.md
-2
@@ -354,8 +354,6 @@ yarn
354 ./download-experimental-build.js --commit=main
355 ```
356
357 -Please note that you might need to [create a Circle CI API Token](https://circleci.com/docs/2.0/managing-api-tokens/) and set up an environment variable `CIRCLE_CI_API_TOKEN`.
358 -
357 ## Build steps
358 Once the above packages have been built or downloaded, you can watch for changes made to the source code and automatically rebuild by running:
359 ```sh
scripts/release/shared-commands/download-build-artifacts.js
+1 -7
@@ -22,15 +22,9 @@ const run = async ({build, cwd, releaseChannel}) => {
22 }
23
24 // Download and extract artifact
25 - const {CIRCLE_CI_API_TOKEN} = process.env;
26 - if (CIRCLE_CI_API_TOKEN == null) {
27 - throw new Error(
28 - `Expected a CircleCI token to download artifacts, got ${CIRCLE_CI_API_TOKEN}`
29 - );
30 - }
25 await exec(`rm -rf ./build`, {cwd});
26 await exec(
33 - `curl -L $(fwdproxy-config curl) ${buildArtifacts.url} -H "Circle-Token: ${CIRCLE_CI_API_TOKEN}" | tar -xvz`,
27 + `curl -L $(fwdproxy-config curl) ${buildArtifacts.url} | tar -xvz`,
28 {
29 cwd,
30 }
scripts/release/utils.js
+1 -11
@@ -59,18 +59,8 @@ const extractCommitFromVersionNumber = version => {
59 };
60
61 const getArtifactsList = async buildID => {
62 - const {CIRCLE_CI_API_TOKEN} = process.env;
63 - if (CIRCLE_CI_API_TOKEN == null) {
64 - throw new Error(
65 - `Expected a CircleCI token to download artifacts, got ${CIRCLE_CI_API_TOKEN}`
66 - );
67 - }
62 const jobArtifactsURL = `https://circleci.com/api/v1.1/project/github/facebook/react/${buildID}/artifacts`;
69 - const jobArtifacts = await fetch(jobArtifactsURL, {
70 - headers: {
71 - 'Circle-Token': CIRCLE_CI_API_TOKEN,
72 - },
73 - });
63 + const jobArtifacts = await fetch(jobArtifactsURL);
64 return jobArtifacts.json();
65 };
66