@@ -57,29 +57,29 @@ def get_disqus_sso(self, user):
57
57
sig = hmac .HMAC (self .DISQUS_API_SECRET , '%s %s' % (message , timestamp ), hashlib .sha1 ).hexdigest ()
58
58
return "{0} {1} {2}" .format (message , sig , timestamp )
59
59
60
- def update_comment (self , sketch , results , current_date , log_entry , openFailFlag , counter , total_sketches ):
61
- # Comment examples
62
- if not openFailFlag :
63
- log_entry = self .handle_example_comment (sketch , results , current_date , log_entry )
64
-
65
- # Comment libraries when finished commenting the examples
60
+ def update_comment (self , sketch , results , current_date , log_entry , openFailFlag , total_sketches ):
61
+ # Comment libraries
66
62
library_match = re .match (r'.+\/example\/(.+)\/.+' , sketch )
67
63
library = None
64
+ library_to_comment = None
68
65
if library_match :
69
66
library = library_match .group (1 )
70
67
if not self .last_library :
71
68
self .last_library = library
69
+ library_to_comment = library
72
70
73
- library_to_comment = None
74
- if self .last_library and self .last_library not in self .examples_without_library and library != self .last_library :
75
- library_to_comment = self .last_library
76
- if library and library not in self .examples_without_library and counter >= total_sketches - 1 :
71
+ if library != self .last_library :
77
72
library_to_comment = library
73
+
78
74
if library_to_comment :
79
75
log_entry = self .handle_library_comment (library_to_comment , current_date , log_entry )
80
76
81
77
self .last_library = library
82
78
79
+ # Comment examples
80
+ if not openFailFlag :
81
+ log_entry = self .handle_example_comment (sketch , results , current_date , log_entry )
82
+
83
83
return log_entry
84
84
85
85
def handle_library_comment (self , library , current_date , log ):
0 commit comments