Integrating TeamCity with GitHub Issues
TeamCity integration with GitHub issue tracker enables you to create connections to issues associated with GitHub projects. You need to create one issue tracker connection for each GitHub repository. After the connection is created, TeamCity displays links to GitHub issues in the TeamCity UI (for example, when these issues are mentioned in a commit message).
If your GitHub repository is public, you can configure the connection with Anonymous authentication. More generally, for private repositories, you need to ensure that the provided credentials have sufficient permission to access the connected repository.
If you already have a GitHub connection or a GitHub App connection configured in your TeamCity project (under Project Settings | Connections), you can use these connections to simplify the creation of a new GitHub Issues connection.
Creating a GitHub Issues Connection
Before creating a GitHub Issues connection:
Ensure that the GitHub issues feature is enabled in the corresponding repository and that there is at least one issue in the repository, so that you can test the connection.
If you want to leverage a GitHub connection or a GitHub App connection to create the issue tracker connection, make sure that a connection of this type already exists in Project Settings | Connections.
To create a new issue tracker connection for GitHub Issues:
Go to Project Settings | Issue Trackers and click Create new connection.
In the Create New Issue Tracker Connection dialog, select GitHub as the Connection Type.
In the Display Name field, enter a symbolic name that will be used to identify this issue tracker connection in the TeamCity UI.
In the Repository URL field, enter the URL of the GitHub repository's main page (not the URL for cloning).
Configure using an existing GitHub connection
If you have a GitHub connection or a GitHub App connection configured in the current project, you can use them to initialize this connection.
Next to the Repository URL field click the icon corresponding either to the GitHub connection or the GitHub App connection.
If this is the first time you use the connection, TeamCity prompts you to Sign in to GitHub or Sign in to GitHub App. When you click the button, you are redirected to a pop-up window to authorize access to your GitHub account.
TeamCity loads a list of accessible repositories and displays the list with a filter box. Enter some text in the box to find the repository you want and then select it from the list.
TeamCity automatically fills in the authentication and authorization fields in the dialog.
Choose one of the following Authentication options from the dropdown list:
Access Token — enter your GitHub personal access token in the Access token field
Username / Password — deprecated consider using an access token instead
GitHub App access token — select a GitHub App access token from the dropdown list (requires at least one GitHub App connection to be configured in this project)
In the Issue ID Pattern field, specify a regular expression pattern to filter the issues that belong to this project. You can usually leave this at the default setting,
#(\d+). See Converting Strings into Links to Issues.
Click Test Connection and follow the dialog instructions to test the issue tracker connection.