[go: up one dir, main page]

Skip to content

Restrict usage of project creator method for group::source code

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Like in #350603 (closed), we have some usages of project.creator that mean something like "just get the creator, is probably the owner". Due to the semantic difference between them, it's a good thing to restrict the creator method to cases when the creator of the project is strictly needed.

I see 309 occurrences of .creator according to a grep. Upon a quick skim most seem to be project.creator and some of them will not need changing.

See &7405 (comment 818917873) for more context.

The vast majority of instances of creator are in specs/factories/fixtures excepting the below 👇

Instances of .creator in code (not specs)

Code location Action MR Team
app/services/projects/protect_default_branch_service.rb#L38 Ensuring a protected branch can be made. - groupsource code
ee/app/workers/repository_update_mirror_worker.rb#L24 Updating a repo via mirror. - groupsource code
app/workers/repository_update_remote_mirror_worker.rb#L45 Updating a remote repo via mirror. - groupsource code

Availability and Testing

  • Run e2e:package-and-test job within the MRs for the code changes listed above. If the change is small enough / has low risk, this job may be skipped. Please review with a domain expert and groupsource code SET before deciding to skip e2e:package-and-test
Edited by 🤖 GitLab Bot 🤖