@@ -45,20 +45,12 @@ public function setIssueStatus($issueNumber, $newStatus, Repository $repository)
45
45
}
46
46
47
47
$ newLabel = null === $ newStatus ? null : self ::$ statusToLabel [$ newStatus ];
48
- $ this ->logger ->info (sprintf (
49
- 'Fetching issue labels for issue %s, repository %s ' ,
50
- $ issueNumber ,
51
- $ repository ->getFullName ()
52
- ));
48
+ $ this ->logger ->info (sprintf ('Fetching issue labels for issue %s, repository %s ' , $ issueNumber , $ repository ->getFullName ()));
53
49
$ currentLabels = $ this ->labelsApi ->getIssueLabels ($ issueNumber , $ repository );
54
50
55
- $ this ->logger ->info (sprintf (
56
- 'Fetched the following labels: %s ' ,
57
- implode (', ' , $ currentLabels )
58
- ));
51
+ $ this ->logger ->info (sprintf ('Fetched the following labels: %s ' , implode (', ' , $ currentLabels )));
59
52
60
53
$ addLabel = true ;
61
-
62
54
foreach ($ currentLabels as $ label ) {
63
55
// Ignore non-status, except when the bug is reviewed
64
56
// but still marked as unconfirmed.
@@ -75,23 +67,13 @@ public function setIssueStatus($issueNumber, $newStatus, Repository $repository)
75
67
}
76
68
77
69
// Remove other statuses
78
- $ this ->logger ->debug (sprintf (
79
- 'Removing label %s from issue %s on repository %s ' ,
80
- $ label ,
81
- $ issueNumber ,
82
- $ repository ->getFullName ()
83
- ));
70
+ $ this ->logger ->debug (sprintf ('Removing label %s from issue %s on repository %s ' , $ label , $ issueNumber , $ repository ->getFullName ()));
84
71
$ this ->labelsApi ->removeIssueLabel ($ issueNumber , $ label , $ repository );
85
72
}
86
73
87
74
// Ignored if the label is already set
88
75
if ($ addLabel && $ newLabel ) {
89
- $ this ->logger ->debug (sprintf (
90
- 'Adding label "%s" to issue %s on repository %s ' ,
91
- $ newLabel ,
92
- $ issueNumber ,
93
- $ repository ->getFullName ()
94
- ));
76
+ $ this ->logger ->debug (sprintf ('Adding label "%s" to issue %s on repository %s ' , $ newLabel , $ issueNumber , $ repository ->getFullName ()));
95
77
$ this ->labelsApi ->addIssueLabel ($ issueNumber , $ newLabel , $ repository );
96
78
$ this ->logger ->debug ('Label added! ' );
97
79
}
@@ -108,7 +90,7 @@ public function getIssueStatus($issueNumber, Repository $repository)
108
90
}
109
91
110
92
// No status set
111
- return ;
93
+ return null ;
112
94
}
113
95
114
96
public static function getNeedsReviewLabel ()
0 commit comments