Skip to content

Commit

Permalink
Merge pull request #3 from naijabx/bug/2-fix-uninitialized
Browse files Browse the repository at this point in the history
Fix Action error: uninitialized constant Faraday::Request::Retry  #2
  • Loading branch information
naijab authored Jun 20, 2022
2 parents ea9afa5 + bdf1e0f commit d6a274a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 40 deletions.
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
source 'https://rubygems.org'
ruby '~> 3.0.0'

gem "octokit", "~> 4.0"
gem "octokit", "~> 4.25.0"
gem "faraday-retry", "~> 2.0.0"
40 changes: 14 additions & 26 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,28 @@ GEM
specs:
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
faraday (1.8.0)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0.1)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.1)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
multipart-post (>= 1.2, < 3)
faraday (2.3.0)
faraday-net_http (~> 2.0)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
multipart-post (2.1.1)
octokit (4.21.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
public_suffix (4.0.6)
faraday-net_http (2.0.3)
faraday-retry (2.0.0)
faraday (~> 2.0)
octokit (4.25.0)
faraday (>= 1, < 3)
sawyer (~> 0.9)
public_suffix (4.0.7)
ruby2_keywords (0.0.5)
sawyer (0.8.2)
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
faraday (>= 0.17.3, < 3)

PLATFORMS
arm64-darwin-20
arm64-darwin-21

DEPENDENCIES
octokit (~> 4.0)
faraday-retry (~> 2.0.0)
octokit (~> 4.25.0)

RUBY VERSION
ruby 3.0.2p107
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Update Homebrew Formula Actions

[![version](https://img.shields.io/badge/release-v1-blue)](https://github.com/marketplace/actions/update-homebrew-formula)
[![version](https://img.shields.io/badge/release-v1.1-blue)](https://github.com/marketplace/actions/update-homebrew-formula)

> use for github actions to update homebrew formula
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
formula: Formula/hello.rb
download-url: https://github.com/example/hello/releases/download/${{ steps.get_version.outputs.version }}/hello-${{ steps.get_version.outputs.version }}-macos-x64.tar.gz
sha256: xxxxxxxxxxxxx
commit-message: update hello formula
commit-message: update hello formula
env:
COMMIT_TOKEN: ${{ secrets.COMMIT_TOKEN }}
```
11 changes: 0 additions & 11 deletions entrypoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,6 @@
raise "missing argument: -d/--download-url" unless options[:download_url]
raise "missing argument: -s/--sha256" unless options[:sha256]

Octokit.middleware = Faraday::RackBuilder.new do |builder|
builder.use Faraday::Request::Retry, exceptions: [Octokit::ServerError]
builder.use Faraday::Response::RaiseError
builder.use Octokit::Middleware::FollowRedirects
builder.use Octokit::Response::FeedParser
builder.response :logger, logger, log_level: :debug do |logger|
logger.filter(/(Authorization\: )(.+)/, '\1[REDACTED]')
end
builder.adapter Faraday.default_adapter
end

client = Octokit::Client.new(access_token: ENV["COMMIT_TOKEN"])

repo = client.repo(options[:repository])
Expand Down

0 comments on commit d6a274a

Please sign in to comment.