Refactoring artifacts to artifacts_archive and metadata to artifacts_archive_metadata
Problems
Previously, when we mention "artifacts", that means archived artifacts which can be generated by artifacts: paths: keyword in gitlab-ci.yml.
However, we're planning to introduce various kinds of artifacts, such as junit test-report. Having "artifacts" is confusing that it could also mean junit test-report, instead of archived artifacts.
In fact, we have such code today. job.artifacts? can read as "Does the job has any artifacts?", but this method actually asks "Does the job has any general artifacts?" (which means it doesn't care report-type artifacts)
class Dependency < Grape::Entity
expose :id, :name, :token
expose :artifacts_file, using: JobArtifactFile, if: ->(job, _) { job.artifacts? }
end
We should refactor artifacts_file to artifacts_archive_file, and artifacts_metadata_file to artifacts_archive_metadata_file
Edited by 🤖 GitLab Bot 🤖