Sha256: c5645cf73e2e0856fb71858a682c29dcc606e6820460c7a4670d40df54bb24e6
Contents?: true
Size: 833 Bytes
Versions: 22
Compression:
Stored size: 833 Bytes
Contents
module Shipit class PullRequestsController < ShipitController def index @pull_requests = stack.pull_requests.queued end def create if pr_number = PullRequest.extract_number(stack, params[:number_or_url]) pull_request = PullRequest.request_merge!(stack, pr_number, current_user) flash[:success] = "Pull request ##{pull_request.number} added to the queue." else flash[:warning] = "Invalid or missing pull request number." end redirect_to stack_pull_requests_path end def destroy pull_request = stack.pull_requests.find(params[:id]) pull_request.cancel! flash[:success] = 'Merge canceled' redirect_to stack_pull_requests_path end private def stack @stack ||= Stack.from_param!(params[:stack_id]) end end end
Version data entries
22 entries across 22 versions & 1 rubygems