diff options
author | Rémy Coutable <remy@rymai.me> | 2017-10-05 10:43:18 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-10-05 10:48:26 +0200 |
commit | a55e150177934145c3daeecb678cce1b16f0a3b8 (patch) | |
tree | 5b9e4fe9c800b0ffab2f08eb3b8b04dcd5ece464 /lib/github/representation/pull_request.rb | |
parent | f96b4f41412b4e974fe77a1b58d6570252fd62d9 (diff) | |
download | gitlab-ce-a55e150177934145c3daeecb678cce1b16f0a3b8.tar.gz |
Set `label_ids` and `assignee_ids` after the initial `save!`.
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/github/representation/pull_request.rb')
-rw-r--r-- | lib/github/representation/pull_request.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/github/representation/pull_request.rb b/lib/github/representation/pull_request.rb index bb35061c642..9baa7af4ffa 100644 --- a/lib/github/representation/pull_request.rb +++ b/lib/github/representation/pull_request.rb @@ -37,6 +37,16 @@ module Github source_branch.valid? && target_branch.valid? end + def assigned? + raw['assignee'].present? + end + + def assignee + return unless assigned? + + @assignee ||= Github::Representation::User.new(raw['assignee'], options) + end + private def project |