Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/gitlab/client/runners.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,11 @@ def delete_runner(id)
# Gitlab.runner_jobs(1)
#
# @param [Integer] id The ID of a runner.
# @param [String] status The job status filter
# @return [Array<Gitlab::ObjectifiedHash>]
def runner_jobs(runner_id)
get("/runners/#{url_encode runner_id}/jobs")
def runner_jobs(runner_id, status=nil)
filter = status.nil? ? "" : "?status=#{status}"
get("/runners/#{url_encode runner_id}/jobs#{filter}")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should pass a hash of options as a query. See the line 60 for an example.

end

# List all runners (specific and shared) available in the project. Shared runners are listed if at least one shared runner is defined and shared runners usage is enabled in the project's settings.
Expand Down