diff options
author | Andrew Tergis <andrew.tergis@littlebits.com> | 2019-12-03 16:14:24 -0500 |
---|---|---|
committer | Andrew Tergis <andrew.tergis@littlebits.com> | 2019-12-16 13:41:59 -0500 |
commit | aa4d41b70b2a66c3de5a7dd19b0f7c151f906630 (patch) | |
tree | 9548efbfb5d0fcff6c7e66f1e3bc65313341485f /gitlab/cli.py | |
parent | 61eaad2ff32776c121eeb67202b0063a7b1cc2e1 (diff) | |
download | gitlab-aa4d41b70b2a66c3de5a7dd19b0f7c151f906630.tar.gz |
feat: add support for /import/github
Addresses python-gitlab/python-gitlab#952
This adds a method to the `ProjectManager` called `import_github`, which
maps to the `/import/github` API endpoint. Calling `import_github` will
trigger an import operation from <repo_id> into <target_namespace>,
using <personal_access_token> to authenticate against github. In
practice a gitlab server may take many 10's of seconds to respond to
this API call, so we also take the liberty of increasing the default
timeout (only for this method invocation).
Unfortunately since `import` is a protected keyword in python, I was unable
to follow the endpoint structure with the manager namespace. I'm open to
suggestions on a more sensible interface.
I'm successfully using this addition to batch-import hundreds of github
repositories into gitlab.
Diffstat (limited to 'gitlab/cli.py')
0 files changed, 0 insertions, 0 deletions