Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc8e067c

Browse files
committed
Update git-triggers.md
1 parent9f55505 commitc8e067c

File tree

1 file changed

+23
-19
lines changed

1 file changed

+23
-19
lines changed

‎_docs/configure-ci-cd-pipeline/triggers/git-triggers.md‎

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ max-width="50%"
6767

6868
**Support pull request events from forks* - toggle that is useful for open source projects.
6969
**Branch Field* - this is a regular expression and will only trigger for branches that match this naming pattern.
70-
**PR CommentField* - useful for open source projects.
70+
**PR Comment(restricted) and PR Comment Fields* - useful for open source projects.
7171
**Pull Request Target* branch - this is a regular expression and will trigger only when a Pull request is created against any branch that matches it.
7272
**Modified Files* - allows you to constrain the build and trigger it only if the modified files from the commit match this[glob expression](https://en.wikipedia.org/wiki/Glob_(programming)).
7373

@@ -109,25 +109,38 @@ Notice also that you can use Negative Lookahead in your Branch (Regex Expression
109109
This will make all push-events (including tags) that do follow the`tag...` pattern to be excluded.
110110
Therefore, all tags like`tag1`,`tag-X`**won't** trigger the pipeline.
111111

112-
###Support for building pull requestsfromforks
112+
###Pull Requestsfromcomments
113113

114-
By default, the Git trigger works for events comingfromyour personal repository. You can also use triggers from events thatarecoming from forks. This is a very useful featureforopen source projects, as it allows you to run your own unit testsandother checks against a new feature*before* actually merging it in your repo.
114+
Pull Requestsfromcommentsaresupportedforall Git providers, for privateandpublic repositories.
115115

116-
To enable this behavior:
116+
**Pull request comment added (restricted)**
117+
This option triggers an event only when the PR comments are made by repository owners or collaborators.
117118

118-
* Toggle the*support pull request events from forks* switch
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_.
119+
**Pull request comment added**
120+
This option triggers an event when PR comments are made by any user, regardless of their permissions.
121+
Because it is not restricted to owners and collaborators, this option is useful in GitHub, to enable triggers for PR comments made by users in GitHub teams.
122122

123-
{% include image.html
123+
>We strongly recommend selecting this option only for_private repositories_.
124+
125+
126+
{% include image.html
124127
lightbox="true"
125128
file="/images/pipeline/triggers/pr-comment-trigger-options.png"
126129
url="/images/pipeline/triggers/pr-comment-trigger-options.png"
127130
alt="Trigger options for PR comments"
128131
caption="Trigger options for PR comments"
129132
max-width="50%"
130133
%}
134+
135+
136+
###Support for building pull requests from forks
137+
138+
By default, the Git trigger works 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.
139+
140+
To enable this behavior:
141+
142+
* Toggle the*support pull request events from forks* switch
143+
* Select*Pull request comment added (restricted)*
131144
* In the*pr comment* field enter a custom string (accepts regex)
132145

133146
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.
@@ -145,22 +158,13 @@ Once that is done, Codefresh will launch your pipeline against the Pull Request.
145158

146159
When supporting building of pull requests from forks there are a few "gotchas" to look out for:
147160

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-
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
161+
* 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.
155162
* Only git pushes by collaborators within the GitHub organization will result in the pipeline being triggered
156163
* 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.
157164
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.
158165
* 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.
159166

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.
162167

163-
>Select this only for private GitHub repositories.
164168

165169
###Monorepo support (Modified files)
166170

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp