Class: Bl::GitRepo
Constant Summary
Constants inherited from Command
Command::ACTIVITY_TYPES, Command::CATEGORY_FIELDS, Command::FILE_FIELDS, Command::GIT_REPO_FIELDS, Command::ISSUES_PARAMS, Command::ISSUE_BASE_ATTRIBUTES, Command::ISSUE_FIELDS, Command::MILESTONE_FIELDS, Command::MILESTONE_PARAMS, Command::PROJECT_FIELDS, Command::PROJECT_PARAMS, Command::ROLES, Command::SPACE_DISK_USAGE, Command::SPACE_DISK_USAGE_DETAILS_FIELDS, Command::SPACE_FIELDS, Command::SPACE_NOTIFICATION_FIELDS, Command::TYPE_COLORS, Command::USER_FIELDS, Command::USER_PARAMS, Command::WATCHINGS_PARAMS, Command::WEBHOOK_FIELDS, Command::WEBHOOK_PARAMS, Command::WIKI_FIELDS
Instance Method Summary collapse
-
#initialize ⇒ GitRepo
constructor
A new instance of GitRepo.
- #list ⇒ Object
- #show(id) ⇒ Object
Methods included from Formatting
colorize_priority, colorize_status, colorize_type
Methods included from Requestable
Constructor Details
#initialize ⇒ GitRepo
Returns a new instance of GitRepo.
4 5 6 7 8 |
# File 'lib/bl/gitrepo.rb', line 4 def initialize(*) @config = Bl::Config.instance @url = "projects/#{@config[:project_key]}/git/repositories" super end |
Instance Method Details
#list ⇒ Object
11 12 13 14 |
# File 'lib/bl/gitrepo.rb', line 11 def list res = client.get(@url) print_response(res) end |
#show(id) ⇒ Object
17 18 19 20 |
# File 'lib/bl/gitrepo.rb', line 17 def show(id) res = client.get("#{@url}/#{id}") puts formatter.render(res.body, fields: GIT_REPO_FIELDS, vertical: true) end |