You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _docs/configure-ci-cd-pipeline/triggers/git-triggers.md
+24-2Lines changed: 24 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,12 +111,23 @@ Therefore, all tags like `tag1`, `tag-X` **won't** trigger the pipeline.
111
111
112
112
###Support for building pull requests from forks
113
113
114
-
By default, thegit triggerwill only work for events coming from your personal repository. You can also use triggers from events that are coming from forks. This is a very useful feature for open source projects, as it allows you to run your own unit tests and other checks against a new feature*before* actually merging it in your repo.
114
+
By default, theGit triggerworks for events coming from your personal repository. You can also use triggers from events that are coming from forks. This is a very useful feature for open source projects, as it allows you to run your own unit tests and other checks against a new feature*before* actually merging it in your repo.
115
115
116
116
To enable this behavior:
117
117
118
118
* Toggle the*support pull request events from forks* switch
119
-
* Check the*Pull request comment added* checkbox
119
+
* According to the restrictions to enforce based on the type of user who made the PR comment, select either:
120
+
**Pull request comment added (restricted)*: For all Git providers. To trigger only when the PR comments are made by repository owners or collaborators.
121
+
**Pull request comment added*: For GitHub only. To trigger when PR comments are made by any user, regardless of their permissions. We strongly recommend selecting this option only for_private repositories_.
* In the*pr comment* field enter a custom string (accepts regex)
121
132
122
133
Then once a contributor creates a fork of your repository and submits a pull request, you can review the code and then add a comment on your own that matches the PR comment expression.
@@ -134,12 +145,23 @@ Once that is done, Codefresh will launch your pipeline against the Pull Request.
134
145
135
146
When supporting building of pull requests from forks there are a few "gotchas" to look out for:
136
147
148
+
149
+
150
+
**Pull request comment added (restricted)**
151
+
152
+
This is the default option for triggers based on PR comments, for all Git providers.
153
+
137
154
* Only comments made by repository owners and[collaborators](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/adding-outside-collaborators-to-repositories-in-your-organization) will result in the pipeline being triggered
138
155
* Only git pushes by collaborators within the GitHub organization will result in the pipeline being triggered
139
156
* If the repository is in a GitHub organization, comments made by private members of the organization will not activate the trigger, even if they are set as an owner or collaborator. Private members means that they need to be explicitly added to the repository.
140
157
Access cannot be "inherited" by the GitHub team. Currently, only comments from Admins, or Collaborators (directly added, not via teams) are allowed, in order to be caught by this filter.
141
158
* The*Pull request comment added* checkbox should likely be the only one checked, or your pipeline may trigger on other events that you don't anticipate.
142
159
160
+
**Pull request comment added**
161
+
This option is recommended only for GitHub, as the default behavior does not trigger build when comments are made by users in GitHub teams, even Admin users.
162
+
163
+
>Select this only for private GitHub repositories.
164
+
143
165
###Monorepo support (Modified files)
144
166
145
167
The*modified files* field is a very powerful Codefresh feature that allows you to trigger a build only if the