Skip to content

add only_allow_merge_if_build_succeeds option to project objects #155

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 2 commits into from
Sep 23, 2016
Merged

add only_allow_merge_if_build_succeeds option to project objects #155

merged 2 commits into from
Sep 23, 2016

Conversation

rafaeleyng
Copy link
Contributor

No description provided.

@gpocentek
Copy link
Contributor

The patch looks good, thank you. Please fix the pep8 failure and I'll merge.

@gpocentek gpocentek merged commit 26d97a7 into python-gitlab:master Sep 23, 2016
@rafaeleyng rafaeleyng deleted the add-only_allow_merge_if_build_succeeds branch September 23, 2016 17:08
@rafaeleyng
Copy link
Contributor Author

It didn't work =(

I tried:

    project.only_allow_merge_if_build_succeeds = True
    project.save()

and

    project.only_allow_merge_if_build_succeeds = 1
    project.save()

but none worked.

Am I doing something wrong?

@gpocentek
Copy link
Contributor

I tested here and everything seems to work, using a boolean value. Are you sure that your gitlab version support this attribute? It's recent.

@rafaeleyng
Copy link
Contributor Author

rafaeleyng commented Sep 29, 2016

I can set this value using the GUI, but I'm not sure about the API support.

Since I'm no Python developer, I may have done something wrong. Here is what I did:

$ sudo pip uninstall python-gitlab
$ git clone https://github.com/gpocentek/python-gitlab.git
$ cd python-gitlab
$ python setup.py install

Does this suffice to use the newest version containing the change introduced in this MR?

@gpocentek
Copy link
Contributor

Yes you should be able to use your change. Do you know the version of the gitlab server?

@gpocentek
Copy link
Contributor

From what I see in the git log you need gitlab 8.12 to get this feature in the API.

@rafaeleyng
Copy link
Contributor Author

We are using GitLab Community Edition 8.9.0.

I'll try to update and give you some input again.

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

Successfully merging this pull request may close these issues.

2 participants