Sha256: 4b6690796653d529f6160ae5d615d35f912b4f710dbb3cd0663f7e2cd6dacbc6

Contents?: true

Size: 888 Bytes

Versions: 1

Compression:

Stored size: 888 Bytes

Contents

# frozen_string_literal: true

module DroneCI
  module SecretsAPI
    # https://docs.drone.io/api/secrets/secret_create/
    def secret_create(owner, repo, **body)
      api.post("repos/#{owner}/#{repo}/secrets", body)
    end

    # https://docs.drone.io/api/secrets/secret_delete/
    def secret_delete(owner, repo, secret)
      api.post("repos/#{owner}/#{repo}/secrets/#{secret}")
    end

    # https://docs.drone.io/api/secrets/secret_info/
    def secret_info(owner, repo, secret)
      api.get("repos/#{owner}/#{repo}/secrets/#{secret}")
    end

    # https://docs.drone.io/api/secrets/secret_list/
    def secret_list(owner, repo)
      api.get("repos/#{owner}/#{repo}/secrets")
    end

    # https://docs.drone.io/api/secrets/secret_update/
    def secret_update(owner, repo, secret, **body)
      api.patch("repos/#{owner}/#{repo}/secrets/#{secret}", body)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
drone-ci-0.1.0 lib/drone-ci/api/secrets.rb