Skip to content

add only_allow_merge_if_build_succeeds option to project objects#155

Merged
gpocentek merged 2 commits intopython-gitlab:masterfrom
rafaeleyng:add-only_allow_merge_if_build_succeeds
Sep 23, 2016
Merged

add only_allow_merge_if_build_succeeds option to project objects#155
gpocentek merged 2 commits intopython-gitlab:masterfrom
rafaeleyng:add-only_allow_merge_if_build_succeeds

Conversation

@rafaeleyng
Copy link
Copy Markdown
Contributor

No description provided.

@gpocentek
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

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

@gpocentek
Copy link
Copy Markdown
Contributor

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

@rafaeleyng
Copy link
Copy Markdown
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