summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-01-28 22:57:34 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2015-01-28 23:11:15 +0100
commit297eef8f53bca912ac2ee679f30fdd494ca570ad (patch)
tree1fbc6ed30a0a200c9e1c905a015facbbc0f4c6f6
parent9477da8b510a4a40e608c72891d76d4fb0b79978 (diff)
downloadgitlab-ci-297eef8f53bca912ac2ee679f30fdd494ca570ad.tar.gz
Rename hostname in Runner's API to description
-rw-r--r--CHANGELOG2
-rw-r--r--lib/api/runners.rb4
-rw-r--r--spec/requests/api/runners_spec.rb2
3 files changed, 4 insertions, 4 deletions
diff --git a/CHANGELOG b/CHANGELOG
index fa47988..d920ae9 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,7 +1,7 @@
v7.8.0
- Fix OAuth login with GitLab installed in relative URL
- GitLab CI has same version as GitLab since now
- - Allow to pass hostname and tag list during Runner's registration
+ - Allow to pass description and tag list during Runner's registration
v5.4.1
- Fix 500 if on builds page if build has no job
diff --git a/lib/api/runners.rb b/lib/api/runners.rb
index 16abe00..2a97740 100644
--- a/lib/api/runners.rb
+++ b/lib/api/runners.rb
@@ -34,13 +34,13 @@ module API
if params[:token] == GitlabCi::REGISTRATION_TOKEN
# Create shared runner. Requires admin access
Runner.create(
- description: params[:hostname],
+ description: params[:description],
tag_list: params[:tag_list]
)
elsif project = Project.find_by(token: params[:token])
# Create a specific runner for project.
project.runners.create(
- description: params[:hostname],
+ description: params[:description],
tag_list: params[:tag_list]
)
end
diff --git a/spec/requests/api/runners_spec.rb b/spec/requests/api/runners_spec.rb
index 71557a3..18c63ea 100644
--- a/spec/requests/api/runners_spec.rb
+++ b/spec/requests/api/runners_spec.rb
@@ -46,7 +46,7 @@ describe API::API do
end
describe "should create a runner with description" do
- before { post api("/runners/register"), token: GitlabCi::REGISTRATION_TOKEN, hostname: "server.hostname" }
+ before { post api("/runners/register"), token: GitlabCi::REGISTRATION_TOKEN, description: "server.hostname" }
it { response.status.should == 201 }
it { Runner.first.description.should == "server.hostname" }