Skip to main content

此版本的 GitHub Enterprise 已停止服务 2022-10-12. 即使针对重大安全问题,也不会发布补丁。 为了获得更好的性能、更高的安全性和新功能,请升级到最新版本的 GitHub Enterprise。 如需升级帮助,请联系 GitHub Enterprise 支持

Configuring autolinks to reference external resources

You can add autolinks to external resources like JIRA issues and Zendesk tickets to help streamline your workflow.

自动链接在包含 GitHub Pro、GitHub Team、GitHub Enterprise Cloud、 和 GitHub Enterprise Server 的存储库中可用。

Anyone with admin permissions to a repository can configure autolink references to link issues, pull requests, commit messages, and release descriptions to external third-party services.

This procedure demonstrates how to configure autolinks to reference external resources. For example, if you use Zendesk to track user-reported tickets, you can reference a ticket number in the pull request you opened to fix the issue.

  1. On your GitHub Enterprise Server instance, navigate to the main page of the repository.

  2. 在存储库名称下,单击 “设置”。 “存储库设置”按钮

  3. In the left sidebar, click Autolink references. Autolink references tab in the left sidebar.

  4. Click Add autolink reference. Button to fill out autolink reference information.

  5. Under "Reference prefix", type a short, meaningful prefix you want collaborators to use to generate autolinks for the external resource. Field to type abbreviation for external system.

  6. Under "Target URL", type the link to the external system you want to link to. Use the <num> variable as a placeholder for the reference identifier. Field to type URL to external system.

  7. Click Add autolink reference. Button to add autolink reference.