main
rb 16 lines 594 Bytes
Raw
1 # frozen_string_literal: true
2
3 # Runtime switches for the GitHub App PR reviewer. Reviews are on whenever the
4 # App is configured; flipping SIGIT_GITHUB_REVIEWS_ENABLED=false is the kill
5 # switch — it stops new enqueues (webhook controller) AND drains the queued
6 # backlog as no-ops (the job checks again).
7 class GithubReviewConfig
8 def self.enabled?
9 GithubAppService.configured? && ENV.fetch("SIGIT_GITHUB_REVIEWS_ENABLED", "true") != "false"
10 end
11
12 # Onde tier used for reviews (see CloudCatalog).
13 def self.model
14 ENV.fetch("SIGIT_GITHUB_REVIEWS_MODEL", "onde-large")
15 end
16 end