mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
use Async suffix convention on public APIs
This commit is contained in:
parent
95d500c563
commit
5c22d9fd44
4 changed files with 11 additions and 11 deletions
|
|
@ -6,10 +6,10 @@ namespace FilterLists.Agent.Core.Interfaces.Clients
|
|||
{
|
||||
public interface IAgentGitHubClient
|
||||
{
|
||||
Task<IReadOnlyList<Issue>> GetAllIssues(RepositoryIssueRequest repositoryIssueRequest);
|
||||
Task<IReadOnlyList<Issue>> GetAllIssuesAsync(RepositoryIssueRequest repositoryIssueRequest);
|
||||
|
||||
Task<Issue> CreateIssue(NewIssue newIssue);
|
||||
Task<Issue> CreateIssueAsync(NewIssue newIssue);
|
||||
|
||||
Task<Issue> UpdateIssue(int issueNumber, IssueUpdate issueUpdate);
|
||||
Task<Issue> UpdateIssueAsync(int issueNumber, IssueUpdate issueUpdate);
|
||||
}
|
||||
}
|
||||
|
|
@ -32,7 +32,7 @@ protected override async Task Handle(Command request, CancellationToken cancella
|
|||
updateIssue.State = ItemState.Closed;
|
||||
updateIssue.Body = issue.Body +
|
||||
"<h1>Update:</h1>This issue is being closed since all URLs seem to now be valid.";
|
||||
await _gitHubClient.UpdateIssue(issue.Number, updateIssue);
|
||||
await _gitHubClient.UpdateIssueAsync(issue.Number, updateIssue);
|
||||
}
|
||||
|
||||
private async Task<Issue> GetOpenIssueOrNull()
|
||||
|
|
@ -43,7 +43,7 @@ private async Task<Issue> GetOpenIssueOrNull()
|
|||
State = ItemStateFilter.Open,
|
||||
Labels = {AgentBotLabel}
|
||||
};
|
||||
return (await _gitHubClient.GetAllIssues(issueRequest)).FirstOrDefault();
|
||||
return (await _gitHubClient.GetAllIssuesAsync(issueRequest)).FirstOrDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,13 +50,13 @@ private async Task<Issue> GetOpenIssueOrNull()
|
|||
State = ItemStateFilter.Open,
|
||||
Labels = {AgentBotLabel}
|
||||
};
|
||||
return (await _gitHubClient.GetAllIssues(issueRequest)).FirstOrDefault();
|
||||
return (await _gitHubClient.GetAllIssuesAsync(issueRequest)).FirstOrDefault();
|
||||
}
|
||||
|
||||
private async Task<Issue> CreateBaseIssue()
|
||||
{
|
||||
var newIssue = new NewIssue(IssueTitle);
|
||||
return await _gitHubClient.CreateIssue(newIssue);
|
||||
return await _gitHubClient.CreateIssueAsync(newIssue);
|
||||
}
|
||||
|
||||
private async Task UpdateIssue(Issue issue,
|
||||
|
|
@ -69,7 +69,7 @@ private async Task UpdateIssue(Issue issue,
|
|||
updateIssue.AddLabel(DataLabel);
|
||||
updateIssue.Body = await _mediator.Send(new BuildGitHubIssueBody.Command(dataFileUrlValidationResults),
|
||||
cancellationToken);
|
||||
await _gitHubClient.UpdateIssue(issue.Number, updateIssue);
|
||||
await _gitHubClient.UpdateIssueAsync(issue.Number, updateIssue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public AgentGitHubClient(IGitHubClient gitHubClient, IOptions<GitHubSettings> gi
|
|||
_logger = logger;
|
||||
}
|
||||
|
||||
public async Task<IReadOnlyList<Issue>> GetAllIssues(RepositoryIssueRequest repositoryIssueRequest)
|
||||
public async Task<IReadOnlyList<Issue>> GetAllIssuesAsync(RepositoryIssueRequest repositoryIssueRequest)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -39,7 +39,7 @@ public async Task<IReadOnlyList<Issue>> GetAllIssues(RepositoryIssueRequest repo
|
|||
}
|
||||
}
|
||||
|
||||
public async Task<Issue> CreateIssue(NewIssue newIssue)
|
||||
public async Task<Issue> CreateIssueAsync(NewIssue newIssue)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -53,7 +53,7 @@ public async Task<Issue> CreateIssue(NewIssue newIssue)
|
|||
}
|
||||
}
|
||||
|
||||
public async Task<Issue> UpdateIssue(int issueNumber, IssueUpdate issueUpdate)
|
||||
public async Task<Issue> UpdateIssueAsync(int issueNumber, IssueUpdate issueUpdate)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue