Class: Gitea::CommitStatusesResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/gitea/resources/commit_statuses.rb

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Gitea::Resource

Instance Method Details

#create(owner:, repo:, sha:, **args) ⇒ Object



9
10
11
# File 'lib/gitea/resources/commit_statuses.rb', line 9

def create(owner:, repo:, sha:, **args)
  CommitStatus.new post_request("repos/#{owner}/#{repo}/statuses/#{sha}", body: args).body
end

#list(owner:, repo:, sha:, **params) ⇒ Object



4
5
6
7
# File 'lib/gitea/resources/commit_statuses.rb', line 4

def list(owner:, repo:, sha:, **params)
  response = get_request("repos/#{owner}/#{repo}/statuses/#{sha}", params: params)
  Collection.from_response(response, type: CommitStatus)
end