From 37f34fdff090806b8b933aede2013945085ba0cb Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Sun, 30 Oct 2022 09:41:53 +0000 Subject: [PATCH] fix: GITHUB_ => GH_ + linting Signed-off-by: Jakub Mucha --- README.md | 6 +++++- docker-compose.ci.yml | 5 +++-- docker-compose.yml | 5 +++-- helpers.js | 6 +++--- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e80ab23bf..f41fb77bc 100644 --- a/README.md +++ b/README.md @@ -233,7 +233,11 @@ following features: - [playwright debugger](https://playwright.dev/docs/debug) - slow down tests -You may encounter 403 errors (on shared IPs & CI) related to rate limiting while fetching metamask releases from GitHub REST API. This should never happen at all, but it's good to mention. To prevent it from happening, you can create new private access token on GitHub (without any additional access) and specify `GITHUB_USERNAME` & `GITHUB_PAT` environmental variables. +You may encounter 403 errors (on shared IPs & CI) related to rate limiting while +fetching metamask releases from GitHub REST API. This should never happen at +all, but it's good to mention. To prevent it from happening, you can create new +private access token on GitHub (without any additional access) and specify +`GH_USERNAME` & `GH_PAT` environmental variables. ## 🐳 Using with Docker diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml index f1041466a..c05a2f9c3 100644 --- a/docker-compose.ci.yml +++ b/docker-compose.ci.yml @@ -23,7 +23,8 @@ services: bash -c 'echo -n "======> local noVNC URL: http://localhost:8080/vnc.html?autoconnect=true " && npx wait-on http://display:8080 && echo -n "======> remote noVNC URL: " && curl -s - ngrok:4040/api/tunnels | jq -r .tunnels[0].public_url && yarn test:e2e:anvil' + ngrok:4040/api/tunnels | jq -r .tunnels[0].public_url && yarn + test:e2e:anvil' networks: - x11 @@ -69,7 +70,7 @@ services: foundry: container_name: foundry image: synthetixio/foundry:016121eafdfff448414894d0ca5a50b1d72b62eb-base - command: [ 'anvil --fork-url ${ANVIL_FORK_URL}' ] + command: ['anvil --fork-url ${ANVIL_FORK_URL}'] ports: - '8545:8545' networks: diff --git a/docker-compose.yml b/docker-compose.yml index 428348f92..50839e4d7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,7 +22,8 @@ services: bash -c 'echo -n "======> local noVNC URL: http://localhost:8080/vnc.html?autoconnect=true " && npx wait-on http://display:8080 && echo -n "======> remote noVNC URL: " && curl -s - ngrok:4040/api/tunnels | jq -r .tunnels[0].public_url && yarn test:e2e:anvil' + ngrok:4040/api/tunnels | jq -r .tunnels[0].public_url && yarn + test:e2e:anvil' networks: - x11 @@ -64,7 +65,7 @@ services: foundry: container_name: foundry image: synthetixio/foundry:016121eafdfff448414894d0ca5a50b1d72b62eb-base - command: [ 'anvil --fork-url ${ANVIL_FORK_URL}' ] + command: ['anvil --fork-url ${ANVIL_FORK_URL}'] ports: - '8545:8545' networks: diff --git a/helpers.js b/helpers.js index 19b8bfef6..63e38dd11 100644 --- a/helpers.js +++ b/helpers.js @@ -97,13 +97,13 @@ module.exports = { try { if (version === 'latest' || !version) { - if (process.env.GITHUB_USERNAME && process.env.GITHUB_PAT) { + if (process.env.GH_USERNAME && process.env.GH_PAT) { response = await axios.get( 'https://api.github.com/repos/metamask/metamask-extension/releases', { auth: { - username: process.env.GITHUB_USERNAME, - password: process.env.GITHUB_PAT, + username: process.env.GH_USERNAME, + password: process.env.GH_PAT, }, }, );