)]}'
{
  "log": [
    {
      "commit": "46be0967c78b0e60b18b4b9ff3c642ebc96c7e4d",
      "tree": "35db5a5725a69f5913102fe768c4103dc4188a56",
      "parents": [
        "c013134814facb7da15b59c79399ec1939eb6ef9"
      ],
      "author": {
        "name": "philip.zeyliger",
        "email": "philip.zeyliger@gmail.com",
        "time": "Sat Jun 14 17:51:15 2025 +0000"
      },
      "committer": {
        "name": "Philip Zeyliger",
        "email": "philip@bold.dev",
        "time": "Sat Jun 14 11:38:48 2025 -0700"
      },
      "message": "ci: optimize APT package installation by skipping documentation\n\nCo-Authored-By: sketch \u003chello@sketch.dev\u003e\nChange-ID: sf483afee70439c11k\n"
    },
    {
      "commit": "c3ecabb720cbf3fa7bf1372ec8ed449f0b9a4b91",
      "tree": "dc3cbb30ff7f291acfc1522bd0302bf0c0ba4adb",
      "parents": [
        "e08c7ffc8f1ec0cd3899d2fedad79f408b6dc2f9"
      ],
      "author": {
        "name": "Philip Zeyliger",
        "email": "philip@bold.dev",
        "time": "Fri Jun 06 22:29:03 2025 +0000"
      },
      "committer": {
        "name": "Philip Zeyliger",
        "email": "philip@bold.dev",
        "time": "Fri Jun 06 21:09:32 2025 -0700"
      },
      "message": "github: fix discord webhook payload truncation for long commit messages\n\nFix Discord webhook failures caused by overly long commit body content\nthat exceeds Discord embed size limits, preventing notification delivery.\n\nProblem Analysis:\nDiscord webhooks were failing with HTTP 400 errors when commit messages\ncontained extensive body content. The error response {\"embeds\": [\"0\"]}\nindicated the first embed was invalid, typically due to field length\nviolations. Discord enforces strict limits on embed field sizes:\n- Title: 256 characters maximum\n- Description: 4096 characters maximum\n- Field values: 1024 characters maximum\n\nLarge commits with detailed implementation notes, problem analysis, and\ntechnical documentation were exceeding these limits, causing webhook\ndelivery failures and missed commit notifications.\n\nImplementation Changes:\n\n1. Text Truncation Function:\n   - Added truncate_text() with intelligent content preservation\n   - Attempts truncation at paragraph boundaries (double newlines)\n   - Falls back to sentence boundaries (periods with spaces)\n   - Uses ellipsis (...) to indicate truncated content\n   - Ensures truncation only when more than half content remains\n\n2. Field Length Management:\n   - Title truncated to 256 character Discord limit\n   - Description conservatively limited to 2000 characters for safety\n   - Maintains existing field structure and formatting\n   - Preserves commit author and URL fields unchanged\n\n3. Debug Information:\n   - Added payload size reporting in test mode\n   - Character count logging for title and description fields\n   - Enhanced troubleshooting capabilities for future issues\n\n4. Backward Compatibility:\n   - No changes to function signatures or environment variables\n   - Existing webhook URLs and configuration remain unchanged\n   - Short commit messages pass through unmodified\n   - All existing functionality preserved\n\nTechnical Details:\n- Truncation uses string slicing with boundary detection\n- Conservative 2000 character limit provides buffer below Discord\u0027s 4096 limit\n- Test mode provides detailed payload analysis for debugging\n- JSON payload generation unchanged except for field content\n\nBenefits:\n- Reliable Discord notification delivery for all commit types\n- Intelligent content preservation maintains readability\n- Debug capabilities improve webhook troubleshooting\n- Zero configuration changes required for existing setups\n\nTesting:\n- Verified fix resolves HTTP 400 errors for problematic commit e08c7ffc\n- Confirmed short commit messages remain unaffected\n- Tested intelligent truncation at paragraph and sentence boundaries\n- Validated payload size reduction maintains Discord compatibility\n\nThis fix ensures consistent Discord webhook delivery while preserving\nessential commit information through intelligent content truncation.\n\nCo-Authored-By: sketch \u003chello@sketch.dev\u003e\nChange-ID: s1859815462496f8ak\n"
    },
    {
      "commit": "fa306776f93d607b88d4472f06ea788f69507945",
      "tree": "ab2cb9324ed5dda09b2d6276779bedf922e759cd",
      "parents": [
        "217e987e1c8d16907849e1f8ba7e5dd8ad4af052"
      ],
      "author": {
        "name": "Josh Bleecher Snyder",
        "email": "josharian@gmail.com",
        "time": "Wed May 28 09:37:04 2025 -0700"
      },
      "committer": {
        "name": "Josh Bleecher Snyder",
        "email": "josharian@gmail.com",
        "time": "Wed May 28 10:36:09 2025 -0700"
      },
      "message": ".github/scripts: include commit body, cut pointless title, repo"
    },
    {
      "commit": "f178755c781c74ef242762ceb2c707c9a4dd2676",
      "tree": "5a4dae9bd281ae0ff138cfb72a6883633bac2b22",
      "parents": [
        "a9948c03ce510e5f7aa08c266c9a7b11f817b958"
      ],
      "author": {
        "name": "Philip Zeyliger",
        "email": "philip@bold.dev",
        "time": "Wed May 28 02:44:39 2025 +0000"
      },
      "committer": {
        "name": "Philip Zeyliger",
        "email": "philip@bold.dev",
        "time": "Wed May 28 02:44:39 2025 +0000"
      },
      "message": "github: fix Discord webhook notification User-Agent rejection\n\nThe Discord webhook was failing with 403 Forbidden (error code 1010)\nwhen sending notifications because Discord was rejecting requests from\nPython\u0027s default urllib User-Agent header.\n\nThe issue was that urllib.request.Request was using Python\u0027s default\nUser-Agent which Discord treats as suspicious or automated traffic.\nWhile simple curl requests worked fine, the Python script consistently\nfailed with \u0027Webhook not found\u0027 errors.\n\nFix:\n- Add explicit User-Agent header \u0027sketch.dev developers\u0027 to HTTP request\n- This allows Discord to properly identify the request as a legitimate webhook client\n\nTesting confirmed the fix:\n- Before: 403 Forbidden with error code 1010\n- After: 204 No Content (successful webhook delivery)\n\nThe Discord embed payload structure was already correct - only the\nUser-Agent header was causing the rejection.\n\nCo-Authored-By: sketch \u003chello@sketch.dev\u003e\n\nChange-ID: sc716013db28856a0k\n"
    },
    {
      "commit": "a9948c03ce510e5f7aa08c266c9a7b11f817b958",
      "tree": "1990e647ef8261d8d4cafa1f835db1f961d3fc39",
      "parents": [
        "a09d6389c9c1baf859ab4bcd03fe93aa7f52258d"
      ],
      "author": {
        "name": "Philip Zeyliger",
        "email": "philip@bold.dev",
        "time": "Tue May 27 19:29:47 2025 -0700"
      },
      "committer": {
        "name": "Philip Zeyliger",
        "email": "philip@bold.dev",
        "time": "Tue May 27 19:29:47 2025 -0700"
      },
      "message": "Remove CI\u003d1 requirement for discord_notify.\n"
    },
    {
      "commit": "9e3c867ad3ae20dd6d6261d4242b802c993939e3",
      "tree": "e9057a65d258f624725691a28654282b2dae9748",
      "parents": [
        "3d2eff03a428424a31173b0f30f3d647a570b455"
      ],
      "author": {
        "name": "Philip Zeyliger",
        "email": "philip@bold.dev",
        "time": "Tue May 27 17:09:14 2025 +0000"
      },
      "committer": {
        "name": "Philip Zeyliger",
        "email": "philip@bold.dev",
        "time": "Tue May 27 18:13:33 2025 -0700"
      },
      "message": "github: add Discord webhook notification for main branch commits\n\nCreates a GitHub Actions workflow that sends Discord notifications when\ncommits are pushed to the main branch. The implementation prioritizes\nclean separation between workflow orchestration and notification logic.\n\nArchitecture:\n- .github/workflows/discord-notify.yml: Minimal workflow with single\n  Python script execution\n- .github/scripts/discord_notify.py: Self-contained script handling all\n  commit extraction, JSON generation, and webhook delivery\n\nFeatures:\n- Triggers only on pushes to main branch\n- Extracts commit information using git subprocess calls\n- Generates Discord embed with commit message, author, SHA, and link\n- Safe JSON serialization handles quotes, newlines, and special characters\n- Robust environment validation (requires CI\u003d1 and GITHUB_SHA)\n- Proper HTTP error handling with status code checking\n\nThe webhook sends rich embeds to Discord with commit details including\nclickable commit links and properly formatted timestamps. All shell\nscripting is avoided in the YAML file - the workflow simply executes\nthe Python script which handles everything else.\n\nWebhook URL points to the provided Discord channel endpoint.\n\nCo-Authored-By: sketch \u003chello@sketch.dev\u003e\nChange-ID: s82b63953ab6ceccbk\n"
    }
  ]
}
