Skip to content

Fix custom hook output #197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 26, 2014

Conversation

dblessing
Copy link
Member

  1. Show stdout and stderr. Hooks might need to output info to user even if successful.

@dblessing dblessing force-pushed the fix/custom_hook_output branch from ffdc8f9 to d7f77f6 Compare November 12, 2014 21:34
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing whitespace detected.

@Razer6 Razer6 added this to the 7.5 milestone Nov 12, 2014
@dblessing dblessing force-pushed the fix/custom_hook_output branch from d7f77f6 to 17e2c2c Compare November 12, 2014 22:29
@@ -22,7 +22,8 @@ def post_receive(changes, repo_path)
def update(ref_name, old_value, new_value, repo_path)
hook = hook_file('update', repo_path)
return true if hook.nil?
system(hook, ref_name, old_value, new_value) ? true : false
system(hook, ref_name, old_value, new_value)
$?.exitstatus == 0 ? true : false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why use global variable if system returns valid value?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, sorry. I misunderstood how system works. Fixed.

@dblessing dblessing force-pushed the fix/custom_hook_output branch from 17e2c2c to 57c9080 Compare November 18, 2014 13:56
@dblessing dblessing changed the title Fix custom hook output and return values Fix custom hook output Nov 18, 2014
@dblessing
Copy link
Member Author

@randx I hope this can slip in to a release for GitLab 7.5. Otherwise users could be confused if they're testing custom hooks

@maxlazio
Copy link
Member

@dblessing I doubt it but it is up to @jacobvosmaer

@dzaporozhets
Copy link
Contributor

FYI: current gitlab-shell 2.3.0 is for 7.6.

@jacobvosmaer
Copy link
Contributor

This is a nice improvement but I think it is not worth the hassle this close to the 7.5.0 release.

jacobvosmaer added a commit that referenced this pull request Nov 26, 2014
@jacobvosmaer jacobvosmaer merged commit b205a18 into gitlabhq:master Nov 26, 2014
@jacobvosmaer
Copy link
Contributor

Thanks @dblessing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants