跳至主要内容

2 篇文章 含有標籤「BestPractices」

檢視所有標籤

TechSummary 2025-08-28

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

🤖 GitHub Models 如何幫助開源維護者專注於核心工作

Source: https://github.blog/open-source/maintainers/how-github-models-can-help-open-source-maintainers-focus-on-what-matters/

  • 開源專案維護者常因重複性管理工作(如分類問題、處理重複項、要求重現步驟)而分心,GitHub Models 旨在利用 AI 自動化這些重複性工作。
  • 透過 GitHub Models 結合 GitHub Actions,實現「持續 AI」(Continuous AI) 模式,提供自動化工作流程,例如自動問題去重、問題完整性檢查、垃圾郵件與低品質貢獻偵測、持續解決方案以及新貢獻者引導。
  • 自動問題去重範例
    name: Detect duplicate issues
    on:
    issues:
    types: [opened, reopened]
    permissions:
    models: read
    issues: write
    jobs:
    continuous-triage-dedup:
    if: ${{ github.event.issue.user.type != 'Bot' }}
    runs-on: ubuntu-latest
    steps:
    - uses: pelikhan/action-genai-issue-dedup@v0
    with:
    github_token: ${{ secrets.GITHUB_TOKEN }}
    # Optional tuning:
    # labels: "auto" # compare within matching labels, or "bug,api"
    # count: "20" # how many recent issues to check
    # since: "90d" # look back window, supports d/w/m
  • 問題完整性檢查範例
    name: Issue Completeness Check
    on:
    issues:
    types: [opened]
    permissions:
    issues: write
    models: read
    jobs:
    check-completeness:
    runs-on: ubuntu-latest
    steps:
    - name: Check issue completeness
    uses: actions/ai-inference@v1
    id: ai
    with:
    prompt: |
    Analyze this GitHub issue for completeness. If missing reproduction steps, version info, or expected/actual behavior, respond with a friendly request for the missing info. If complete, say so.

    Title: ${{ github.event.issue.title }}
    Body: ${{ github.event.issue.body }}
    system-prompt: You are a helpful assistant that helps analyze GitHub issues for completeness.
    model: openai/gpt-4o-mini
    temperature: 0.2
    - name: Comment on issue
    if: steps.ai.outputs.response != ''
    uses: actions/github-script@v7
    with:
    script: |
    github.rest.issues.createComment({
    owner: context.repo.owner,
    repo: context.repo.repo,
    issue_number: ${{ github.event.issue.number }},
    body: `${{ steps.ai.outputs.response }}`
    })
  • 建議維護者從一個工作流程開始,逐步擴展,並監控結果、根據專案語氣調整 AI 提示。

TechSummary 2025-07-15

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

利用 GitHub Copilot 助力開發流程整理與優化 🚀

Source: https://github.blog/ai-and-ml/github-copilot/from-chaos-to-clarity-using-github-copilot-agents-to-improve-developer-workflows/

  • 介紹如何透過 GitHub Copilot coding agent,將零散且潛在鬆散的專案結構改造為高度組織且易於維護的系統
  • 重點流程包括:優化自訂指令、建立 setup 檔案、辨識技術債務
  • 利用 Copilot 與 pull request 協作,加快專案改善
  • 以範例改進驗證檔案,全面提升專案品質、文件化與測試覆蓋
  • 最終實踐包括在不同專案中進行前後比對,證明 AI 助攻大幅提升效率