gitprep / templates / api / revs.html.ep /
Yuki Kimoto cleanup tags
15fce4a 8 years ago
1 contributor
26 lines | 0.554kb
<%
  my $api = gitprep_api;
  
  # Git
  my $git = app->git;
  
  # Branches
  my $branches = $git->branches($self->app->rep_info($user, $project)) || [];
  my @branch_names = map { $_->{name} } @$branches;
  
  # Tags
  my $tags = $git->tags(
    app->rep_info($user, $project),
    app->config->{basic}{tags_limit} || 1000,
    app->config->{basic}{tags_limit} || 1000
  ) || [];
  my @tag_names = map { $_->{name} } @$tags;
  
  $self->render(
    json => {
      branch_names => \@branch_names,
      tag_names => \@tag_names
    }
  );
  return;
%>