Skip to content

feat: import from bitbucket server - #1283

Merged
nejch merged 1 commit into
python-gitlab:masterfrom
fajpunk:import_bitbucket
Feb 5, 2021
Merged

feat: import from bitbucket server#1283
nejch merged 1 commit into
python-gitlab:masterfrom
fajpunk:import_bitbucket

Conversation

@fajpunk

@fajpunk fajpunk commented Feb 4, 2021

Copy link
Copy Markdown

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

fajpunk commented Feb 4, 2021

Copy link
Copy Markdown
Author

I cribbed this directly from the existing import_github method

@nejch nejch left a comment

Copy link
Copy Markdown
Member

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.

Comment thread gitlab/tests/objects/test_projects.py
Comment thread gitlab/v4/objects/__init__.py Outdated
Comment thread gitlab/tests/objects/test_projects.py
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
Comment thread gitlab/v4/objects/__init__.py
@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