module Octokit::Client::ActionsWorkflowRuns
Methods for the Actions Workflows runs API
Public Instance Methods
Source
# File lib/octokit/client/actions_workflow_runs.rb, line 73 def cancel_workflow_run(repo, id, options = {}) boolean_from_response :post, "#{Repository.path repo}/actions/runs/#{id}/cancel", options end
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
Source
# File lib/octokit/client/actions_workflow_runs.rb, line 84 def delete_workflow_run(repo, id, options = {}) boolean_from_response :delete, "#{Repository.path repo}/actions/runs/#{id}", 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
Source
# File lib/octokit/client/actions_workflow_runs.rb, line 109 def delete_workflow_run_logs(repo, id, options = {}) boolean_from_response :delete, "#{Repository.path repo}/actions/runs/#{id}/logs", options end
Delete 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
Source
# File lib/octokit/client/actions_workflow_runs.rb, line 37 def repository_workflow_runs(repo, options = {}) paginate "#{Repository.path repo}/actions/runs", options do |data, last_response| data.workflow_runs.concat last_response.data.workflow_runs end 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
Source
# File lib/octokit/client/actions_workflow_runs.rb, line 62 def rerun_workflow_run(repo, id, options = {}) boolean_from_response :post, "#{Repository.path repo}/actions/runs/#{id}/rerun", 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
Source
# File lib/octokit/client/actions_workflow_runs.rb, line 51 def workflow_run(repo, id, options = {}) get "#{Repository.path repo}/actions/runs/#{id}", 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
Source
# File lib/octokit/client/actions_workflow_runs.rb, line 95 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
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
Source
# File lib/octokit/client/actions_workflow_runs.rb, line 120 def workflow_run_usage(repo, id, options = {}) get "#{Repository.path repo}/actions/runs/#{id}/timing", options end
Get workflow run usage
@param repo [Integer, String, Repository
, Hash] A GitHub repository @param id [Integer] Id of a workflow run
@return [Sawyer::Resource] Run usage @see developer.github.com/v3/actions/workflow-runs/#get-workflow-run-usage
Source
# File lib/octokit/client/actions_workflow_runs.rb, line 20 def workflow_runs(repo, workflow, options = {}) paginate "#{Repository.path repo}/actions/workflows/#{workflow}/runs", options do |data, last_response| data.workflow_runs.concat last_response.data.workflow_runs end 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