app/controllers/webhooks/github_controller.rb
#
# The catalog JSON export is built on CI and then deployed manually to
# github pages, which does not seem to trigger a `page_build` notification
# event webhook from github. Therefore, we watch for the successful CI
# status on the default branch instead.
#
The catalog JSON export is built on CI and then deployed manually to
github pages, which does not seem to trigger a `page_build` notification
event webhook from github. Therefore, we watch for the successful CI
status on the default branch instead.
The catalog JSON export is built on CI and then deployed manually to github pages which does not seem to trigger a ` page_build ` notification event webhook from github . Therefore we watch for the successful CI status on the default branch instead .
def build_deployed?(payload)
    default_branch = payload.dig("repository", "default_branch")
    referenced_branches = payload["branches"]&.map { |branch| branch["name"] }
    payload["state"] == "success" && referenced_branches&.include?(default_branch)
  end
def build_deployed? ( payload ) default_branch = payload . dig ( "repository" , "default_branch" ) referenced_branches = payload [ "branches" ] &. map { | branch | branch [ "name" ] } payload [ "state" ] == "success" && referenced_branches &. include? ( default_branch ) end
The catalog JSON export is built on CI and then deployed manually to
github pages, which does not seem to trigger a `page_build` notification
event webhook from github.
The catalog JSON export is built on CI and then deployed manually to github pages which does not seem to trigger a ` page_build ` notification event webhook from github .
payload