% # API my $api = gitprep_api; # Parameters my $user = param('user'); my $project = param('project'); my $row_id = param('row_id'); my $user_row_id = app->dbi->model('user')->select('row_id', where => {id => $user})->value; # Git my $git = $self->app->git; # Pull requests my $pull_request = app->dbi->model('pull_request')->select( [ {__MY__ => '*'}, {user => ['id']} ], where => {'pull_request.row_id' => $row_id} )->one; my $from_rev = $pull_request->{branch1}; my $rev = $pull_request->{branch2}; # Commits my $commits = $git->forward_commits(app->rep_info($user, $project), $from_rev, $rev); my $commits_count = @$commits; my $commits_date = {}; my $authors = {}; for my $commit (@$commits) { my $date = $commit->{age_string_date_local}; $commits_date->{$date} ||= []; $authors->{$commit->{author}} = 1; push @{$commits_date->{$date}}, $commit; } my $authors_count = keys %$authors; # Start commit my $start_commit = $git->separated_commit(app->rep_info($user, $project), $from_rev, $rev); # End commit my $end_commit = $git->get_commit(app->rep_info($user, $project), $rev); # Variables stash id => $end_commit->{id}; stash from_id => $start_commit->{id}; stash rev => $end_commit->{id}; stash from_rev => $start_commit->{id}; # Allow pull request %> % layout 'common', title => "Pull Requests Tags \x{30fb} $user/$project"; %= include '/include/header';