Skip to content

Commit

Permalink
depwatcher: use github-token for githuby deps
Browse files Browse the repository at this point in the history
manually built and pushed to coredeps/depwatcher
  • Loading branch information
arjun024 committed Feb 27, 2025
1 parent 06385f9 commit 00e62ae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dockerfiles/depwatcher/src/check.cr
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ data = JSON.parse(STDIN)
STDERR.puts data.to_json
source = data["source"]

if source.as_h.has_key?("github_token")
token = source["github_token"].to_s
ENV["OAUTH_AUTHORIZATION_TOKEN"] = token
end

case type = source["type"].to_s
when "github_releases"
allow_prerelease = source["prerelease"]?
Expand Down
5 changes: 5 additions & 0 deletions dockerfiles/depwatcher/src/in.cr
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ STDERR.puts data.to_json
source = data["source"]
version = data["version"]

if source.as_h.has_key?("github_token")
token = source["github_token"].to_s
ENV["OAUTH_AUTHORIZATION_TOKEN"] = token
end

case type = source["type"].to_s
when "github_releases"
version = if source["fetch_source"]? == JSON.parse("true")
Expand Down

0 comments on commit 00e62ae

Please sign in to comment.