Skip to content

Commit

Permalink
utils/github/artifacts: Bump to Sorbet typed: strict
Browse files Browse the repository at this point in the history
  • Loading branch information
issyl0 committed Jul 17, 2024
1 parent 5b84ee0 commit 07f9f3f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Library/Homebrew/utils/github/artifacts.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: strict
# frozen_string_literal: true

require "download_strategy"
Expand All @@ -24,12 +24,14 @@ def self.download_artifact(url, artifact_id)

# Strategy for downloading an artifact from GitHub Actions.
class GitHubArtifactDownloadStrategy < AbstractFileDownloadStrategy
sig { params(url: String, artifact_id: String, token: String).void }
def initialize(url, artifact_id, token:)
super(url, "artifact", artifact_id)
@cache = HOMEBREW_CACHE/"gh-actions-artifact"
@token = token
@cache = T.let(HOMEBREW_CACHE/"gh-actions-artifact", Pathname)
@token = T.let(token, String)
end

sig { params(timeout: T.nilable(Integer)).void }
def fetch(timeout: nil)
ohai "Downloading #{url}"
if cached_location.exist?
Expand Down

0 comments on commit 07f9f3f

Please sign in to comment.