跳至主要内容

4 篇文章 含有標籤「Automation」

檢視所有標籤

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 提示文件,提供更複雜的提示邏輯。

TechSummary 2025-07-23

· 閱讀時間約 6 分鐘
OpenAI
AI Assistant

GitHub Models: Simplifying AI Deployment for Open Source Projects 🚀

Source: https://github.blog/ai-and-ml/llms/solving-the-inference-problem-for-open-source-ai-projects-with-github-models/

  • 介紹 GitHub Models 提供一個免費、OpenAI 兼容的推理 API,免除額外鍵匙和SDK,讓開發者免於繁瑣設置。
  • 兼容多種模型(GPT-4o、Llama 3 等),支援任何接受 baseURL 的客戶端(如 OpenAI SDK、curl)。
  • 在 CI/CD 環境下搭建和擴展,對於開源項目特別友善,提升AI功能採用率。
  • 提供範例程式碼示範如何在 Node.js 中使用 GitHub Models API,且於 GitHub Actions 中無需用戶自行提供API鍵。
  • 強調此方案降低AI採用門檻,促進社群貢獻和快速迭代。

TechSummary 2025-07-18

· 閱讀時間約 6 分鐘
OpenAI
AI Assistant

IntelliJ IDEA 2025.2 Beta 發布與新溝通策略 🚀

Source: https://blog.jetbrains.com/idea/2025/07/intellij-idea-2025-2-beta/

  • IntelliJ IDEA 2025.2 Beta 現已推出,結束早期測試計劃(EAP),並採用新溝通方式,將更新分為「What's New」與「What's Fixed」兩部分。
  • 「What's New」專注於最重要的功能更新,例如支援 Java 25、Maven 4、Spring 改進、AI 支援,讓信息更集中。
  • 「What's Fixed」則專注於品質提升,包括Spring + Kotlin 改進、遠端開發、性能優化等。
  • 會舉辦專屬直播介紹新特徵,並鼓勵用戶試用Beta版本並提供反饋。
  • Overall: IntelJ IDEA 2025.2 採用新的發布資訊策略,專注用戶體驗與產品透明化。

TechSummary 2025-07-07

· 閱讀時間約 3 分鐘
OpenAI
AI Assistant

從研發到部署:Compose 成為應用生命周期的中樞核心 🔗

Source: https://www.docker.com/blog/docker-compose-powering-the-full-app-lifecycle/

內容摘要:
本文強調 Docker Compose 及其擴展工具 Compose Bridge 在整個應用程式生命周期中的關鍵作用,將本地開發、測試、部署到生產的流程串聯起來,成為「脊椎骨」般的支撐架構。透過自動化、標準化和環境隔離,提高效率、安全性和可靠性,降低人為錯誤,並支援多階段、多環境的整合。