-------------------------------------------------------------------------------- -- Events -------------------------------------------------------------------------------- local CONSTANTS = { events = { panel_state_updated = "sourcehut_panel_state_updated", builds_state_updated = "sourcehut_builds_state_updated", poller_state_updated = "sourcehut_poller_state_updated" }, panel = { id = "rbdr/sourcehut-builds:panel", theme = { fontSize = { heading = 18 }, fontWeight = { heading = "bold" } } }, bar = { update_interval = 2000 }, poller = { state = { pending = {type= "pending"}, ok = {type= "ok"} }, update_interval = 30000, errors = { request_failed = noctalia.tr("error.request_failed"), bad_response = noctalia.tr("error.bad_response"), unauthorized = noctalia.tr("error.unauthorized") }, cutoff_configuration_key = "recent_cutoff", build_count_configuration_key = "build_count" }, sourcehut = { builds_url = "https://builds.sr.ht/query", web_url = "https://builds.sr.ht/", query = "{\"query\": \"query { me { canonicalName jobs { results { id created updated status note tags tasks { name status } } } } }\"}", token_configuration_key = "sourcehut_api_token", errors = { unauthorized = "ERR_UNAUTHORIZED" } } } return CONSTANTS