Skip to content

v1.1.0

Choose a tag to compare

@github-actions github-actions released this 16 Nov 21:18
· 4 commits to master since this release
e2525ca

Added

  • Local read-only web panel (PANEL_ADDRESS, e.g. 127.0.0.1:8081): overview with warnings for repositories
    without a webhook secret, the list of connected repositories and their chats, and every chat with its topics
    and event routing. It listens only on loopback unless PANEL_ALLOW_REMOTE=true, rejects non-loopback Host
    headers, accepts only GET/HEAD, never shows secrets, and needs no internet access. Open it through an SSH
    tunnel: ssh -L 8081:127.0.0.1:8081 user@server.

  • Delivery log and deduplication: every incoming webhook is recorded (metadata only) with its result —
    delivered, ignored, rejected, failed or duplicate. A redelivery of an already delivered webhook
    (X-GitHub-Delivery, GitLab Idempotency-Key / X-Gitlab-Event-UUID) is answered with 200 DUPLICATE and
    not posted again. The log is pruned hourly after DELIVERIES_RETENTION_DAYS (default 14, 0 keeps it).

  • Health report: JSON with version, uptime and db / telegram checks; 503 when one fails, with the error.
    The Telegram check uses a getMe probe once a minute and successful sends, never a call per request.

  • Prometheus metrics at /metrics (METRICS_ENABLED, default on): webhooks by platform/event/status, webhook
    handling time, send attempts by result, build info and start time. METRICS_ADDR serves them on a separate
    address such as 127.0.0.1:9090. No new dependencies. Grafana dashboard in docs/grafana-dashboard.json.

  • Docker image on GitHub Container Registry for linux/amd64, linux/arm64 and linux/arm/v7:
    ghcr.io/marensovich/github-gitlab-notifier with tags X.Y.Z, X.Y, latest (stable releases only) and
    edge (every push to development). docker-compose.yml now pulls this image; --build still builds locally.
    The Dockerfile cross-compiles in the build stage instead of emulating the target platform.

  • Golden tests for notifications: every handler is rendered from payload fixtures in
    internal/handler/testdata/<platform>/<event>/ in every language and compared with .golden files
    (go test ./internal/handler -run TestGolden -update regenerates them). All 19 events are covered, including
    force pushes, branch creation/deletion, 50-commit pushes, pull requests from forks, drafts, pre-releases,
    confidential GitLab issues and notes, notes on issues and skipped actions. scripts/scrub-fixture.sh cleans a
    real payload before it becomes a fixture.

  • GitLab confidential issues, comments on them and internal notes are marked with 🔒 "Confidential — visible only
    to project members in GitLab", so the chat sees that the text was not public in the project.

  • New notification look using Telegram rich messages: a heading, the item as a bold link, a compact table of
    repository, branch and other details, long text in an expandable quote, commit and file lists collapsed under a
    summary, coloured buttons ("Open PR", "Compare", "Open run"…) and a footer with the author and the event time,
    shown relative in the reader's language and time zone. If Telegram rejects a rich message, the classic message
    is sent instead (counted in notifier_rich_fallbacks_total). RICH_MESSAGES=false turns rich messages off for
    the whole installation.

  • /configure is a short setup with buttons, edited in place: in a forum chat it asks whether to create topics or
    post everything to the main chat, then every chat picks the new look or the classic one (for old and third-party
    Telegram clients, which show rich messages as unsupported). Current choices are marked with ✓; run it again to
    change them. Only chat administrators can press the buttons. The web panel and /status show each chat's look
    and topic routing; /status also says when the new look is off on the server.

Changed

  • Classic notifications use the same layout as the new look and carry their links as coloured inline buttons.
  • /configure works in regular groups too (it skips the topics step and posts to the main chat) instead of
    refusing them.
  • notifier_messages_sent_total has a format label (rich / classic); dashboards that sum it by
    messenger, result keep working. The Grafana dashboard splits "Messages sent" by format and shows rich fallbacks.
  • Database migration 0003 adds format (default rich) and use_topics (default on) to every chat, so an
    upgraded installation gets the new look with the same routing.
  • GET /health and /webhook/health return the health report (same as the new /healthz) instead of pong,
    and answer 503 when the database or Telegram is not working. Monitors that compared the body with pong
    need to check the status code instead. The installer prints the report when the check fails.
  • The database schema is now versioned (schema_version table, numbered SQL files in storage/migrations/).
    Pending migrations run at start-up, each in its own transaction; a failed one is rolled back and the bot stops
    with the name of the migration. Databases from 1.0.x are recognised and marked as version 1 without changes.
    A database written by a newer version is refused instead of being opened by an older binary.

Fixed

  • Push notifications for created and deleted branches read "Branch deleted to branch …" / "Удалена ветка в ветку …";
    they now say "Deleted branch …" / "Удалена ветка …".
  • Pull requests from forks showed the source branch without its owner (often main → main); they now show
    owner:branch.
  • A slow setMyCommands at start-up (Telegram answering 504 after minutes) kept the webhook port closed until it
    gave up; the command menu is now registered in the background.

What's Changed

  • feat(web): add a local read-only admin panel by @marensovich in #16
  • feat: versioned schema migrations and webhook delivery log by @marensovich in #17
  • feat: add /healthz and Prometheus metrics by @marensovich in #18
  • fix: make /health return the full health report by @marensovich in #19
  • feat: publish a multi-arch Docker image to GHCR by @marensovich in #20
  • test: golden tests for every notification handler (NTF-05) by @marensovich in #21
  • feat: mark confidential GitLab issues and notes by @marensovich in #22
  • feat: rich-message notifications with per-chat look and topics in /configure by @marensovich in #23
  • fix: start webhooks without waiting for the command menu and polish /status by @marensovich in #25
  • Release 1.1.0: rich messages, /configure, web panel, metrics by @marensovich in #26

Full Changelog: v1.0.1...v1.1.0