- Notifications
You must be signed in to change notification settings - Fork673
Commitaa4d41b

Andrew Tergis
feat: add support for /import/github
Addresses#952This adds a method to the `ProjectManager` called `import_github`, whichmaps to the `/import/github` API endpoint. Calling `import_github` willtrigger an import operation from <repo_id> into <target_namespace>,using <personal_access_token> to authenticate against github. Inpractice a gitlab server may take many 10's of seconds to respond tothis API call, so we also take the liberty of increasing the defaulttimeout (only for this method invocation).Unfortunately since `import` is a protected keyword in python, I was unableto follow the endpoint structure with the manager namespace. I'm open tosuggestions on a more sensible interface.I'm successfully using this addition to batch-import hundreds of githubrepositories into gitlab.1 parent61eaad2 commitaa4d41b
2 files changed
+90
-0
lines changedLines changed: 27 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
844 | 844 |
| |
845 | 845 |
| |
846 | 846 |
| |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
847 | 874 |
| |
848 | 875 |
| |
849 | 876 |
| |
|
Lines changed: 63 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4744 | 4744 |
| |
4745 | 4745 |
| |
4746 | 4746 |
| |
| 4747 | + | |
| 4748 | + | |
| 4749 | + | |
| 4750 | + | |
| 4751 | + | |
| 4752 | + | |
| 4753 | + | |
| 4754 | + | |
| 4755 | + | |
| 4756 | + | |
| 4757 | + | |
| 4758 | + | |
| 4759 | + | |
| 4760 | + | |
| 4761 | + | |
| 4762 | + | |
| 4763 | + | |
| 4764 | + | |
| 4765 | + | |
| 4766 | + | |
| 4767 | + | |
| 4768 | + | |
| 4769 | + | |
| 4770 | + | |
| 4771 | + | |
| 4772 | + | |
| 4773 | + | |
| 4774 | + | |
| 4775 | + | |
| 4776 | + | |
| 4777 | + | |
| 4778 | + | |
| 4779 | + | |
| 4780 | + | |
| 4781 | + | |
| 4782 | + | |
| 4783 | + | |
| 4784 | + | |
| 4785 | + | |
| 4786 | + | |
| 4787 | + | |
| 4788 | + | |
| 4789 | + | |
| 4790 | + | |
| 4791 | + | |
| 4792 | + | |
| 4793 | + | |
| 4794 | + | |
| 4795 | + | |
| 4796 | + | |
| 4797 | + | |
| 4798 | + | |
| 4799 | + | |
| 4800 | + | |
| 4801 | + | |
| 4802 | + | |
| 4803 | + | |
| 4804 | + | |
| 4805 | + | |
| 4806 | + | |
| 4807 | + | |
| 4808 | + | |
| 4809 | + | |
4747 | 4810 |
| |
4748 | 4811 |
| |
4749 | 4812 |
| |
|
0 commit comments
Comments
(0)