跳至主要内容

在拉取请求中查找已更改的方法和函数

您可以快速在拉取请求中查找 .go.js.ts.py.php.rb 文件中对方法或函数的提议更改。

拥有仓库读取权限的任何人都可以查看拉取请求中某些文件的函数和方法更改的概览列表。

方法和函数的概览列表来源于以下受支持的文件类型

  • Go
  • JavaScript(包括 TypeScript、Flow 以及其他类型的 JavaScript)
  • PHP
  • Python
  • Ruby
  1. 在仓库名称下,点击 拉取请求

    Screenshot of the main page of a repository. In the horizontal navigation bar, a tab, labeled "Pull requests," is outlined in dark orange.

  2. 在拉取请求列表中,点击您想查找已更改函数和方法的拉取请求。

  3. 在拉取请求页面,点击 已更改的文件

    Screenshot of the tabs for a pull request. The "Files changed" tab is outlined in dark orange.

  4. 要查看已更改函数和方法的概览列表,点击 跳转到

    Screenshot of the "Files changed" tab for a pull request. The "Jump to" option is outlined in dark orange.

  5. 从下拉菜单中选择已更改的函数或方法。您也可以输入函数或方法的名称来过滤结果。

    注意

    如果未看到您期望的函数或方法,请确认您的代码能够编译且没有错误。仅在此拉取请求中更改且位于 .go.js.ts.py.php.rb 文件中的函数和方法会出现在下拉菜单中。

  6. 您将被重定向到所选函数或方法的第一行。

延伸阅读

© . This site is unofficial and not affiliated with GitHub, Inc.