Skip to content

feat: import from bitbucket server #1283

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
Feb 5, 2021

Conversation

fajpunk
Copy link

@fajpunk fajpunk commented Feb 4, 2021

I'd like to use this libary to automate importing Bitbucket Server
repositories into GitLab. There is a GitLab API
endpoint

to do this, but it is not exposed through this library.

@fajpunk
Copy link
Author

fajpunk commented Feb 4, 2021

I cribbed this directly from the existing import_github method

Copy link
Member

@nejch nejch left a comment

Choose a reason for hiding this comment

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

Looks great @fajpunk thanks! Just a few notes.

I was going to suggest adding some docs (like in https://github.com/python-gitlab/python-gitlab/blob/77ac8c300fc647f18d4a71b84ae18a751bc1716f/docs/gl_objects/projects.rst#import--export) but the docstring, like for github is already pretty descriptive.

I'd like to use this libary to automate importing Bitbucket Server
repositories into GitLab.  There is a [GitLab API
endpoint](https://docs.gitlab.com/ee/api/import.html#import-repository-from-bitbucket-server)
to do this, but it is not exposed through this library.

* Add an `import_bitbucket_server` method to the `ProjectManager`.  This
  method calls this GitLab API endpoint:
  https://docs.gitlab.com/ee/api/import.html#import-repository-from-bitbucket-server
* Modify `import_gitlab` method docstring for python3 compatibility
* Add a skipped stub test for the existing `import_github` method
@nejch nejch merged commit b48563f into python-gitlab:master Feb 5, 2021
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