Module: Gith::Reject

Includes:
Pivotal
Included in:
Commands
Defined in:
lib/gith/commands/reject.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

#reject(id) ⇒ Object



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

def reject(id)
  @story    = story(id)

  error "Story already rejected" if @story.current_state == Gith::Pivotal::REJECTED

  reject_story(story)

  success "Story #{id} rejected"
end