Skip to content

Commit

Permalink
Use GITHUB_REF instead of GITHUB_SHA
Browse files Browse the repository at this point in the history
  • Loading branch information
norio-nomura committed Aug 26, 2019
1 parent 15da643 commit 446abe3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/Lib/GitHub.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ extension GitHub.Repository.CheckRun {

extension GitHub.Repository {
public func currentCheckRun() -> CheckRun? {
guard let sha = environment("GITHUB_SHA") else { return nil }
guard let checkRun = findCheckRun(for: sha) else {
print("Current Action not found! GITHUB_SHA: \(sha)")
guard let ref = environment("GITHUB_REF") else { return nil }
guard let checkRun = findCheckRun(for: ref) else {
print("Current Action not found! GITHUB_REF: \(ref)")
return nil
}
return checkRun
Expand Down

0 comments on commit 446abe3

Please sign in to comment.