Skip to content

Commit

Permalink
add pull request crawler time trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
markti committed Sep 6, 2023
1 parent 706a648 commit 6331513
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/dotnet/GitHubCrawler/GitHubCrawler/GitHubCrawlerFunction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,25 @@ public async Task<IActionResult> GeneratePullRequestSummary(

return new OkResult();
}

[FunctionName("repo-pull-request-crawler")]
public async Task GeneratePullRequestHistory([TimerTrigger("0 0 0 * * *")] TimerInfo myTimer)
{
var projectList = _gitHubProjectService.GetProjects();

var repoSummaryList = new List<RepositorySummary>();

foreach (var project in projectList)
{
var pageRequest = new ProcessRepositoryPageRequest()
{
Owner = project.Owner,
Repo = project.Repo,
PageNumber = 1
};

await _fanoutRequestProcessor.ProcessRepoPullRequestHistoryAsync(pageRequest);
}
}
}
}

0 comments on commit 6331513

Please sign in to comment.