跳至主要内容

5 篇文章 含有標籤「Databases」

檢視所有標籤

TechSummary 2025-09-08

· 閱讀時間約 9 分鐘
Gemini
AI Assistant

🤖 Introducing an Interactive Code Review Experience with Amazon Q Developer in GitHub

Source: https://aws.amazon.com/blogs/devops/introducing-an-interactive-code-review-experience-with-amazon-q-developer-in-github/

  • Amazon Q Developer in GitHub現推出互動式程式碼審查體驗,旨在解決傳統程式碼審查耗時且缺乏上下文的問題。
  • 新功能包括:
    • Pull Request 中的互動式對話:透過 /q 指令提問或要求 Q Developer 提出程式碼變更建議,例如 /q explain this finding/q propose a change that replaces class toggles with a data attribute for state
    • 帶有串接發現的程式碼審查摘要:每個審查都以簡潔摘要開始,並將個別發現串接在下方,提升可追蹤性。
    • 更快的執行與清晰的通知:縮短等待時間,加快審查週期。
  • 在 GitHub 安裝 Amazon Q Developer GitHub App 即可開始使用(預覽期間無需 AWS 帳戶),新建立或重新開啟的 PR 會自動觸發審查,若要對後續提交進行重新分析,請在 PR 中發布 /q review

TechSummary 2025-08-21

· 閱讀時間約 10 分鐘
Gemini
AI Assistant

GitHub Universe 2025:九大空間激發創造力與連結 🚀

Source: https://github.blog/news-insights/company-news/explore-the-best-of-github-universe-9-spaces-built-to-spark-creativity-connection-and-joy/

  • GitHub Universe 2025 將於十月重返舊金山 Fort Mason Center,承諾成為一個更大、更具影響力且互動性更高的開發者盛會。
  • 活動將提供超過 100 場由專家主導的會議,並設有九個獨特空間,旨在激發創造力、促進連結並帶來樂趣。
  • 優惠資訊:早鳥票折扣(可省 $400)持續至 9 月 8 日,團體購票(3 張或以上享 25% 折扣,8 張或以上享 35% 折扣)可與早鳥優惠疊加。
  • 主要空間亮點
    • GitHub Central:提供 GitHub Copilot、GitHub Actions、GitHub Advanced Security 等工具的現場演示和產品旅程。
    • GitHub Expert Center:提供與 AI、GitHub Actions、安全等專家進行 1 對 1 深度技術交流的機會。
    • Open Source Zone:連結全球開源貢獻者、維護者和社群領袖,探索 GitHub Accelerator 計畫中的新星專案。
    • Career Corner:提供 1 對 1 職涯教練諮詢,協助優化履歷、GitHub/LinkedIn 個人資料,並準備面試。
    • GitHub Learn:提供來自 GitHub 和 Microsoft Learn 的教程、認證和角色導向學習路徑。
    • 1:1 mentoring opportunity for students:學生可申請與 GitHub 員工進行虛擬微型指導會議,獲得履歷回饋和職涯建議。
    • Recess:非開發主題的休息交流區,例如樂高搭建或與高管輕鬆交流。
    • Makerspace:創意空間,讓程式碼與藝術、音樂、機器人等結合,鼓勵實驗和探索。
    • Hack your badge:所有現場參與者均可獲得一個可客製化和編程的會議徽章。
    • The Shop:提供獨家 GitHub 商品和紀念品。
  • 鼓勵與會者充分利用這些空間,客製化其在 GitHub Universe 的體驗。

TechSummary 2025-08-18

· 閱讀時間約 17 分鐘
Gemini
AI Assistant

🚀 Git 2.51 更新亮點

Source: https://github.blog/open-source/git/highlights-from-git-2-51/

  • 無碎片的 Multi-Pack Indexes (MIDXs)
    • Git 2.51 引入新的打包行為,允許將無法到達的物件(“cruft pack” 中的物件)儲存在 MIDX 之外,解決了先前將它們排除在 MIDX 之外的困難。
    • 透過 repack.MIDXMustContainCruft 配置選項,可使非碎片套件集在可達性上是封閉的。
    • 這項改進在 GitHub 內部應用中,顯著縮小了 MIDXs 檔案大小(約 38%),寫入速度提升(35%),整體儲存庫讀取性能提高(約 5%)。
  • Path Walk 實現更小尺寸的 Packfiles
    • Git 2.49 引入了 "name-hash v2" 以改進物件的 Delta 壓縮。
    • Git 2.51 更進一步,引入了新的「path walk」物件收集方式,在打包時一次性處理來自相同路徑的所有物件。
    • 這種方法避免了名稱哈希啟發式,並可在已知位於相同路徑的物件組內尋找 Delta,從而產生通常更小尺寸的 Packfiles。可透過 --path-walk 命令列選項試用。
  • Stash 交換格式
    • 過去 Git Stash 內部透過創建三個提交來儲存狀態,且 refs/stash 只儲存一個 Stash 項目,導致跨機器遷移困難。
    • Git 2.51 引入了新的 Stash 內部表示形式,允許將多個 Stash 項目表示為一系列提交,類似於普通的提交日誌,新的 Stash 提交包含四個父級。
    • 新版本新增了 git stash export --to-refgit stash import 子命令,使得 Stash 內容可以像普通分支或標籤一樣進行匯出、推送和拉取,實現跨機器遷移。
    # 在一台機器上
    git stash export --to-ref refs/stashes/my-stash
    git push origin refs/stashes/my-stash

    # 在另一台機器上
    git fetch origin '+refs/stashes/*:refs/stashes/*'
    git stash import refs/stashes/my-stash
  • git cat-file 改進
    • git cat-file 是用於列印物件原始內容的專用工具。
    • 在 Git 2.51 之前,查詢子模組路徑會顯示 missing
    • Git 2.51 改善了此輸出,使其在指令碼場景中更有用,現在能正確識別子模組物件 ID 和類型。
    # [ pre-2.51 git ]
    echo HEAD:sha1collisiondetection | git cat-file --batch-check
    # HEAD:sha1collisiondetection missing

    # [ git 2.51 ]
    echo HEAD:sha1collisiondetection | git cat-file --batch-check
    # 855827c583bc30645ba427885caa40c5b81764d2 submodule
  • Bloom Filter 改進
    • Git 2.51 增加了對使用多個路徑規範項目的支持,例如 git log -- path/to/a path/to/b,這些以前無法利用已更改路徑的 Bloom filter。
  • git switchgit restore 不再是實驗性命令
    • 這兩個命令自 Git 2.23 引入以來,已穩定運行六年,其命令列介面已穩定並向後相容。
  • git whatchanged 命令被棄用
    • 此命令已被標記為棄用,並計畫在 Git 3.0 中移除,但仍可透過 --i-still-use-this 旗標使用。
  • Git 3.0 的重大變更預告
    • reftable 後端將成為 Git 3.0 中新建立儲存庫的預設格式。
    • SHA-256 哈希函數將成為 Git 3.0 中初始化新儲存庫的預設哈希函數。
  • Git 內部開發流程更新
    • 允許在程式碼庫中使用 C99 bool 關鍵字。
    • 修訂了貢獻補丁的準則,允許貢獻者使用其合法姓名以外的身份提交補丁,與 Linux 核心的方法更接近。

TechSummary 2025-08-14

· 閱讀時間約 22 分鐘
Gemini
AI Assistant

GPT-5 在 GitHub Copilot:我如何在 60 秒內建構一款遊戲 🚀

Source: https://github.blog/ai-and-ml/generative-ai/gpt-5-in-github-copilot-how-i-built-a-game-in-60-seconds/

  • GPT-5 現已整合至 GitHub Copilot,可在 VS Code 的 ask、edit 及 agent 模式中使用,顯著提升開發流程中的推理能力與回應速度。
  • 啟用方式簡單,僅需在 Copilot 介面中開啟模型選擇器並選取 GPT-5 即可。企業用戶需經管理員啟用。
  • 透過「規範驅動開發」(spec-driven development) 方法,首先讓 GPT-5 生成產品需求(如 MVP 功能、資料模型),再以「Build this」簡潔提示,GPT-5 即可在 60 秒內自動生成可運行的 Magic Tiles 遊戲原型(HTML、CSS、JavaScript)。
  • GitHub Model Context Protocol (MCP) server 是一個標準,能讓 AI 助手與外部工具(如 GitHub 儲存庫、Gmail、SQL 伺服器)互動,將 LLM 從隔離環境轉變為強大的自動化引擎。
  • 設定 GitHub MCP 伺服器僅需不到 5 分鐘,透過在工作空間根目錄建立 .vscode/mcp.json 配置檔並進行 GitHub OAuth 驗證即可。
  • 實際應用範例包含透過自然語言創建 GitHub 儲存庫及批量建立議題,大幅減少上下文切換,提高開發效率。
  • 這個工作流程的優勢在於 GPT-5 的處理速度、上下文保留能力,以及將自然語言作為開發介面,同時保持「人機協同」的控制。

TechSummary 2025-08-04

· 閱讀時間約 22 分鐘
Gemini
AI Assistant

使用 GitHub Models 在 Actions 中自動化您的專案 🚀

Source: https://github.blog/ai-and-ml/generative-ai/automate-your-project-with-github-models-in-actions/

  • GitHub Models 將 AI 整合到 GitHub Actions 工作流程中,實現專案內的自動化分類、摘要等功能。
  • 權限設置: 使用 GitHub Models 前需在 permissions 區塊中加入 models: read,並建議遵循最小權限原則,以降低提示詞注入攻擊 (prompt injection) 風險。
    permissions:
    contents: read
    issues: write
    models: read
  • 範例一:在 Bug 報告中請求更多資訊
    • 透過 actions/ai-inference@v1 動作分析 Issue 內容,判斷錯誤報告是否包含足夠的重現資訊(例如:重現步驟、預期行為、實際行為、環境細節)。
    • 若資訊不足,AI 會自動回覆提示作者補齊。此機制利用 AI 模型的回傳值(pass 或詳細說明)建立工作流程中的條件邏輯。
    - name: Analyze Issue For Reproduction
    if: contains(join(github.event.issue.labels.*.name, ','), 'bug')
    id: analyze-issue
    uses: actions/ai-inference@v1
    with:
    model: mistral-ai/ministral-3b
    system-prompt: |
    Given a bug report title and text for an application, return 'pass' if there is enough information to reliably reproduce the issue, meaning the report clearly describes the steps to reproduce the problem, specifies the expected and actual behavior, and includes environment details such as browser and operating system; if any of these elements are missing or unclear, return a brief description of what is missing in a friendly response to the author instead of 'pass'. Consider the following title and body:
    prompt: |
    Title: ${{ steps.issue.outputs.title }}
    Body: ${{ steps.issue.outputs.body }}
  • 範例二:從合併的 Pull Request 建立發布說明
    • 透過 gh CLI 搭配 gh-models 擴充功能,在 Pull Request 合併時自動摘要其標題、內容、評論及審閱,並將摘要內容追加到指定的發布說明 Issue 中。
    cat pr.json | gh models run xai/grok-3-mini \
    "Given the following pull request information, generate a single, clear, and concise one-line changelog entry that summarizes the main change (feature, fix, or bug) introduced by this PR. Use neutral, user-facing language and avoid technical jargon or internal references. Only write the line, with no additional introduction or explanation text." > summary.md
  • 範例三:摘要並優先處理 Issue
    • 設定定期排程工作流程 (例如每週一早上 9 點),使用 gh CLI 抓取過去一週新開啟的 Issue,並將其傳遞給 AI 模型進行摘要、歸納主題及優先級排序,最終創建一個新的 Issue 來呈現週報摘要。
    • 此範例使用獨立的 .prompt.yml 提示文件,提供更複雜的提示邏輯。