[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-29 (世界標準時間)。"],[],[],null,["| **Preview**\n|\n| This product or feature is in preview. Products and features that are\n| in preview are available \"as is\".\n\nThis document describes example prompts you can use with the GitLab and\nGitHub Gemini Code Assist tools in your IDE. Developers can\nuse tools in the IDE to pull information from external services.\n| **Note:** you can't use the GitLab tool or the GitHub tool in an on-premises environment.\n\nFor more information about Gemini Code Assist tools and a full list of\nthe services and products available, see the\n[Gemini Code Assist tools overview](/gemini-code-assist/docs/tools-agents/tools-overview).\n\nBefore you begin\n\n1. [Set up Gemini Code Assist](/gemini-code-assist/docs/set-up-gemini).\n2. To connect your GitHub or GitLab account, follow the instructions in [Configure tools](/gemini-code-assist/docs/tools-agents/configure-tools).\n\nUse the GitHub tool to view issues and pull requests\n\nYou can use the GitHub tool to view issues assigned to you, and search for\nissues and code using GitHub\n[search capabilities](https://docs.GitHub.com/en/rest/search/search?apiVersion=2022-11-28#search-commits)\nfrom within your IDE.\n\nYou must have a GitHub account\n\nSearch issues with the GitHub tool\n\nTo search for all issues assigned to you, in the Gemini Code Assist\nchat, enter a prompt similar to the following: \n\n @GitHub list issues assigned to me\n\nThe GitHub tool lists all issues assigned to you.\n\nTo search for issues associated with a specific project and repository, in the\nGemini Code Assist chat, enter a prompt similar to the following: \n\n @GitHub what issues are assigned to me in \u003cvar translate=\"no\"\u003ePROJECT_NAME\u003c/var\u003e/\u003cvar translate=\"no\"\u003eREPOSITORY\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003ePROJECT_NAME\u003c/code\u003e\u003c/var\u003e with the name of the GitHub project.\n- \u003cvar translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003eREPOSITORY\u003c/code\u003e\u003c/var\u003e with the name of the GitHub repository.\n\nThe GitHub tool lists issues assigned to you in the specified\nrepository.\n\nSearch pull requests with the GitHub tool\n\nTo search for all open pull requests assigned to you, in the\nGemini Code Assist chat, enter a prompt similar to the following: \n\n @GitHub list pull requests assigned to me\n\nTo search for all pull requests assigned to you in a specific project and\nrepository, in the Gemini Code Assist chat, enter a prompt similar to\nthe following: \n\n @GitHub what are the pull requests assigned to me in \u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e/\u003cvar translate=\"no\"\u003eREPOSITORY\u003c/var\u003e?\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003ePROJECT_NAME\u003c/code\u003e\u003c/var\u003e with the name of the GitHub project.\n- \u003cvar translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003eREPOSITORY\u003c/code\u003e\u003c/var\u003e with the name of the GitHub repository.\n\nAdditional recommended prompts for the GitHub tool\n\nBefore using the following prompts, replace the following:\n\n- \u003cvar class=\"edit\" scope=\"PULL_REQUEST_NUMBER\" translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003ePULL_REQUEST_NUMBER\u003c/code\u003e\u003c/var\u003e is the pull request number in GitHub.\n- \u003cvar class=\"edit\" scope=\"REPOSITORY_NAME\" translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003eREPOSITORY_NAME\u003c/code\u003e\u003c/var\u003e is the name of your GitHub repository.\n- \u003cvar class=\"edit\" scope=\"KEY_WORD\" translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003eKEY_WORD\u003c/code\u003e\u003c/var\u003e is a keyword to use in a search.\n- \u003cvar class=\"edit\" scope=\"ISSUE_NAME\" translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003eISSUE_NAME\u003c/code\u003e\u003c/var\u003e the name of a GitHub issue\n\nThe following prompts are recommended for the GitHub tool:\n\n- `@GitHub list issues assigned to me`\n- `@GitHub list my open pull requests`\n- `@GitHub list comments for pull request\n `\u003cvar class=\"edit\" scope=\"PULL_REQUEST_NUMBER\" translate=\"no\"\u003ePULL_REQUEST_NUMBER\u003c/var\u003e`\n in\n `\u003cvar class=\"edit\" scope=\"REPOSITORY_NAME\" translate=\"no\"\u003eREPOSITORY_NAME\u003c/var\u003e\n- `@GitHub find open issues for\n `\u003cvar class=\"edit\" scope=\"KEY_WORD\" translate=\"no\"\u003eKEY_WORD\u003c/var\u003e\n- `@GitHub find code relating to\n `\u003cvar class=\"edit\" scope=\"KEY_WORD\" translate=\"no\"\u003eKEY_WORD\u003c/var\u003e\n- `@GitHub get comments on my issue\n `\u003cvar class=\"edit\" scope=\"ISSUE_NAME\" translate=\"no\"\u003eISSUE_NAME\u003c/var\u003e\n- `@GitHub what are the comments on my pr\n `\u003cvar class=\"edit\" scope=\"PULL_REQUEST_NUMBER\" translate=\"no\"\u003ePULL_REQUEST_NUMBER\u003c/var\u003e\n\nUse the GitLab tool to get details on pull requests and issues\n\nYou can use the GitLab tool to list your pull requests and issues from your\nGitLab projects.\n\nTo list pull requests in a GitLab project, in the Gemini Code Assist\nchat, enter a prompt similar to the following: \n\n @gitlab list my open pull requests in project \u003cvar translate=\"no\"\u003ePROJECT_NAME\u003c/var\u003e\n\nWhere \u003cvar class=\"edit\" scope=\"PROJECT_NAME\" translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003ePROJECT_NAME\u003c/code\u003e\u003c/var\u003e is\nyour GitLab project name.\n\nThe `@gitlab` tool lists your open pull requests.\n\nTo list issues assigned to you in GitLab, in the Gemini Code Assist\nchat, enter a prompt similar to the following: \n\n @gitlab list issues assigned to me\n\nThe `@gitlab` tool lists issues assigned to you.\n\nAdditional recommended prompts\n\nBefore using the following prompts, replace the following:\n\n- \u003cvar class=\"edit\" scope=\"GITLAB_PROJECT\" translate=\"no\"\u003eGITLAB_PROJECT\u003c/var\u003e is your GitLab project name.\n- \u003cvar class=\"edit\" scope=\"MERGE_REQUEST_NUMBER\" translate=\"no\"\u003eMERGE_REQUEST_NUMBER\u003c/var\u003e is the merge request number in GitLab.\n- \u003cvar class=\"edit\" scope=\"ISSUE_NAME\" translate=\"no\"\u003eISSUE_NAME\u003c/var\u003e is the name of a GitLab issue.\n\nThe following prompts are recommended for the GitLab tool:\n\n- `@gitlab list my issues in the project\n `\u003cvar class=\"edit\" scope=\"GITLAB_PROJECT\" translate=\"no\"\u003eGITLAB_PROJECT\u003c/var\u003e`?`\n- `@gitlab list all my open merge requests for\n `\u003cvar class=\"edit\" scope=\"MERGE_REQUEST_NUMBER\" translate=\"no\"\u003eMERGE_REQUEST_NUMBER\u003c/var\u003e\n- `@gitlab what's the status of the CI pipeline for merge request\n `\u003cvar class=\"edit\" scope=\"ISSUE_NAME\" translate=\"no\"\u003eISSUE_NAME\u003c/var\u003e` in\n `\u003cvar class=\"edit\" scope=\"PROJECT_NAME\" translate=\"no\"\u003ePROJECT_NAME\u003c/var\u003e`?`\n\nWhat's next\n\n- Learn more about Gemini Code Assist tools by reading the [overview](/gemini-code-assist/docs/tools-agents/tools-overview)"]]