Skip to content
Discussion options

You must be logged in to vote

If anyone else stumbles into this issue I worked around it by passing a random string query parameter to invalidate browser cache

await octokit.rest.codespaces.listInRepositoryForAuthenticatedUser({
        owner: this.state.codespacesConfig.ghBridgeRepoOwner,
        repo: this.state.codespacesConfig.ghBridgeRepoName,
        // Sending a random param to invalidate browser cache as GH seems to be sending
        // wrong cache signals in this API
        test: Math.random().toString(36).slice(2, 12),
});

https://github.com/ronakj/ado-gh-codespaces-extension/blob/e1c79983b9cc69e64f9037d3e534f72db0a01204/src/ExtensionComponents/CodespacesHub/CodespacesHub.tsx#L391C7-L397C10

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ronakj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug GitHub or a GitHub feature is not working as intended API and Webhooks Discussions related to GitHub's APIs or Webhooks Codespaces Your development environment, in the cloud. Run VS Code and code on GitHub's cloud platform, Product Feedback Share your thoughts and suggestions on GitHub features and improvements
1 participant