Closed defagos closed 1 year ago
Tested with #170 which I submitted as PR, works fine. We should try a PR created by @waliid.
@waliid PRs were still not seen by TeamCity but our setup was incomplete.
The PR monitoring build feature we use was unable to detect Walid's PRs. Since our repository is open source, the build feature is namely configured to monitor PRs originating from members of the organization only. For this to work, though, the PR build feature must be configured with a GitHub API access token having the read:org
scope, otherwise required API calls will fail with a 302, preventing the build feature from correctly detecting that the PR issuer belongs to our organization.
To test whether a token has enough privileges you can call the following with a valid user name and the token to check if a 204 is correctly returned:
curl -I \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <token>"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/orgs/SRGSSR/members/<user>
This is not strictly necessary, but to have TeamCity correctly match committer identities with TeamCity user accounts it is sometimes needed to register VCS usernames under the profile section. If this setup is correct for a user, clicking on Changes at the top of the user interface will reveal the commits associated with the logged in user, otherwise a blank list.
Alternatively, a user can display all changes from all users, identify their own and click on a change to bind their account with the associated committer.
As a developer I need a working CI so that I get feedback quickly.
Acceptance criteria
Context
PRs do not seem to trigger status checks anymore. The following issue is reported in the build log:
Tasks