Module: Gith::Accept

Includes:
Pivotal
Included in:
Commands
Defined in:
lib/gith/commands/accept.rb

Constant Summary

Constants included from Pivotal

Pivotal::ACCEPTED, Pivotal::DELIVERED, Pivotal::FINISHED, Pivotal::REJECTED, Pivotal::STARTED, Pivotal::V5_URL

Instance Method Summary collapse

Methods included from Pivotal

#accept_story, #compress_comments, #delete_comment, #deliver_story, #finish_story, #hubot_commit_comments, #me, #project, #project_from_story, #projects, #start_story, #story, #take_ownership

Instance Method Details

#accept(id) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/gith/commands/accept.rb', line 8

def accept(id)
  @story    = story(id)

  error "Story already accepted" if @story.current_state == Gith::Pivotal::ACCEPTED

  accept_story(story)

  success "Story #{id} accepted"
end