Skip to content

Release 0.0.1.138

Latest

Choose a tag to compare

@credfeto credfeto released this 01 May 00:44
· 1698 commits to main since this release
ca5744d

Added

  • GET /ping lightweight health check endpoint returning {"value":"Pong!"} without touching the database
  • docker-compose.yml with port mappings for HTTP (8080) and HTTPS (8081)
  • EXPOSE 8081 added to Dockerfile for the HTTPS Kestrel endpoint
  • .http test file for all server endpoints (localhost:8080)
  • GET /priorities endpoint returning active work items ordered by owner priority, repo priority, type (PRs before issues), urgency, and age
  • Priorities configuration section with Owners and Repos arrays to control ordering
  • WorkPriority enum (Unknown, Low, Medium, High, Urgent) derived from GitHub labels
  • Priority and on-hold state stored per pull request and issue in the database
  • HasLinkedPr flag stored per issue to exclude issues that already have a linked pull request
  • Kestrel HTTP (port 8080) and HTTPS (port 8081, requires server.pfx) endpoints replacing the generic host
  • Initial C# project structure for GitHub to Discord dispatcher
  • GitHub Notifications API polling with ETag caching (zero-cost when idle via 304 Not Modified)
  • Notification filtering by reason, label, owner, and excluded repos
  • Discord outbound webhook dispatcher
  • DebuggerDisplay attributes on all data types and value classes
  • One-type-per-file convention for all C# source files
  • LabelFilter and NoWorkFilter as arrays in configuration
  • AllowedOwners and ExcludedRepos filter options for repo-level filtering
  • GitHubOptionsValidator to validate GitHub API token is configured and PollIntervalSeconds is at least 30
  • DiscordOptionsValidator to validate Discord WebhookUrl is configured
  • Standard resilience handler (retry with exponential backoff, circuit breaker, timeout) via Microsoft.Extensions.Http.Resilience on both GitHub and Discord HTTP clients
  • Documentation instructions for keeping README.md configuration section up-to-date when configuration options change
  • Structured ILogger<T> logging throughout the polling and dispatch pipeline: worker startup/shutdown, poll cycles (ETag sent, 304 Not Modified or notification count), per-notification debug entries, filter pass/drop decisions, dispatch to Discord, and Discord webhook non-success warnings
  • Post startup and GitHub auth status messages to Discord on launch
  • AllowedRepos filter option to restrict notifications to specific repositories only
  • Pull request detail enrichment: IPullRequestDetailFetcher service that fetches PR title, status (Open/Draft/Closed), assignees, labels, latest comment (for comment reason), last CHANGES_REQUESTED review (for review_requested reason), and failed CI workflow run (for ci_activity reason)
  • DiscordEmbedField type and Fields collection on DiscordEmbed to support Discord embed field sections
  • Rich PR notification embeds in Discord with Status, Reason, Assignees, Labels, and context-specific fields
  • FixedResponseHandler HTTP test helper and comprehensive PullRequestDetailFetcherTests covering all enrichment paths, status determination, body truncation, and error cases
  • PR number, reason, and HTML URL included in the Discord message Content field for pull request notifications, making them actionable without reading the embed (e.g. [owner/repo] PR #42 (mention) https://github.com/owner/repo/pull/42)
  • GitHubPollingWorkerTests covering Content field format, fallback to basic message when fetcher returns null, issue notification format, and filtered notification not dispatched
  • SQLite database infrastructure using Entity Framework Core with automatic migration on startup; data folder created next to the application executable and git-ignored
  • Persist GitHub notifications API ETag in database to resume polling after restart (#21)
  • Track notification state (open/closed) for pull requests and issues in database to suppress repeated Discord notifications for already-closed items (#26)
  • Rich issue notification embeds in Discord with Status, Reason, Assignees, Labels, and Linked PR fields; IssueDetails enriched with Assignees, Labels, and LinkedPullRequestUrl populated from the GitHub Issues API (#16)

Fixed

  • EF Core SQLite cannot translate DateTimeOffset <= comparisons when stored as TEXT; store DispatchAfter, QueuedAt, and UpdatedAt as long (UtcTicks) with INTEGER column type
  • Removed unused Mediator runtime package reference from Credfeto.Dispatcher.Server — Mediator.SourceGenerator source generator is sufficient; no separate runtime package is needed for a simple background service
  • Updated gitleaks configuration to suppress false positive secret detection caused by logging extension class name matching the GitHub token regex pattern

Changed

  • Configure HttpClient base address, User-Agent, Accept, X-GitHub-Api-Version, and Authorization headers at registration time via IHttpClientFactory rather than per request
  • Renamed IGitHubNotificationPoller to INotificationPoller and implementation to NotificationPoller
  • Moved internal GitHub API model types to Models namespace and removed GitHub prefix from type names
  • Replaced try/finally pattern with using declaration for HttpResponseMessage disposal
  • Updated X-GitHub-Api-Version header to 2026-03-10
  • Simplified DiscordWebhookDispatcher.SendAsync to use PostAsync directly instead of manually building HttpRequestMessage
  • Dependencies - Updated Credfeto.Enumeration to 1.2.141.1822
  • Dependencies - Updated Credfeto.Version.Information.Generator to 1.0.123.1157
  • Dependencies - Updated FunFair.CodeAnalysis to 7.1.39.1841
  • Dependencies - Updated Meziantou.Analyzer to 3.0.54
  • Dependencies - Updated SonarAnalyzer.CSharp to 10.24.0.138807
  • Dependencies - Updated Credfeto.Random to 1.0.149.1635
  • Dependencies - Updated Credfeto.Services.Startup to 1.1.144.1565
  • Dependencies - Updated Microsoft.Extensions to 10.0.7

What's Changed

  • chore(ai): sync global AI instructions from cs-template by @dnyw4l3n13 in #2
  • feat: initial C# project structure for GitHub to Discord dispatcher by @dnyw4l3n13 in #1
  • refactor: use IHttpClientFactory for all HttpClient instances by @dnyw4l3n13 in #5
  • feat: add structured logging throughout polling and dispatch pipeline by @dnyw4l3n13 in #11
  • feat: post startup and GitHub auth status messages to Discord on launch by @dnyw4l3n13 in #12
  • [WIP] Ignore all repos other than credfeto-dispatcher by @Copilot in #18
  • feat: enrich pull request notifications with GitHub API context by @dnyw4l3n13 in #19
  • feat: create SQLite database infrastructure with EF Core migrations by @dnyw4l3n13 in #23
  • feat: persist GitHub notifications API ETag in database by @credfeto in #25
  • fix: Add [DbContext] attribute to migrations so EF Core can discover them at runtime by @credfeto in #27
  • feat: suppress repeated Discord notifications for already-closed PRs and Issues by @Copilot in #26
  • fix: stop spam notifications for closed PRs/issues by @Copilot in #32
  • feat: enrich issue notifications with status, assignees, labels, and linked PR by @Copilot in #33
  • feat: add notification queue with configurable dispatch delay by @dnyw4l3n13 in #41
  • fix: store DateTimeOffset columns as INTEGER ticks (fixes #42) by @dnyw4l3n13 in #44
  • feat(#43): add file-based SQLite integration tests for storage layer by @dnyw4l3n13 in #45
  • feat(#38): add GET /priorities endpoint with Kestrel web host by @github-actions[bot] in #46
  • feat(#38): add GET /ping health check endpoint by @github-actions[bot] in #47

New Contributors

  • @dnyw4l3n13 made their first contribution in #2
  • @Copilot made their first contribution in #18
  • @credfeto made their first contribution in #25
  • @github-actions[bot] made their first contribution in #46

Full Changelog: https://github.com/credfeto/credfeto-dispatcher/commits/v0.0.1.138