Python-Gitlab - Creating a subrepo and forking a group over to new sub repo using the API #1984
Unanswered
zechariahmoore
asked this question in
Q&A
Replies: 1 comment 1 reply
-
@zechariahmoore I'm having a hard time to understand what is the question. Can you add a 1-2 line question? Or a list of questions. As far as doing a fork. There is an example at: https://python-gitlab.readthedocs.io/en/main/gl_objects/projects.html#examples and upstream docs at: https://docs.gitlab.com/ee/api/projects.html#fork-project |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
hHey all I'm trying to demonstrate some code (python). Eventually this will be automated but we're just trying to trigger off the gitlab-python api right now.
The first of this is code is to create a new subgroup which uses a variable value to create a subgroup name. The variable value will be directly related to the client ID and name.
client_id length: 10 char
name length: 15 char
After having the client subgroup created - our second goal is to fork a existing repo into this subgroup. This will be automated as well.
I have my base code here - but it needs some love. Any pointers of how you'd put this together?
Other notes: We would like a way to get a specific group_id using the name (this may be confusing if we have similarly named groups). I have the below as a starting point thrown together
this obviously isn't done as I'm rehashing it from scrip that gets all project ids for a gitlab group - but I'd like to be able to get a specific group ID by name.
Any input is welcome - sorry I'm a bit new to all this.
Beta Was this translation helpful? Give feedback.
All reactions