Use Sawyer Resource array notation in Github Importer
What does this MR do and why?
This is the third of a series of merge requests to convert Octokit returned objects into a hash before using it in the codebase in order to rely less on Sawyer::Resource objects
This change updates several classes in GitHub Import to use array notation instead of dot notation when accessing properties of Sawyer::Resource objects. Bear in mind that this change doesn't convert Octokit returned objects into hashes yet, which means that GitHub Import is still using Sawyer::Resource objects. A future MR will handle the conversion to a hash after all classes are converted to the array notation.
By the way, a few remaining classes still need to be converted, which will be handled in follow-up MRs.
Related to: https://gitlab.com/gitlab-org/gitlab/-/issues/372472
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
- Create a new project, and choose to import from Github
- Provide your personal access token
- Then you should see a list of repositories
- Select one and import it
- Check if everything is imported
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.