Module: Octokit::Client::ActionsWorkflows
- Included in:
- Octokit::Client
- Defined in:
- lib/octokit/client/actions_workflows.rb
Overview
Methods for the Actions Workflows API
Instance Method Summary collapse
-
#workflow(repo, id, options = {}) ⇒ Sawyer::Resource
Get single workflow in a repository.
-
#workflow_dispatch(repo, id, ref, options = {}) ⇒ Boolean
Create a workflow dispatch event.
-
#workflows(repo, options = {}) ⇒ Sawyer::Resource
(also: #list_workflows)
Get the workflows in a repository.
Instance Method Details
#workflow(repo, id, options = {}) ⇒ Sawyer::Resource
Get single workflow in a repository
26 27 28 |
# File 'lib/octokit/client/actions_workflows.rb', line 26 def workflow(repo, id, = {}) get "#{Repository.path repo}/actions/workflows/#{id}", end |
#workflow_dispatch(repo, id, ref, options = {}) ⇒ Boolean
Create a workflow dispatch event
38 39 40 |
# File 'lib/octokit/client/actions_workflows.rb', line 38 def workflow_dispatch(repo, id, ref, = {}) boolean_from_response :post, "#{Repository.path repo}/actions/workflows/#{id}/dispatches", .merge({ ref: ref }) end |
#workflows(repo, options = {}) ⇒ Sawyer::Resource Also known as: list_workflows
Get the workflows in a repository
14 15 16 |
# File 'lib/octokit/client/actions_workflows.rb', line 14 def workflows(repo, = {}) paginate "#{Repository.path repo}/actions/workflows", end |