Skip to content
New issue

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

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

Already on GitHub? # to your account

Added support for version 4 of the Gitlab API #100

Merged
merged 3 commits into from
Nov 14, 2017

Conversation

zyronix
Copy link
Contributor

@zyronix zyronix commented Oct 27, 2017

Hi,

As already discussed, I managed to get this project to run with gitlab API version 4. A new parameter has been added to the config, gitlab_api_version, which defaults to version 3 for backward compatibility (even when it is not set).

I tested it with Gitlab 8, 9 & 10 all seem to be working fine.

The only thing that is still left to do is update the documentation. I could add it to this PR as well, but I saw that it was part of the release process and thus left it out.

The main difference here is that the python requirements are different. The basic requirement is to install python-gitlab (and its dependencies).

Copy link
Owner

@samrocketman samrocketman left a comment

Choose a reason for hiding this comment

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

docs/prerequisites.md still mentions setting up python-gitlab3.

@zyronix
Copy link
Contributor Author

zyronix commented Nov 3, 2017

It should be noted that the correct version of this project works with the latest version of gitlab. The api v4 has not yet been removed. Regarding sams comment, I hope to find some time this weekend to update the documentation so this can be merged.

@samrocketman
Copy link
Owner

@zyronix thanks if you don't get to it I can merge it and update the docs myself.

@timofonic it's not dead per day. Mostly in maintenance mode if you were to classify it at all. I haven't developed any new features but do wish to keep the project working and compatible with GitLab. I still use gitlab-mirrors myself to mirror projects to different places. I still see value in keeping this project around simply by the activity from people using it.

config.sh.SAMPLE Outdated
@@ -42,6 +42,8 @@ gitlab_url="https://gitlab.example.com"
gitlab_user="gitmirror"
#Generate a token for your $gitlab_user and set it here.
gitlab_user_token_secret="$(head -n1 "${user_home}/private_token" 2> /dev/null || echo "")"
#Sets the Gitlab API version, either 3 or 4
gitlab_api_version=3
Copy link
Contributor

Choose a reason for hiding this comment

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

Default to 4. Version 4 was supported in Gitlab 9.

Copy link
Owner

Choose a reason for hiding this comment

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

I am OK with defaulting to v4.

@zyronix
Copy link
Contributor Author

zyronix commented Nov 13, 2017

I have updated the documentation and felt so free to predict that you are going to create a 0.6 release :). Any more changes required?

Copy link
Owner

@samrocketman samrocketman left a comment

Choose a reason for hiding this comment

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

Looks good to me. I'll test this in the development branch before releasing to master.

@samrocketman samrocketman merged commit 900e508 into samrocketman:development Nov 14, 2017
lonet4 pushed a commit to lonet4/gitlab-mirrors that referenced this pull request Nov 13, 2018
* Added support for version 4 of the Gitlab API

* Defaulting to APIv4

* Updated documentation
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants