Git Product home page Git Product logo

Comments (5)

oalders avatar oalders commented on June 6, 2024

Have you looked at https://metacpan.org/pod/Pithub::Repos#commits ?

from pithub.

Tux avatar Tux commented on June 6, 2024

Yes, I did: see the last code snippet in above post.
My ultimate goal is to get all the (recent) information about a repo into a single line of status/states, where I gather info from github, CPAN, and possible other sources like MetaCPAN and CPANTESTERS.
Things I like te see on the dashboard are

  • Last commit (not last push date), preferable last commit per branch, but at the minimum the last commit date for the default branch
  • Number of open issues
  • Number of closed issues
  • Date of last action on most recent issue
  • Number of open Pull Requests
  • Number of closed Pull Requests
  • Date of most recent open PR
  • Date of most recent closed PR

All of those give me insight in how active the package is maintained

from pithub.

jjatria avatar jjatria commented on June 6, 2024

Maybe things have changed a bit since 2016 (!), but I'm not sure if this issue is still in need of attention, since the desired behaviour is already provided with the existing API (even if in some cases it might be a bit verbose).

For example:

Last commit [...] per branch

my $result = $repo->branches;
while ( my $branch = $result->next ) {
    my $sha    = $branch->{commit}{sha};
    my $commit = $repo->commits->get( sha => $sha )->content;
    printf "%s (%.8s) %s\n", 
        $branch->{name}, $sha, $commit->{commit}{committer}{date};
}

If not, then maybe I'm just not understanding the issue, but I fail to see how a method like the one described could be implemented in a way that does not collide with the current API.

from pithub.

Tux avatar Tux commented on June 6, 2024

2016 indeed, and as nothing changed, I moved on to using other methods.

from pithub.

oalders avatar oalders commented on June 6, 2024

Looks like we can close this one. Feel free to reach out to me if I'm wrong.

from pithub.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.