module Octokit::Client::ActionsWorkflowRuns
Public Instance Methods
Cancels a workflow run
@param repo [Integer, String, Repository
, Hash] A GitHub repository @param id [Integer] Id of a workflow run
@return [Boolean] Returns true if the cancellation was accepted @see developer.github.com/v3/actions/workflow-runs/#cancel-a-workflow-run
# File lib/octokit/client/actions_workflow_runs.rb, line 64 def cancel_workflow_run(repo, id, options = {}) boolean_from_response :post, "#{Repository.path repo}/actions/runs/#{id}/cancel", options end
Deletes a workflow run
@param repo [Integer, String, Repository
, Hash] A GitHub repository @param id [Integer] Id of a workflow run
@return [Boolean] Returns true if the run is deleted @see docs.github.com/en/rest/reference/actions#delete-a-workflow-run
# File lib/octokit/client/actions_workflow_runs.rb, line 75 def delete_workflow_run(repo, id, options = {}) boolean_from_response :delete, "#{Repository.path repo}/actions/runs/#{id}", options end
Delets all log files of a workflow run
@param repo [Integer, String, Repository
, Hash] A GitHub repository @param id [Integer] Id of a workflow run
@return [Boolean] Returns true if the logs are deleted @see developer.github.com/v3/actions/workflow-runs/#delete-workflow-run-logs
# File lib/octokit/client/actions_workflow_runs.rb, line 100 def delete_workflow_run_logs(repo, id, options = {}) boolean_from_response :delete, "#{Repository.path repo}/actions/runs/#{id}/logs", options end
List all workflow runs for a repository
@param repo [Integer, String, Repository
, Hash] A GitHub repository @option options [String] :actor Optional filtering by the login of a user @option options [String] :branch Optional filtering by a branch @option options [String] :event Optional filtering by the event type (e.g. push, pull_request, issue) @option options [String] :status Optional filtering by a status or conclusion (e.g. success, completed…)
@return [Sawyer::Resource] the total count and an array of workflows @see developer.github.com/v3/actions/workflow-runs/#list-repository-workflow-runs
# File lib/octokit/client/actions_workflow_runs.rb, line 30 def repository_workflow_runs(repo, options = {}) paginate "#{Repository.path repo}/actions/runs", options end
Re-runs a workflow run
@param repo [Integer, String, Repository
, Hash] A GitHub repository @param id [Integer] Id of a workflow run
@return [Boolean] Returns true if the re-run request was accepted @see developer.github.com/v3/actions/workflow-runs/#re-run-a-workflow
# File lib/octokit/client/actions_workflow_runs.rb, line 53 def rerun_workflow_run(repo, id, options = {}) boolean_from_response :post, "#{Repository.path repo}/actions/runs/#{id}/rerun", options end
Get a workflow run
@param repo [Integer, String, Repository
, Hash] A GitHub repository @param id [Integer] Id of a workflow run
@return [Sawyer::Resource] Run information @see developer.github.com/v3/actions/workflow-runs/#get-a-workflow-run
# File lib/octokit/client/actions_workflow_runs.rb, line 42 def workflow_run(repo, id, options = {}) get "#{Repository.path repo}/actions/runs/#{id}", options end
Get a download url for archived log files of a workflow run
@param repo [Integer, String, Repository
, Hash] A GitHub repository @param id [Integer] Id of a workflow run
@return [String] URL to the archived log files of the run @see developer.github.com/v3/actions/workflow-runs/#download-workflow-run-logs
# File lib/octokit/client/actions_workflow_runs.rb, line 86 def workflow_run_logs(repo, id, options = {}) url = "#{Repository.path repo}/actions/runs/#{id}/logs" response = client_without_redirects.head(url, options) response.headers['Location'] end
List all runs for a repository workflow
@param repo [Integer, String, Repository
, Hash] A GitHub repository @param workflow [Integer, String] Id or file name of the workflow @option options [String] :actor Optional filtering by a user @option options [String] :branch Optional filtering by a branch @option options [String] :event Optional filtering by the event type @option options [String] :status Optional filtering by a status or conclusion
@return [Sawyer::Resource] the total count and an array of workflows @see developer.github.com/v3/actions/workflow-runs/#list-workflow-runs
# File lib/octokit/client/actions_workflow_runs.rb, line 15 def workflow_runs(repo, workflow, options = {}) paginate "#{Repository.path repo}/actions/workflows/#{workflow}/runs", options end