mirror of
https://github.com/lukaszraczylo/ghtracker.git
synced 2026-10-12 00:45:38 +00:00
An optional actions block in the config adds buttons to alerts. POST
/api/actions/{id} checks that the repository and the current alert match,
then sends the alert as JSON to the configured webhook with an optional
bearer token. The request refuses cross-site callers like POST /refresh.
GET /api/state lists the actions and merges per-alert status rows from an
optional status_url, cached for 10 seconds. Without an actions block the
API output does not change.
The ghtracker_action_requests_total counter records each result.
36 lines
1.4 KiB
YAML
36 lines
1.4 KiB
YAML
listen: ':8080'
|
|
refresh_interval: 6h # minimum 1m; each cycle costs roughly 6 + 2 per open PR requests per repo
|
|
manual_refresh: true # the Refresh button and POST /refresh, limited to once per 5m; false disables them
|
|
|
|
github:
|
|
app_id: 123456
|
|
private_key_file: /secrets/ghtracker.pem # or set $GHTRACKER_PRIVATE_KEY to the PEM contents
|
|
installation_id: 0 # 0 = discover per repo; needed when repos span several owners
|
|
api_url: https://api.github.com
|
|
|
|
thresholds: # negative disables a check
|
|
pr_warn_after: 48h # non-draft PR open this long = warning
|
|
pr_crit_after: 168h # critical
|
|
issue_stale_after: 720h # no activity this long = warning (aggregated per repo)
|
|
workflow_stuck_after: 6h # queued / in progress this long = warning
|
|
|
|
# Optional buttons on alerts. Each one POSTs the alert as JSON to a webhook. Omit the block to turn the feature off.
|
|
# actions:
|
|
# - id: rerun # [a-z0-9-]+
|
|
# label: Re-run # button text
|
|
# kinds: [workflow_failed] # omit for every alert kind
|
|
# webhook:
|
|
# url: https://example.internal/hooks/rerun
|
|
# token_env: ACTION_TOKEN # env var holding a bearer token; optional
|
|
# timeout: 10s
|
|
# status_url: https://example.internal/hooks/rerun/status # optional
|
|
# confirm: "Run this action for the selected alert?" # optional; omit for no dialog
|
|
|
|
max_items: 100 # per repo, issues and PRs
|
|
concurrency: 2
|
|
|
|
repos:
|
|
- lukaszraczylo/kubemirror
|
|
- lukaszraczylo/semver-generator
|
|
- lukaszraczylo/traefikoidc
|