Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
417-72KI committed Dec 18, 2023
1 parent 937b863 commit 022fd58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dangerfile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let danger = Danger()
// fileImport: DangerfileExtensions/Git+Extension.swift
// fileImport: DangerfileExtensions/OctoKit+Extension.swift

SwiftLint.lint(inline: true)
// SwiftLint.lint(inline: true)

// Make it more obvious that a PR is a work in progress and shouldn't be merged yet
if let github = danger.github {
Expand All @@ -32,7 +32,7 @@ if (danger.warnings + danger.fails).isEmpty,
do {
let repo = github.pullRequest.base.repo
let pullRequestNumber = github.pullRequest.number

let review = try await github.api.postReview(
owner: repo.owner.login,
repository: repo.name,
Expand All @@ -43,5 +43,6 @@ if (danger.warnings + danger.fails).isEmpty,
} catch {
print(error)
danger.fail(error.localizedDescription)
danger.fail("\(error)")
}
}
1 change: 1 addition & 0 deletions DangerfileExtensions/OctoKit+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ extension Octokit {
comments: [Review.Comment] = []
) async throws -> Review {
let router = ReviewRouter.postReview(configuration, owner, repository, pullRequestNumber, commitId, event, body, comments)
print(router)
return try await router.load(dateDecodingStrategy: .formatted(Time.rfc3339DateFormatter), expectedResultType: Review.self)
}
}
Expand Down

0 comments on commit 022fd58

Please sign in to comment.