File tree Expand file tree Collapse file tree 1 file changed +6
-14
lines changed
Expand file tree Collapse file tree 1 file changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -23,20 +23,12 @@ function buildMessage(event) {
2323 messageBlock . accessory . alt_text = `${ user . login } on GitHub` ;
2424 messageBlock . text . text = `*<${ user . html_url } |${ user . login } >* ` ;
2525
26- switch ( event . action ) {
27- case 'member_added' :
28- case 'added' :
29- messageBlock . text . text += 'was added to ' + type ;
30- break ;
31-
32- case 'member_removed' :
33- case 'removed' :
34- if ( user . login == event . sender . login ) {
35- messageBlock . text . text += 'removed themselves from ' + type ;
36- } else {
37- messageBlock . text . text += 'was removed from ' + type ;
38- }
39- break ;
26+ if ( event . action . includes ( 'added' ) ) {
27+ messageBlock . text . text += 'was added to ' + type ;
28+ } else if ( user . login == event . sender . login ) {
29+ messageBlock . text . text += 'removed themselves from ' + type ;
30+ } else {
31+ messageBlock . text . text += 'was removed from ' + type ;
4032 }
4133
4234 if ( user . login != event . sender . login ) {
You can’t perform that action at this time.
0 commit comments