Module: Octokit::Client::ActionsArtifacts
- Included in:
- Octokit::Client
- Defined in:
- lib/octokit/client/actions_artifacts.rb
Overview
Methods for the Actions Artifacts API
Instance Method Summary collapse
-
#artifact(repo, id, options = {}) ⇒ Sawyer::Resource
Get an artifact.
-
#artifact_download_url(repo, id, options = {}) ⇒ String
Get a download URL for an artifact.
-
#delete_artifact(repo, id, options = {}) ⇒ Boolean
Delete an artifact.
-
#repository_artifacts(repo, options = {}) ⇒ Sawyer::Resource
List all artifacts for a repository.
-
#workflow_run_artifacts(repo, workflow_run_id, options = {}) ⇒ Sawyer::Resource
List all artifacts for a workflow run.
Instance Method Details
#artifact(repo, id, options = {}) ⇒ Sawyer::Resource
Get an artifact
37 38 39 |
# File 'lib/octokit/client/actions_artifacts.rb', line 37 def artifact(repo, id, = {}) get "#{Repository.path repo}/actions/artifacts/#{id}", end |
#artifact_download_url(repo, id, options = {}) ⇒ String
Get a download URL for an artifact
48 49 50 51 52 53 |
# File 'lib/octokit/client/actions_artifacts.rb', line 48 def artifact_download_url(repo, id, = {}) url = "#{Repository.path repo}/actions/artifacts/#{id}/zip" response = client_without_redirects.head(url, ) response.headers['Location'] end |
#delete_artifact(repo, id, options = {}) ⇒ Boolean
Delete an artifact
62 63 64 |
# File 'lib/octokit/client/actions_artifacts.rb', line 62 def delete_artifact(repo, id, = {}) boolean_from_response :delete, "#{Repository.path repo}/actions/artifacts/#{id}", end |
#repository_artifacts(repo, options = {}) ⇒ Sawyer::Resource
List all artifacts for a repository
15 16 17 |
# File 'lib/octokit/client/actions_artifacts.rb', line 15 def repository_artifacts(repo, = {}) paginate "#{Repository.path repo}/actions/artifacts", end |
#workflow_run_artifacts(repo, workflow_run_id, options = {}) ⇒ Sawyer::Resource
List all artifacts for a workflow run
26 27 28 |
# File 'lib/octokit/client/actions_artifacts.rb', line 26 def workflow_run_artifacts(repo, workflow_run_id, = {}) paginate "#{Repository.path repo}/actions/runs/#{workflow_run_id}/artifacts", end |