Skip to content

Commit

Permalink
correct klint
Browse files Browse the repository at this point in the history
  • Loading branch information
subhajitxyz committed Nov 11, 2024
1 parent a43c39f commit e01392b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class GitHubClient(
private fun fetchOpenIssues(pageNumber: Int): Deferred<List<GitHubIssue>> {
return CoroutineScope(scriptBgDispatcher).async {
val call = gitHubService
.fetchOpenIssues(repoOwner, repoName, authorizationBearer, pageNumber,false)
.fetchOpenIssues(repoOwner, repoName, authorizationBearer, pageNumber, false)
// Deferred blocking I/O operation to the dedicated I/O dispatcher.
val response = withContext(Dispatchers.IO) { call.execute() }
check(response.isSuccessful()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -808,15 +808,21 @@ class TodoOpenCheckTest {
assertThat(outContent.toString().trim()).isEqualTo(failureMessage)
}

private fun setUpGitHubService(issueNumbers: List<Int>, pullRequestNumbers: List<Int> = emptyList()) {
private fun setUpGitHubService(
issueNumbers: List<Int>,
pullRequestNumbers: List<Int> = emptyList()
) {
// Create JSON for issues
val issueJsons = issueNumbers.joinToString(separator = ",") { "{\"number\":$it,\"pull_request\":false}" }
val issueJsons = issueNumbers
.joinToString(separator = ",") { "{\"number\":$it,\"pull_request\":false}" }

// Create JSON for pull requests
val pullRequestJsons = pullRequestNumbers.joinToString(separator = ",") { "{\"number\":$it,\"pull_request\":true}" }
val pullRequestJsons = pullRequestNumbers
.joinToString(separator = ",") { "{\"number\":$it,\"pull_request\":true}" }

// Combine issues and pull requests into one JSON array
val combinedJsons = "[$issueJsons${if (pullRequestNumbers.isNotEmpty()) ", $pullRequestJsons" else ""}]"
val combinedJsons =
"[$issueJsons${if (pullRequestNumbers.isNotEmpty()) ", $pullRequestJsons" else ""}]"

// Set up the MockWebServer
val mockWebServer = MockWebServer()
Expand Down

0 comments on commit e01392b

Please sign in to comment.