Remove Duplicates from Releases Importer
What does this MR do and why?
Modifies the GitHub ReleasesImporter
to strip out and ignore any incoming releases with null
tags
Screenshots or screen recordings
[18] pry(main)> p
=> #<Project id:49 root/test2>>
[19] pry(main)> p_orig.releases.count
(0.4ms) SELECT COUNT(*) FROM "releases" WHERE "releases"."project_id" = 48 /*application:console,db_config_name:main,line:(pry):19:in `__pry__'*/
=> 2
After importing the test project with a null
tag release, the release has been stripped out
=> #<Project id:49 root/test2>>
[14] pry(main)> p.releases.count
(0.5ms) SELECT COUNT(*) FROM "releases" WHERE "releases"."project_id" = 49 /*application:console,db_config_name:main,line:(pry):14:in `__pry__'*/
=> 1
How to set up and validate locally
2022-01-24_13-20-708_root_test_export.tar.gz
- Import the test project that has two releases, one release with a null tag
- Check the new project releases page, it should only have one release
- Use the rails console to check that the new project only has one release
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.
Edited by Allen Cook