Follow-up from "Add audit event for downloading CI artifacts"
These two discussions !129608 (merged) should be addressed. They were simplified somewhat during review, but I think the combined usage of &.
and trailing if
guard clauses could be simplified, mostly for the ease of reading.
-
@huzaifaiftikhar1 started a discussion: (+1 comment) Suggestion: Technically we can remove safe navigation (
&.
) frombuild&.artifacts_file&.filename
since we will only execute this statement if theif clause
if true.audit_download(build, build.artifacts_file&.filename) if build.artifacts_file
-
@huzaifaiftikhar1 started a discussion: (+1 comment) audit_download(current_job, current_job.artifacts_file&.filename) if current_job.artifacts_file
I'm also not clear on which scenario would make the first part of this ||
statement not true.
-
@drew started a discussion: @sam.figueroa What's the case where a build here doesn't have an associated pipeline?