GitHub Pull Request Plugin Builds
I like the ability to maintain only one VCS root and still enable a dedicated PR build configuration. However, TeamCity is not picking up PRs. Manually triggered builds of non-pr branches work just fine. Can someone please either point me to more in-depth documentation then the little more than one paragraph in the official docs or point out to me what magical, voodoo setting I am missing here?
Feature state:
- I have enabled the GitHub Pull Requests feature.
- I have enabled the Commit Status Publisher feature.
- I have removed the PR branch specification from my VCS root definition.
- I have ensured that I have a VCS trigger present and enabled.
- The repository is private
- There are no webhooks in play
Configuration state:
- The GitHub PR feature uses VCS-configured password auth and has author filter set to everyone. I have also attempted SSH VCS root auth paired with token auth in the plugin with no difference
- The VCS trigger has a branch filter of: +:/pull/*
- All connections pass tests.
- The service user has Admin privileges on the repository.
Please sign in to leave a comment.
Hi Marvin,
The configuration seems correct initially, and you can verify that the PR plugin is doing its job if TeamCity is able to detect the changes in the PRs, even if it doesn't trigger the builds. If that's the case, then the trigger is probably malformed. The "/pull/*" would seem problematic, as the logical branch name match is "pull/*" instead, which likely means that the starting "/ " makes the string not match and thus it won't trigger.
If the changes aren't even being detected, then that seems like there is an issue with the configuration for the VCS. Could you try removing the pull requests feature and adding the pull requests by hand to the branch specification, then checking whether new changes are being detected?
As a matter of fact, my interim solution was to set up a second VCS root configured to look at only pull request branches. Using that root, disabling the pull request plugin, and removing the VCS trigger branch filter enabled that particular build configuration to operate as expected. This leaves three factors as possible causes: the trigger filter, the repository - I don't have enough information about the operation of the plugin to surmise this - or the plugin itself.
Based upon that and your information, I believe that either the VCS trigger's branch filter was, as you said, malformed, or there is actually a bug hiding in here somewhere. I will attempt to exclude the trigger filter as the source of the problem for certain on Monday to be sure. Unfortunately, I have another project with the exact same configuration as in the original post that is operating as expected. The only difference is the repository. Off the cuff, this would lead me to believe that the trigger filter does in fact work.
Could it be based upon some aspect of the repository?
Well, that would be indeed interesting. I'll wait for the results of your tests, and will try to answer your question in the meantime.
While we strive to publish everything at its best, just like for everybody, some bugs might slip through. I am not aware of any issue right now that would match that behaviour, but if we can replicate it somehow or if you would be able to generate a project using a public repo that we can use to replicate the exact issue on our side, that would be helpful.
As mentioned, with or without trigger, if you add the feature, the changes should show up as pending in the build configuration. If TeamCity detects them, but doesn't trigger, then the issue is most likely the trigger configuration. If they don't show up, then it's either the plugin or the repo, and we'd be able to investigate deeper into it.