Class: Bard::CLI::CI::GithubActions::Client

Inherits:
Struct
  • Object
show all
Defined in:
lib/bard/ci/github_actions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#project_nameObject

Returns the value of attribute project_name

Returns:

  • (Object)

    the current value of project_name



131
132
133
# File 'lib/bard/ci/github_actions.rb', line 131

def project_name
  @project_name
end

Instance Method Details

#get(path, params = {}) ⇒ Object



132
133
134
135
136
137
# File 'lib/bard/ci/github_actions.rb', line 132

def get path, params={}
  request(path) do |uri|
    uri.query = URI.encode_www_form(params)
    Net::HTTP::Get.new(uri)
  end
end

#post(path, params = {}) ⇒ Object



139
140
141
142
143
144
145
# File 'lib/bard/ci/github_actions.rb', line 139

def post path, params={}
  request(path) do |uri|
    Net::HTTP::Post.new(uri).tap do |r|
      r.body = JSON.dump(params)
    end
  end
end