Skip to content

Commit

Permalink
expose project hash on repo
Browse files Browse the repository at this point in the history
  • Loading branch information
plukevdh committed Jul 24, 2018
1 parent fdf41ad commit 41d4f10
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ features
/.bundle/
/lib/bundler/man/
/vendor/
*.iml
4 changes: 3 additions & 1 deletion lib/tinybucket/model/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,16 @@ module Model
# @return [String]
# @!attribute [rw] type
# @return [String]
# # @!attribute [rw] project
# @return [Hash]
class Repository < Base
include Tinybucket::Model::Concerns::RepositoryKeys

acceptable_attributes \
:scm, :has_wiki, :description, :links, :updated_on,
:fork_policy, :created_on, :owner, :size, :parent, :uuid,
:has_issues, :is_private, :full_name, :name, :language,
:website, :type
:website, :type, :project

def initialize(json)
super(json)
Expand Down
17 changes: 17 additions & 0 deletions spec/fixtures/repository.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,23 @@
}
}
},
"project": {
"key": "TEST",
"type": "project",
"uuid": "{ABC}",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/teams/evzijst/projects/TEST"
},
"html": {
"href": "https://bitbucket.org/account/user/evzijst/projects/TEST"
},
"avatar": {
"href": "https://bitbucket.org/account/user/evzijst/projects/TEST/avatar/123"
}
},
"name": "My Project"
},
"updated_on": "2013-08-26T18:13:07.514065+00:00",
"size": 17657351,
"is_private": false,
Expand Down

0 comments on commit 41d4f10

Please sign in to comment.