-
Notifications
You must be signed in to change notification settings - Fork 741
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes accidental deletion of Repository resource from state (#1750)
Currently when the user does not authenticate the provider, refreshing a GithubRepository resource drops it from the state, which is unexpected and very confusing. The root cause of this is: when AnonymousHTTPClient is used, owner == "" and this causes resourceGithubRepositoryRead to issue requests to non-existent URLs such as https://github.com//myrepo and subsequently interpret 404 as a reason to drop the resource from the state. The suggested fix consults the resource data to infer the appropriate owner to use instead of the empty owner. Co-authored-by: Keegan Campbell <me@kfcampbell.com>
- Loading branch information
1 parent
b831318
commit 2dfebfe
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters