[383842] GitHub importer: fix note attachments

What does this MR do and why?

It's a fix for GitHub importer: "Missing content-length header" during attachments fetching.

  • Avoid attempts to download other GitHub projects blob files.
  • Convert links from import source blob files to import target blob files.

Screenshots or screen recordings

Local test

How to set up and validate locally

1. Setup GitHub repository with an Issue/MR with notes that:

  • include attachments
  • include link to imported repository files (blob)
  • include link to other GitHub repository files (blob)

2. Import this repo to GitLab with "Import Markdown attachments (links)" advanced import option.

3. Make sure that:

  • note attachments are downloaded to GitLab side and their links are updated.
  • links to imported repository files follows to target project files on GitLab side.
  • links to other GitHub repository files weren't changed.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Rostyslav Safonov

Merge request reports

Loading