Giter Site home page Giter Site logo

Comments (12)

spruce avatar spruce commented on June 16, 2024 1

Can you maybe document your workaround somewhere. I actually would like to have it in the README aswell for others who have the same problem

from node-gitlab-2-github.

ANDRIUS-D-ILGUNAS avatar ANDRIUS-D-ILGUNAS commented on June 16, 2024

Oh, this is in the github api module (routes.json) so it's not really something this tool messes with. Please feel free to close this. I'm going to leave it open in case you want to track this.

from node-gitlab-2-github.

spruce avatar spruce commented on June 16, 2024

If you have created a Issue over at the other repo I'd like to close this issue as I like clean repos.

from node-gitlab-2-github.

ANDRIUS-D-ILGUNAS avatar ANDRIUS-D-ILGUNAS commented on June 16, 2024

I haven't created an issue over there, as I've found a work-around. No reason to keep this one open.

from node-gitlab-2-github.

jordanflagco avatar jordanflagco commented on June 16, 2024

I'm having this issue too, the Gitlab attachments are linking to https://github.com/uploads/{{GitlabHash}} instead of either being reuploaded to Github, or remaining linked to Gitlab.

from node-gitlab-2-github.

spruce avatar spruce commented on June 16, 2024

I think we are currently not migrating any attachments. this commit did add labels to the issues which need attachments migrated manually: 3fd53c8#diff-168726dbe96b3ce427e7fedce31bb0bcR312
A PR migrating that would be awesome !!!

from node-gitlab-2-github.

jordanflagco avatar jordanflagco commented on June 16, 2024

Yeah, I saw that it adds a label, which is helpful. I think I'll take a look at how difficult it would be to add automatic migrations while my team does the manual one. 😄

from node-gitlab-2-github.

chraibi avatar chraibi commented on June 16, 2024

@spruce I don't think labeling the issue with "attachment" is nice.

For my needs, I removed that part and fixed the link to the uploaded files as follows:

in function addMigrationLine(str, item)

    if (str.indexOf('/uploads/') > -1)                                                                                                                                      
    {                                                                                                                                                                       
        str = str.slice(0,str.indexOf('/uploads/')) +  settings.gitlab.url + "/" + settings.github.owner + "/" + settings.github.repo  +                                    
str.slice(str.indexOf('/uploads/'))                                                                                                                                         
    }  

from node-gitlab-2-github.

spruce avatar spruce commented on June 16, 2024

Ok, But doesn't mean that you need to push all your uploads into you repo? In my understanding the URL gets reformatted to :github.com/owner/repo/uploads/*, no?

from node-gitlab-2-github.

chraibi avatar chraibi commented on June 16, 2024

Actually, not. No need to push the uploaded file to GitHub.

The URL gets reformatted to

GitlabHost/owner/repo/uploads/*

For example, this issue with an uploaded file was merged to GitHub using your code:

JuPedSim/jpsfire#10

Not that the text in GitLab is a link to the original GitLab-issue.
(just in case something goes south we can still see the original version).^^

Another example with a figure is JuPedSim/jpsfire#9

from node-gitlab-2-github.

spruce avatar spruce commented on June 16, 2024

But this would mean there now exists a dependency of the new repo onto the old repo. Which I find kind of bad as this destroys the possibilty to move away and shut down your own instance / or beeing locked out later (leaving uni or something similar)

from node-gitlab-2-github.

chraibi avatar chraibi commented on June 16, 2024

You make a good point. The perfect solution would be to automatically upload the files to GitHub with some API-commands. Any idea how to to it? From the official GitHub documentation there is no hint about this possibility. (probably it's not possible).

However, I think this issue was about fixing broken links, right?
If someone could figure out how to upload these files to GitHub, then links can be updated easily.
Till then, I don't see a better solution than linking to the old uploads..
(ignoring the files is not a solution)

from node-gitlab-2-github.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.