Support the `retry_job`/`retry_pipeline` command for dev pipelines
Roughly, the changes needed is:
diff --git a/triage/processor/gitlab_internal_commands/command_retry_pipeline_or_job.rb b/triage/processor/gitlab_internal_commands/command_retry_pipeline_or_job.rb
index ec5bbb41..926c5f5f 100644
--- a/triage/processor/gitlab_internal_commands/command_retry_pipeline_or_job.rb
+++ b/triage/processor/gitlab_internal_commands/command_retry_pipeline_or_job.rb
@@ -125,7 +125,7 @@ module Triage
def retry_pipeline_or_job
return unless project_id_from_incident_label
- Triage.api_client.send(client_request, project_id_from_incident_label, args_id)
+ Triage.api_client(event.instance).send(client_request, project_id_from_incident_label, args_id)
rescue Gitlab::Error::NotFound
{ error_type: NOT_FOUND_ERROR }
rescue Gitlab::Error::Forbidden
and then allow the command on actual dev
projects, by modifying the following method:
def from_allowed_group_or_project?
event.from_gitlab_org_distribution? ||
event.from_gitlab_org_build? ||
event.from_gitlab_org_cloud_native? ||
event.from_gitlab_org_charts? ||
ALLOWED_PROJECTS.include?(event.project_id)
end