File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,17 @@ def lambda_handler(event, context):
98
98
'pstl' : LIBCXX_COMMITS_ADDRESS ,
99
99
'zorg' : LLVM_COMMITS_ADDRESS
100
100
}
101
+
102
+ # Never send mail about personal branches
103
+ if event ['ref' ].startswith ('refs/heads/users/' ):
104
+ return {
105
+ 'statusCode' : 200 ,
106
+ 'body' : {
107
+ "status" : True ,
108
+ "message" : "Ignoring commit to personal branch"
109
+ }
110
+ }
111
+
101
112
# Loop through the commits
102
113
for commit in event ['commits' ]:
103
114
# initialize variables
@@ -175,11 +186,8 @@ def lambda_handler(event, context):
175
186
# mail_to = os.environ['MAIL_TO']
176
187
mail_to = project_path_email [project ]
177
188
178
- # Never send mail about personal branches
179
- if event ['ref' ].startswith ('refs/heads/users/' ):
180
- break
181
-
182
- # Everything else on a non-trunk branch should be re-directed to the *branch* commits list
189
+ # Everything on a non-personal, non-trunk branches should be
190
+ # re-directed to the *branch* commits list
183
191
trunk_branches = ['refs/heads/main' , 'refs/heads/master' ]
184
192
if not event ['ref' ] in trunk_branches :
185
193
mail_to = LLVM_BRANCH_COMMITS_ADDRESS
You can’t perform that action at this time.
0 commit comments