Skip to content

Commit 12bcbdc

Browse files
committed
bug #119 Trigger rename title when we remove a label (Nyholm)
This PR was merged into the master branch. Discussion ---------- Trigger rename title when we remove a label See all actions here: https://developer.github.com/webhooks/event-payloads/#pull_request Commits ------- 99f747c Trigger rename title when we remove a label
2 parents d93f3ec + 99f747c commit 12bcbdc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Subscriber/AutoUpdateTitleWithLabelSubscriber.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ public function __construct(LabelApi $labelsApi, LabelNameExtractor $labelExtrac
3131
public function onPullRequest(GitHubEvent $event)
3232
{
3333
$data = $event->getData();
34-
if ('labeled' !== $action = $data['action']) {
34+
$action = $data['action'];
35+
if (!in_array($action, ['labeled', 'unlabeled'])) {
3536
return;
3637
}
38+
3739
if (!isset($data['pull_request'])) {
3840
// Only update PullRequests
3941
return;

0 commit comments

Comments
 (0)