diff options
| author | Rubén Beltrán del Río <jj@r.bdr.sh> | 2026-09-24 21:01:06 +0200 |
|---|---|---|
| committer | Rubén Beltrán del Río <jj@r.bdr.sh> | 2026-09-25 20:16:02 +0200 |
| commit | 628406f0a50e040d4661629446c620a3a495441f (patch) | |
| tree | e1a2b783296b1779a4040b5a7ea55d72547a37e8 /sourcehut-builds/constants.luau | |
Diffstat (limited to 'sourcehut-builds/constants.luau')
| -rw-r--r-- | sourcehut-builds/constants.luau | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/sourcehut-builds/constants.luau b/sourcehut-builds/constants.luau new file mode 100644 index 0000000..5133849 --- /dev/null +++ b/sourcehut-builds/constants.luau @@ -0,0 +1,49 @@ +-------------------------------------------------------------------------------- +-- 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 |