How to NOT build fork PRs for open source projects?

I have TeamCity configured with the Git plugin and everything works fine. I want to know how  to not run builds for pull requests that are from forked PRs. That is I don't want PRs triggered by outside users from my open source project to run their code against my build server. Right now I just have them disabled.

But I'm not sure how I can enable a rule like this,

+:refs/pull/(*)/merge

I got a warning from TeamCity when attempting to configure private env variables. That my builds allow for all PRs

0
1 comment

Hi Ahmad,

You could use some of our trigger rules to filter out commits (or filter in) by user, or several other parameters. Description and examples here: https://confluence.jetbrains.com/display/TCD10/Configuring+VCS+Triggers#ConfiguringVCSTriggers-VCSTriggerRules

This would stop the VCS Trigger from activating on commits that don't match the rule, so you could specify your user in an inclusive rule to stop all other users.

Other than that, it's just a commit on another branch, so it's very difficult to filter it out.

You can also watch and vote this issue, if you use commit signing: https://youtrack.jetbrains.com/issue/TW-46950

0

Please sign in to leave a comment.