跳至主要内容

27 篇文章 含有標籤「SoftwareDevelopment」

檢視所有標籤

TechSummary 2025-07-31

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

Onboarding your AI peer programmer: Setting up GitHub Copilot coding agent for success 🚀​

Source: https://github.blog/ai-and-ml/github-copilot/onboarding-your-ai-peer-programmer-setting-up-github-copilot-coding-agent-for-success/

  • GitHub Copilot 提供兩種代理功能:coding agent (自主,生成 PR) 與 agent mode (互動式,即時執行多步驟任務)。
  • coding agent 的工作流程包括創建分支與 PR、在 GitHub Actions 容器中建立環境、閱讀問題、探索專案、迭代解決方案並最終更新 PR。
  • 可透過自訂 GitHub Actions workflow 檔案(例如 .github/workflows/copilot-setup-steps.yml)來配置 Copilot 的執行環境,確保其能存取所需的工具和服務。
    name: "Copilot Setup Steps"

    on:
    workflow_dispatch:
    push:
    paths:
    - .github/workflows/copilot-setup-steps.yml
    pull_request:
    paths:
    - .github/workflows/copilot-setup-steps.yml

    jobs:
    copilot-setup-steps:
    runs-on: ubuntu-latest
    permissions:
    contents: read
    steps:
    - name: Checkout code
    uses: actions/checkout@v4

    - name: Set up Python
    uses: actions/setup-python@v4
    with:
    python-version: "3.13"
    cache: "pip"

    - name: Install Python dependencies
    run: pip install -r requirements.txt

    - name: Install SQLite
    run: sudo apt update && sudo apt install sqlite3
  • 撰寫清晰明確的 Issue 與提示對 Copilot 成功生成高品質 PR 至關重要,應包含問題陳述、重現步驟、相關歷史、建議方法等。
  • 透過優化專案結構(README、代碼註釋、良好命名)和自訂指令文件(copilot-instructions.md 或 <file-name>.instructions.md)來提供 Copilot 上下文資訊和組織規範。
    # Classic arcade

    This project hosts a classic arcade, themed after the 1980s 8-bit games.

    ## Standard player flow

    1. Player opens app and sees list of games.
    2. Player selects game to play.
    3. Player sees a splash screen with the message "Insert quarter".
    4. Player presses space to start game and plays game
    6. After game ends, the "Game over" message is displayed.
    7. The player score is checked against high scores. If the score is in top 10, user is prompted for their initials (3 initials).
    8. High scores are displayed, and an option to return to the main menu to start over again.

    ## Frameworks

    - Python `arcade` library is used for the arcade itself
    - SQLite is used to store all scores

    ## Coding guidelines

    - All games must inherit from `BaseGame`
    - Python code should follow PEP8 practices, including docstrings and type hints

    ## Project structure

    - `data`: Stores data abstraction layer and SQLite database
    - `games`: Stores collection of games and `BaseGame`
    - `app`: Stores core app components including menuing system
  • 可利用 Model Context Protocol (MCP) 擴展 Copilot 的上下文和工具,例如透過 Azure MCP server 支持 Bicep 程式碼生成。
    {
    "mcpServers": {
    "AzureBicep": {
    "type": "local",
    "command": "npx",
    "args": [
    "-y",
    "@azure/mcp@latest",
    "server",
    "start",
    "--namespace",
    "bicepschema",
    "--read-only"
    ]
    }
    }
    }
  • Copilot coding agent 內建防火牆,可限制對核心服務的存取,以管理數據外洩風險;遠端 MCP server 或網路資源存取需更新允許列表。

TechSummary 2025-07-30

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

如何使用 GitHub MCP 伺服器實用指南 🚀​

Source: https://github.blog/ai-and-ml/generative-ai/a-practical-guide-on-how-to-use-the-github-mcp-server/

  • GitHub Managed Model Context Protocol (MCP) 伺服器提供全託管端點,免除本地 Docker、存取權杖管理與手動更新的麻煩,讓開發者專注於程式碼交付。
  • 從本地 MCP 設定升級至 GitHub 託管端點,可獲得 OAuth 身份驗證、自動更新,並存取更豐富的 AI 工作流程工具組。
  • 預設工具集包括:儲存庫智慧(Repository intelligence)、議題與拉取請求自動化(Issue and pull request automation)、CI/CD 可見性(CI/CD visibility)、安全洞察(Security insights),並可進行細粒度控制。
  • 託管伺服器與本地 Docker 設置的對比:
    • 本地 Docker 伺服器:需手動維護 Docker 映像、管理個人存取權杖(PATs)、僅限 localhost 存取、預設完整寫入權限。
    • 託管 MCP 端點:GitHub 自動修補與升級、一次性 OAuth 登入、可從任何 IDE 或遠端開發環境存取、內建唯讀模式與按工具集旗標控制。
  • 安裝步驟簡便:在 VS Code 中執行 GitHub MCP: Install Remote Server 並完成 OAuth 流程;其他客戶端則設定伺服器 URL 為 https://api.githubcopilot.com/mcp/。可透過 curl -I https://api.githubcopilot.com/mcp/healthz 驗證連接。
  • 彈性配置存取控制:
    • 設定唯讀模式以安全探索,例如:
      {
      "servers": {
      "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/",
      "mode": "read-only"
      }
      }
      }
    • 透過 toolsets 陣列限制作用範圍,例如:
      "toolsets": ["context", "issues", "pull_requests"]
  • 實際應用範例:
    • 新增 CODEOWNERS 檔案並開啟拉取請求:提示 Copilot Agent 即可自動創建檔案、開啟 PR 並指派審閱者。
    • 偵錯失敗的工作流程:提示 Why did the release.yml job fail last night? 即可分析日誌並建議修復。
    • 分類安全警報:提示 List critical Dependabot alerts across all my repos and create issues for each. 即可列出警報並創建對應議題。
  • 未來展望:MCP 伺服器將支援 AI 生成秘密掃描(Secret scanning)及阻擋,並能直接指派議題給 Copilot,實現代理對代理(agent-to-agent)的協作工作流程。

TechSummary 2025-07-29

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

GitHub 全新開源播客:從初次提交到大型專案 🎧​

Source: https://github.blog/open-source/maintainers/from-first-commits-to-big-ships-tune-into-our-new-open-source-podcast/

  • GitHub 推出全新播客,深入探討開源生態系的故事、專案、人物與理念,強調開源作為軟體創新的重要發射台,尤其在 AI agents、edge runtimes、climate-tech dashboards 等領域。
  • 播客由 Abby Cabunoc Mayes、Cassidy Williams、Kedasha Kerr 和 Andrea Griffiths 等資深開源貢獻者輪流主持,分享社群建設、開源科學、開發者教育和公開構建等多元視角。
  • 首集介紹主持人如何參與開源,並探討在內容飽和的世界中創建初學者內容的重要性。
  • 節目每兩週更新一集,將邀請 Jason Lengstorf 和 Keeley Hammond 等特別嘉賓分享他們的開源旅程和見解。
  • 亮點開源專案預覽:
    • Anime.JS: 視覺效果出眾的 JavaScript 動畫函式庫。
    • Docs: 法國和德國政府合作開發的開源文件協作編輯器。
    • CSS Zero: 簡化網頁開發的無構建前端入門套件。
  • 後續主題將深入探討 Model Context Protocol (MCP) 如何提升 AI 工具的透明度和互操作性。

TechSummary 2025-07-28

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

🌾 GitHub Copilot 助力小農戶擴大影響力​

Source: https://github.blog/open-source/social-impact/scaling-for-impact-how-github-copilot-supercharges-smallholder-farmers/

  • 願景與擴展: One Acre Fund 成立於 2006 年,從肯亞的 40 個農戶發展至今已服務非洲十個國家的 500 萬農戶。他們的目標是到 2030 年每年支援 1000 萬農戶,透過開源技術和 AI 創造 10 億美元的新收入。
  • 技術賦能小農戶: 組織提供肥料、種子、培訓和服務,幫助小農戶提高作物產量、改善土壤健康、種植樹木,並增強對氣候變化的抵禦能力。農民對技術的態度從最初的猶豫轉變為積極。
  • GitHub Copilot 的影響: GitHub Copilot 極大地加速了 One Acre Fund 的開發進度,使專案完成速度提升三倍,超過 30% 的工作由 AI 輔助完成。這使他們能夠設定並達成更多目標。
  • 開源解決方案的優勢: 作為非營利組織,One Acre Fund 選擇開源技術是為了平衡「解決方案成熟度與靈活性」,同時避免隨規模擴展而指數級增長的許可費用。他們已將核心營運系統大部分遷移到開源。

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 採用新的發布資訊策略,專注用戶體驗與產品透明化。