mirror of
https://github.com/we-promise/sure.git
synced 2026-07-27 20:22:16 +00:00
Revert "Refactor application workflows and update test coverage"
This reverts commit 565e049f89.
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
class Provider::Github
|
||||
CACHE_TTL = 2.hours
|
||||
|
||||
attr_reader :name, :owner, :branch, :client
|
||||
|
||||
def initialize
|
||||
@@ -19,7 +17,7 @@ class Provider::Github
|
||||
|
||||
def fetch_latest_release_notes
|
||||
begin
|
||||
Rails.cache.fetch(release_notes_cache_key, expires_in: CACHE_TTL) do
|
||||
Rails.cache.fetch("latest_github_release_notes", expires_in: 2.hours) do
|
||||
release = client.releases(repo).first
|
||||
if release
|
||||
{
|
||||
@@ -44,8 +42,4 @@ class Provider::Github
|
||||
def repo
|
||||
"#{owner}/#{name}"
|
||||
end
|
||||
|
||||
def release_notes_cache_key
|
||||
"latest_github_release_notes/#{repo}"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user