Back to all reviewers

Use async/await pattern

octokit/octokit.net
Based on 4 comments
Markdown

When designing or documenting API clients, always use the async/await pattern rather than blocking calls. Replace code that uses `.GetAwaiter().GetResult()` with proper async/await syntax to prevent potential deadlocks and improve application responsiveness.

API Markdown

Reviewer Prompt

When designing or documenting API clients, always use the async/await pattern rather than blocking calls. Replace code that uses .GetAwaiter().GetResult() with proper async/await syntax to prevent potential deadlocks and improve application responsiveness.

Example:

// Instead of this:
Repository octokitRepo = ghClient.Repository.Get("octokit", "ocktokit.net").GetAwaiter().GetResult();

// Use this:
var octokitRepo = await ghClient.Repository.Get("octokit", "ocktokit.net");

Additionally, ensure method names clearly describe their API operation (e.g., ‘CreatePullRequestFromFork’ instead of ‘CreatePR’) to improve code readability and API usability.

4
Comments Analyzed
Markdown
Primary Language
API
Category

Source Discussions