Skip to content

Commit

Permalink
Merge branch 'master' into fix-github-auth
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdefinitelyahuman authored Apr 16, 2021
2 parents 05a1825 + dd5d6d5 commit 1fee93d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Fixed a formatting issue on the new [environment variable section](https://eth-brownie.readthedocs.io/en/stable/config.html?highlight=POSIX-style#variable-expansion) ([#1038](https://github.com/eth-brownie/brownie/pull/1038))
- Fixed Github package installation failing for private repositories ([#1055](https://github.com/eth-brownie/brownie/pull/1055)).
- Adjusted Github API token error message so that it correctly emits when auth failure occurs ([#1052](https://github.com/eth-brownie/brownie/pull/1052))


## [1.14.4](https://github.com/eth-brownie/brownie/tree/v1.14.4) - 2021-04-05
### Added
Expand Down
10 changes: 6 additions & 4 deletions brownie/project/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -836,9 +836,10 @@ def _install_from_github(package_id: str) -> str:
msg = "Status {} when getting package versions from Github: '{}'".format(
response.status_code, response.json()["message"]
)
if response.status_code == 403:
if response.status_code in (403, 404):
msg += (
"\n\nIf this issue persists, generate a Github API token and store"
"\n\nMissing or forbidden.\n"
"If this issue persists, generate a Github API token and store"
" it as the environment variable `GITHUB_TOKEN`:\n"
"https://github.blog/2013-05-16-personal-api-tokens/"
)
Expand Down Expand Up @@ -1010,10 +1011,11 @@ def _get_mix_default_branch(mix_name: str, headers: Dict[str, str] = REQUEST_HEA
if r.status_code != 200:
status, repo, message = r.status_code, f"brownie-mix/{mix_name}", r.json()["message"]
msg = f"Status {status} when retrieving repo {repo} information from GHAPI: '{message}'"
if r.status_code == 403:
if r.status_code in (403, 404):
msg_lines = (
msg,
"\n\nIf this issue persists, generate a Github API token and store",
"\n\nMissing or forbidden.\n",
"If this issue persists, generate a Github API token and store",
" it as the environment variable `GITHUB_TOKEN`:\n",
"https://github.blog/2013-05-16-personal-api-tokens/",
)
Expand Down

0 comments on commit 1fee93d

Please sign in to comment.