GithubHelp home page GithubHelp logo

automattic / ghactivity Goto Github PK

View Code? Open in Web Editor NEW
5.0 4.0 2.0 4.86 MB

WordPress plugin. Build reports of all your GitHub activity.

Home Page: https://wordpress.org/plugins/ghactivity/

PHP 88.79% CSS 0.36% JavaScript 10.85%

ghactivity's Introduction

Ghactivity

Track your GitHub activity and your team's

How the plugin works

Administration

Plugin's administration happens under Settings > GitHub Activity Settings.

To get started, you'll need to define at least one GitHub username and an access token you can get from GitHub, and that allows to query all activity, including from private repos. Those options are then stored in an array in ghactivity.

That admin page is managed via the admin.ghactivity.php file.

Logs

You probably also noticed the GitHub Events & GitHub Issues menus. Those are added, alongside custom taxonomies, via cpt.ghactivity.php.

Those CPTs and custom taxonomies get filled every hour, based on calls made to the GitHub API using the info you provided in the admin settings.

In addition to monitoring activity for a specific GitHub username, you can also monitor all events for a specific repo. You can activate that for each repo appearing under GitHub Events > Repos.

You can view the calls made to the GitHub API and all functions used to log all the data in core.ghactivity.php.

Working with the data

core.ghactivity.php also includes some functions that query the data to count events. There are 3 main areas where you can call those functions and create reports:

  • reports.ghactivity.php, used alongside charts.ghactivity.php to display a chart
  • rest.ghactivity.php, where I started adding endpoints to query the data.
  • The different shortcodes under the /shortcodes directory.

This is less than ideal and a bit confusing. Instead of doing things in different places like that, I think everything should go via rest.ghactivity.php. I thought we could then build each shortcode to query the API for data, and display it using shared components.

What still needs to be done

Check the issues here to get some ideas.

ghactivity's People

Contributors

brbrr avatar dependabot[bot] avatar dereksmart avatar jeherve avatar kraftbj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

brbrr isabella232

ghactivity's Issues

Reports: create React components that can be shared by all shortcodes

I started working on building a react environment for all shortcodes:
https://github.com/jeherve/ghactivity/blob/master/webpack.config.js#L7
https://github.com/jeherve/ghactivity/tree/master/shortcodes/js

It would allow us to have shared components to display data we return for REST API queries:
https://github.com/jeherve/ghactivity/blob/master/rest.ghactivity.php

It would then be easier to create graphs and tables without having to build it again for each shortcode.

Teams: allow people to be a member of multiple teams

The team interface currently only allows you to be part of one team at a time:

screenshot 2018-05-25 at 18 06 54

It would be nice to switch to a list of checkboxes, so one can be a member of multiple teams at the same time. This would allow us to build reports for teams but also for squads inside a team (like Dash).

Average Label Time: Display list of the issues

Requested by @chaselivingston in p9dueE-ly-p2:

Would it be possible to see a report of individual issues and how long each of them has been labeled with that label? In essence, I’d like to be able to track how long any one issue has waited for a dev to look at it.

Should be easily archivable by updating fetch_average_label_time to include record_slugs meta in return value, and then render that list in UI

Get person's details: do not grab details from the wrong GitHub username

The get_person_details function currently makes a call to the GitHub API to get information about each tracked user, and store that information in term meta:
https://github.com/jeherve/ghactivity/blob/8633d8c5b3599dad4c13d8f030422222aa41c487/core.ghactivity.php#L139
https://github.com/jeherve/ghactivity/blob/8633d8c5b3599dad4c13d8f030422222aa41c487/core.ghactivity.php#L557

This works well for most people, but not for folks like @oskosk. We need to fix this so it grabs data based on the GitHub username, not display name. I have not investigated yet, but we may need to review how we generate the terms in the ghactivity_actor taxonomy in the first place.

Create "State of repo" page

"State of repo" page should include:

  • graph / table of "Open issues by type"
  • graph / table of "Open issues by priority"
  • graph / table of "Open issues by their status"
  • graph / table of "Open issues by Area"

Maybe list some issues, for example:

  • 2-3 oldest PRs
  • 2 oldest stalled issues
  • few issues with most comments count
    etc

Issues tracking: improve how labels are stored for each issue

Right now, we log the labels currently existing for each issue, but we don't log the history of the labels and how they changed over time.

It would be nice if we could store:

  • when a label was added.
  • when it was removed.

This would allow us to make queries to retrieve information like:

  • How many issues were opened last month?
  • How many issues were closed last month?
  • How many issues were marked as needing dev triage?
  • How many issues were marked as needing Dash?
  • How many issues were triaged?
  • How many were not?
  • What’s the average age of issues, or of a subset of issues (like issues needing triage or review)?
  • On average how long do we have to wait for an issue to be triaged?

Charts: refactor the way chart data is added to each chart

When I started working on the plugin, my idea was to have a central place where the chart js was enqueued:
https://github.com/jeherve/ghactivity/blob/master/charts.ghactivity.php

And then feed the data for each chart with filters:
https://github.com/jeherve/ghactivity/blob/master/charts.ghactivity.php#L68
https://github.com/jeherve/ghactivity/blob/master/reports.ghactivity.php#L24

This may not be the best approach as we add more places and shortcodes where the charts can be displayed, with different data needed in each.

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.