-
Notifications
You must be signed in to change notification settings - Fork 36
HowToUse Repository
hirakiuc edited this page Aug 31, 2014
·
4 revisions
How To use Repository.
# get repository model.
repo = bucket.repo('owner', 'slug')
# just call `load` method if you need more attributes
repo.load
Not Emplemented Yet...
Not Implemented Yet...
list = repo.pull_requests
# iterate all of pull requests of the repository.
list.each do |pull_request|
p pull_request
end
pull_request = repo.pull_request(pull_request_id)
watchers = repo.watchers
forks = repo.forks
commits = repo.commits
commit = repo.commit(commit_id)
restrictions = repo.branch_restrictions
restriction = repo.branch_restriction(restriction_id)
diff = repo.diff(spec)
spec
means that A specification such as a branch name, revision, or commit SHA
.
patch = repo.patch(spec)
spec
means that A specification such as a branch name, revision, or commit SHA
.