Skip to main content
我们经常发布文档更新,此页面的翻译可能仍在进行中。 有关最新信息,请访问英语文档

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

Creating a custom badge for your GitHub App

您可以通过上传自己的徽标图像并自定义背景来替换 GitHub 应用程序上的默认徽章。

By default, a new GitHub App will have an automatically generated identicon. An identicon badge looks something like this:

An identicon, which consists of white pixels in a random pattern on a circular yellow background.

After you register a GitHub App, you can customize your app's badge by uploading a logo and selecting a background color. A badge is a square logo image inside of a circular badge. You can choose a background color for the badge, which can visually distinguish your app.

Your logo should be a PNG, JPG, or GIF file under 1 MB in size. For the best quality rendering, we recommend an image size of at least 200px x 200px.

To create a custom badge:

  1. 在任何页面的右上角,单击个人资料照片,然后单击“设置”。

    GitHub 帐户菜单的屏幕截图,其中显示了供用户查看和编辑其个人资料、内容和设置的选项。 菜单项“设置”用深橙色框出。

  2. 在左侧边栏中,单击“开发人员设置”。

  3. 在左侧边栏中,单击“GitHub App”。 GitHub 中“开发人员设置”页面的屏幕截图。 一个标有“GitHub 应用”的选项,以深橙色框出。

  4. 在要修改的 GitHub App 右边,单击“编辑”。

  5. Under "Display information," drag and drop an image from a local folder or click Upload a logo to select an image from your computer.

  6. Optionally, crop your image. When you're done, click Set new avatar.

  7. Under "Badge background color," type the hexadecimal color code of the background color for your badge.