Can i trigger GitLab to push revision?


#1

Hello everyone,
My Company has decided on switching to Phabricator for code review purposes,
and recently I was asked to prevent a push command as long as the revision not approved.

I think that I should use the pre-push hook, but I encountered difficulties…

Has any of you made a similar transition and can guide me?

Thanks!


#2

If your developers are pushing directly to GitLab, then you need to install some pre-push hook in GitLab, which will prevent the forbidden pushes. You’ll need to implement the logic of that yourself.


#3

Thanks for your reply,
installing hook is the way i chose, but now I’m having a new problem…
Can I ask new question?
There is some way to trigger GitLab to push pending refs?

For example, when a developer A finished his commits, and decided to push them into git repository hosted in GitLab, the pre-push hook will send diff request to the relevant code reviewer(that can be done easily), and only when the code reviewer will accept the revision, then the Phabricator will trigger GitLab to push developer
A commits.

Thank you very much!


#4

That sounds very hard to implement, but maybe not impossible. https://secure.phabricator.com/T5000 is talking about some similar workflows, implemented by changing the git server behavior.


#5

Thanks for your reply!


#6

is there a guide on how to integrate Phabricator with gitlab? is it even possible?


#7

I think https://secure.phabricator.com/T4482 is what you’re looking for - just read “github” as “github” all around.


#8

Hi Eyal

Thank you for your prompt reply: )

I really mean gitlab ( not hub)

Did you mean the integration for gitlab and github with phabricator is identical?

Thank,

Achi

That’s what we are currently using …


#9

yes, as far as Phabricator is concerned, there’s no difference between GitHub and GitLab.