Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove accidental caching from repo list and other commands #5943

Merged
merged 1 commit into from
Jul 14, 2022

Conversation

mislav
Copy link
Contributor

@mislav mislav commented Jul 14, 2022

Any gh command that has invoked NewCachedHTTPClient has also inadvertently enabled caching for the original http.Client due to the nature that NewCachedHTTPClient mutates the original argument passed. As a consequence, running the same command repeatedly would produce the same stale result.

Commands that were accidentally cached:

  • repo list/repo edit
  • pr checkout/close/comment/diff/edit/merge/ready/reopen/review/view
  • issue create/pr create
  • status

Fixes #5940, fixes #5938
Followup to #5614

Any gh command that has invoked NewCachedHTTPClient has also
inadvertently enabled caching for the original `http.Client` due to the
nature that NewCachedHTTPClient mutates the original argument passed.
@mislav mislav requested a review from a team as a code owner July 14, 2022 17:12
@mislav mislav requested review from vilmibm and removed request for a team July 14, 2022 17:12
@cliAutomation cliAutomation added this to Needs review 🤔 in The GitHub CLI Jul 14, 2022
@mislav mislav merged commit 25756aa into trunk Jul 14, 2022
The GitHub CLI automation moved this from Needs review 🤔 to Pending Release 🥚 Jul 14, 2022
@mislav mislav deleted the uncache-http-client branch July 14, 2022 17:17
@github-actions github-actions bot moved this from Pending Release 🥚 to Done 💤 in The GitHub CLI Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
The GitHub CLI
  
Done 💤
Development

Successfully merging this pull request may close these issues.

'gh repo list' not updating gh repo list --json name
1 participant