File tree Expand file tree Collapse file tree
src/proxy/processors/push-action Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -91,10 +91,18 @@ async function exec(req: any, action: Action): Promise<Action> {
9191 action . commitFrom = action . commitData [ action . commitData . length - 1 ] . parent ;
9292 }
9393
94- const { committer, committerEmail } = action . commitData [ action . commitData . length - 1 ] ;
95- console . log ( `Push Request received from user ${ committer } with email ${ committerEmail } ` ) ;
96- action . user = committer ;
97- action . userEmail = committerEmail ;
94+ if ( req . user ) {
95+ console . log (
96+ `Push Request received from user ${ req . user . username } with email ${ req . user . email } ` ,
97+ ) ;
98+ action . user = req . user . username ;
99+ action . userEmail = req . user . email ;
100+ } else {
101+ const { committer, committerEmail } = action . commitData [ action . commitData . length - 1 ] ;
102+ console . log ( `Push Request received from user ${ committer } with email ${ committerEmail } ` ) ;
103+ action . user = committer ;
104+ action . userEmail = committerEmail ;
105+ }
98106 }
99107
100108 step . content = {
You can’t perform that action at this time.
0 commit comments