@@ -382,9 +382,6 @@ def run(
382
382
self .build_force = force
383
383
self .config = None
384
384
385
- # send Webhook notification for build `triggered`
386
- self .send_notifications (send_email = False )
387
-
388
385
setup_successful = self .run_setup (record = record )
389
386
if not setup_successful :
390
387
return False
@@ -567,8 +564,9 @@ def run_build(self, docker, record):
567
564
# TODO the build object should have an idea of these states,
568
565
# extend the model to include an idea of these outcomes
569
566
outcomes = self .build_docs ()
570
- # send Webhook notification for build status `building`
567
+ # Send only Webhook notification for build status `building`
571
568
self .send_notifications (send_email = False )
569
+
572
570
build_id = self .build .get ('id' )
573
571
except vcs_support_utils .LockTimeout as e :
574
572
self .task .retry (exc = e , throw = False )
@@ -592,7 +590,7 @@ def run_build(self, docker, record):
592
590
if self .build_env .failed :
593
591
self .send_notifications ()
594
592
595
- # send Webhook notification for build `successful`
593
+ # Send only Webhook notification for build `successful`
596
594
if self .build_env .successful :
597
595
self .send_notifications (send_email = False )
598
596
@@ -834,6 +832,7 @@ def build_docs(self):
834
832
:rtype: dict
835
833
"""
836
834
self .build_env .update_build (state = BUILD_STATE_BUILDING )
835
+
837
836
before_build .send (sender = self .version )
838
837
839
838
outcomes = defaultdict (lambda : False )
@@ -1455,6 +1454,7 @@ def webhook_notification(version, build, hook_url):
1455
1454
'slug' : project .slug ,
1456
1455
'build' : {
1457
1456
'id' : build .id ,
1457
+ 'commit' : build .commit ,
1458
1458
'state' : build .state ,
1459
1459
'success' : build .success ,
1460
1460
'date' : build .date .strftime ('%Y-%m-%d %H:%M:%S' ),
0 commit comments