Share via


安裝適用於 GitHub 的 Azure Boards 應用程式

Azure DevOps Services |Azure DevOps Server 2022 - Azure DevOps Server 2019

安裝適用於 GitHub 的 Azure Boards 應用程式,以將 Azure Boards 連線到您的 GitHub 存放庫。 當您將 Azure Boards 專案與 GitHub.com 存放庫連線時,支援在 GitHub 認可與提取要求之間連結至工作專案。 您可以使用 GitHub 進行軟體開發,同時使用 Azure Boards 來規劃和追蹤您的工作。

如需適用於 GitHub 之 Azure Boards 應用程式支援的整合概觀,請參閱 Azure Boards-GitHub 整合。 在 GitHub 帳戶或組織上安裝適用於 GitHub 的 Azure Boards 應用程式之後,請選擇您要從項目連線到的 GitHub 存放庫。

必要條件

  • 若要安裝 Azure Boards 應用程式,您必須是 GitHub 組織的系統管理員或擁有者。
  • 若要連線到 Azure Boards 專案,您必須具有 GitHub 存放庫的讀取 許可權。 此外,您必須是 Project Collection 管理員 istrators 群組的成員。 如果您已建立專案,則您具有許可權。

重要

如果您的存放庫已經透過 OAuth 等其他驗證類型進行連線,您必須先從現有的連線中移除該存放庫,才能透過 GitHub 應用程式重新連接該存放庫。 在您設定 GitHub 應用程式之前,請遵循本文稍後新增或移除 GitHub 存放庫提供的步驟。

如果您是這些存放庫的系統管理員,您可以將 Azure DevOps 組織連線到多個 GitHub 存放庫。 不過,您不應該將 GitHub 存放庫連線到多個 Azure DevOps 組織。

為 Azure Boards 組織提供存取權

請執行下列步驟來授與組織存取權。

  1. 從 GitHub 入口網站,從配置檔功能表開啟 設定

    Screenshot of open profile, choose Settings.

  2. 選取 [整合] 底下的 [應用程式]。

  3. 選取 [授權的 OAuth Apps>Azure Boards]。

    Screenshot of Authorized OAuth Apps tab, choose Azure Boards.

  4. 在 [組織存取權] 底下,解決可能出現的任何問題。 選取 [授 與] 以將存取權授與任何顯示為擱 存取要求的組織。

    Screenshot of Organization access with organizations without access.

安裝和設定 Azure Boards 應用程式

  1. 移至 GitHub Marketplace 中的 Azure Boards 應用程式。

  2. 選取 [設定方案]。

    Screenshot of GitHub Marketplace, Set up a plan button.

  3. 選擇您想要連線到 Azure Boards 的 GitHub 組織。

    Screenshot showing Install Azure Boards dialog.

  4. 選擇您要連線到 Azure Boards 的存放庫。

    在下列範例中,我們選擇連線到所有存放庫。

    Screenshot showing all repositories selected.

  5. 選擇您想要連線到 GitHub.com 的 Azure DevOps 組織和 Azure Boards 專案。

    Screenshot of setting up connection dialog.

    您一次只能連接一個專案。 如果您有想要連線的其他專案,您可以稍後執行此動作,如本文稍後的 設定其他專案或存放庫 所述。

  6. 授權 Azure Boards 組織與 GitHub.com 連線。

    Screenshot of Azure Boards authorization dialog.

  7. 確認您要連線 GitHub.com 存放庫。 選取您要連線的每個存放庫。 取消選取您不想參與整合的任何存放庫。

    Screenshot of Confirm your GitHub repositories dialog.

使用連線

此時,您的 Azure Boards-GitHub 整合已完成。 您可以略過後續步驟,或瀏覽它們以了解連線支援的功能。

  1. 在您的面板上,選取 [新增專案] 以輸入名為「將徽章新增至自述檔」的新工作專案 —問題(基本)、使用者故事(Agile),或產品待辦專案(Scrum)—視 Azure Boards 專案所使用的程式模型而定。

    標題為 [將徽章新增至自述檔 ] 的工作專案會出現在您的面板上。

  2. 開啟您的工作項目,然後選取 [新增連結] 底下的 [提取要求]。

  3. 選取存放庫,然後輸入提取要求標識碼和選擇性批注。

  4. 選取 [ 新增連結]。

    Screenshot of Add link action in user story, showing repository selection and empty boxes for input of pull request ID and optional comment.

    下列動作會發生在背景中。

    • 將徽章新增至連線 GitHub 存放庫清單中第一個存放庫的自述檔。
    • 為更新建立 GitHub 認可,方法是將徽章新增至自述檔。
    • 建立 GitHub 提取要求,以合併對自述檔所做的變更。
    • 將 GitHub 認可和提取要求連結至步驟 1 中建立的工作專案。
  5. 從工作項目選取第一個提取要求連結。

    Screenshot of issue form for pull request opened in GitHub.

    GitHub 提取要求會在新的瀏覽器索引標籤中開啟。

  6. 選取 [合併提取要求]

    Screenshot of example pull request in GitHub.

  7. 移至您的存放庫自述檔,並檢視已新增的徽章。

    Screenshot of GitHub repo with badge added.

    如需詳細資訊,請參閱 設定狀態徽章以新增至 GitHub 自述檔

設定其他專案或存放庫

您可以設定其他 Azure Boards/Azure DevOps Projects、GitHub.com 存放庫,或從 Azure Boards 應用程式頁面變更目前設定。 如需詳細資訊,請參閱 變更 GitHub 存放庫存取權,或暫停或卸載整合

新增或移除存放庫,或從 Azure Boards 移除連線

如果您遇到連線問題,建議您移除連線,然後開始使用新的連線。

  1. 若要新增或移除存放庫,請選擇連線的 [更多選項],然後選擇 [新增存放庫] 或 [從功能表中移除存放庫]。

    Screenshot of GitHub connection menu of More options.

  2. 若要移除所有存放庫和連線,請選擇 [ 移除連線] 選項。 然後選擇 [ 移除 ] 以確認。

    Screenshot of confirmation removal of GitHub connection.

  1. 若要新增或移除存放庫,請開啟連線的動作圖示,然後從功能表中選擇 [新增存放庫] 或 [移除存放庫]。

    Screenshot of add or remove GitHub repos.

  2. 若要移除所有存放庫和連線,請選擇 [ 移除連線] 選項。 然後選擇 [ 移除 ] 以確認。

    Screenshot of confirmation of GitHub connection removal dialog.

變更存放庫存取權

  1. 登入 GitHub 組織的入口網站,然後開啟 [帳戶設定]。

    https://github.com/organizations/fabrikam-fiber/settings/profile

  2. 選擇 [已安裝的 GitHub Apps],然後選擇 [Azure Boards] 旁的 [設定]。
    Screenshot of open Organization account, Installed GitHub Apps, Azure Boards, Configure.

    [Azure Boards 組態] 頁面隨即開啟。

  3. 向下捲動至 [ 存放庫存取 ] 區段。

  4. 選擇您想要的選項, [所有存放庫 ] 或 [僅選取存放庫]。

    如果您選擇 [僅選取存放庫],請選取您想要參與與 Azure Boards 整合的存放庫。

    Screenshot of Repository access, choose Only select repositories.

  5. 完成時,請選擇 [ 儲存 ]。

暫停或卸載 Azure Boards 整合

  1. 從上一個程式中的步驟 2 開始,向下捲動至 [ 危險區域] 區 段。

    Screenshot of Azure Boards configuration, Danger zone section.

  2. 若要暫停整合,請選擇 [ 暫停]。 從彈出視窗確認視窗中,選擇 [ 確定 ] 以確認暫停。

    Screenshot of suspension confirmation.

    若要取消暫停整合,請選擇 [取消暫停]。

  3. 若要卸載 Azure Boards 應用程式,請選擇 [卸載],然後從快顯確認視窗中選擇 [ 確定 ]。

    Screenshot of uninstall confirmation.

更新 Azure Boards-GitHub 連線

如果您變更適用於 GitHub 的 Azure Boards 應用程式支援的存放庫,您可能會重新導向至 Azure Boards GitHub 連線。 最佳做法是移除 Azure Boards 中無法再連線到 GitHub 的存放庫。 如需詳細資訊,請參閱 新增或移除 GitHub 存放庫

如果您卸載適用於 GitHub 的 Azure Boards 應用程式,下列訊息會顯示在 Azure Boards、Project 設定>GitHub 連線中。 選擇 [移除連線 ] 以移除所有先前建立的 GitHub 連線。 如需詳細資訊,請參閱 新增/移除 GitHub 存放庫

Screenshot of uninstalled Azure Boards GitHub app.

下一步