Skip to content

Commit 5724f9d

Browse files
committed
Name Dependabot runners accordingly
1 parent b32357f commit 5724f9d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

app/clients/gcloud_client.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,12 @@ def create_runner_instance(self, registration_token, repo_url, template_name):
7474
"Skipping instance creation.")
7575
return None
7676

77-
instance_name = f"runner-{uuid.uuid4().hex[:16]}"
77+
instance_uuid = uuid.uuid4().hex[:16]
78+
if instance_template_resource.name.startswith("dependabot"):
79+
instance_name = f"dependabot-{instance_uuid}"
80+
else:
81+
instance_name = f"runner-{instance_uuid}"
82+
7883
logger.info(f"Creating GCE instance {instance_name} with template {instance_template_resource.self_link}")
7984

8085
# Set instance name

0 commit comments

Comments
 (0)