mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 15:58:50 +00:00
Merge commit '520974e05211e988b0447f7f29e88798b1794bcf' into glitch-soc/merge-upstream
Conflicts: - `app/serializers/rest/status_serializer.rb`: Not a real conflict, just glitch-soc code textually adjacent to code added upstream.
This commit is contained in:
@@ -23,7 +23,7 @@ module Mastodon
|
||||
|
||||
def announce_countdown
|
||||
WARNING_SECONDS.downto(1) do |i|
|
||||
say "Continuing in #{i} second#{i == 1 ? '' : 's'}...", true
|
||||
say "Continuing in #{i} second#{'s' unless i == 1}...", true
|
||||
sleep 1
|
||||
end
|
||||
end
|
||||
|
||||
@@ -75,7 +75,7 @@ module Mastodon
|
||||
end
|
||||
|
||||
def user_agent
|
||||
@user_agent ||= "Mastodon/#{Version} (#{HTTP::Request::USER_AGENT}; +http#{Rails.configuration.x.use_https ? 's' : ''}://#{Rails.configuration.x.web_domain}/)"
|
||||
@user_agent ||= "Mastodon/#{Version} (#{HTTP::Request::USER_AGENT}; +http#{'s' if Rails.configuration.x.use_https}://#{Rails.configuration.x.web_domain}/)"
|
||||
end
|
||||
|
||||
def version_configuration
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace :repo do
|
||||
response = nil
|
||||
|
||||
loop do
|
||||
response = HTTP.headers('Authorization' => "token #{ENV['GITHUB_API_TOKEN']}").get("https://api.github.com/repos/#{REPOSITORY_NAME}/pulls/#{pull_request_number}")
|
||||
response = HTTP.headers('Authorization' => "token #{ENV.fetch('GITHUB_API_TOKEN')}").get("https://api.github.com/repos/#{REPOSITORY_NAME}/pulls/#{pull_request_number}")
|
||||
|
||||
if response.code == 403
|
||||
sleep_for = (response.headers['X-RateLimit-Reset'].to_i - Time.now.to_i).abs
|
||||
|
||||
Reference in New Issue
Block a user