Skip to content

Migrating multiple gitlab repos to Github #193

Open

Description

@vajralasrimani

With node-gitlab-github.. i see in settings.ts file in gitlab section i see the project id and in github section i see we need to pass the just one repo...

we have around 300-350 gitlab repos to migrate.. How can we do this with settings.ts file for multiple repos migration.. this is blocker.. Please help us on this asap

Activity

  1. vajralasrimani commented on Nov 30, 2023

    @vajralasrimani
    Author

    Can anyone please suggest on this? @akaihola @alystair @spruce @navanjr

  2. vajralasrimani commented on Dec 4, 2023

    @vajralasrimani
    Author

    Just wanted to check if anyone help here?

  3. jess789550 commented on Aug 5, 2026

    @jess789550

    Hi, I also am in a similar situation.

    ChatGPT has suggested this:

    Instead of hardcoding in settings.ts:

    projectId: 0,
    

    change it to:

    projectId: Number(process.env.GITLAB_PROJECT_ID),
    

    And change this:

    repo: '{{repo}}',
    

    To this:

    repo: String(process.env.GITHUB_REPO)
    

    Then you can run this:

    while read -r id repo; do
        echo "Migrating project $id -> $repo"
    
        GITLAB_PROJECT_ID="$id" \
        GITHUB_REPO="$repo" \
        npm start
    
    done < project_ids.txt
    

    My project_ids.txt looked like this:

    123 repoA
    456 repoB
    789 repoC
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions