Skip to content

Commit

Permalink
fix(web): fix webhooks without action not working... ?
Browse files Browse the repository at this point in the history
Maybe. Refers #31
  • Loading branch information
dsevillamartin committed May 27, 2018
1 parent 7ca752d commit 1246cb4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Web.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ app.post('/', (req, res) => {

const repo = data.project.path_with_namespace;
const channels = ChannelConfig.findByRepo(repo);
const actionText = data.object_attributes && data.object_attributes.action ? `/${data.object_attributes.action}` : '';
const action = data.object_attributes && (data.object_attributes.action || data.object_attributes.state);
const actionText = action ? `/${action}` : '';
Log.verbose(`GitLab | ${repo} - ${eventName}${actionText} (${channels.size} channels)`);
res.send(`${data.project.path_with_namespace} : Received ${eventName}${actionText}, emitting to ${channels.size} channels...`);
const eventResponse = GitlabEventHandler.use(data, event);
Expand Down

0 comments on commit 1246cb4

Please sign in to comment.