app/models/commit_status.rb
# Gets a reference's state, combining results from both the Status API, Checks API
# @return [Hash]
Gets a reference's state, combining results from both the Status API, Checks API
Gets a reference ' s state combining results from both the Status API Checks API
def github_combined_status
    expires_in = ->(reply) { cache_duration(reply) }
    Samson::DynamicTtlCache.cache_fetch_if true, cache_key(@commit), expires_in: expires_in do
      results = Samson::Parallelizer.map(
        [
          -> { octokit_error_as_status('checks') { github_check_status } },
          -> { octokit_error_as_status('status') { github_commit_status } }
        ],
        &:call
      ).compact.select { |result| result[:statuses].any? }
      results.empty? ? NO_STATUSES_REPORTED_RESULT.dup : merge_statuses(results)
    end
  end
def github_combined_status expires_in = -> ( reply ) { cache_duration ( reply ) } Samson :: DynamicTtlCache . cache_fetch_if true , cache_key ( @commit ) , expires_in : expires_in do results = Samson :: Parallelizer . map ( [ -> { octokit_error_as_status ( 'checks' ) { github_check_status } } , -> { octokit_error_as_status ( 'status' ) { github_commit_status } } ] , & :call ) . compact . select { | result | result [ :statuses ] . any? } results . empty? ? NO_STATUSES_REPORTED_RESULT . dup : merge_statuses ( results ) end end
Gets a reference's state, combining results from both the Status API, Checks API
Gets a reference ' s state combining results from both the Status API Checks API
None
Hash