Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: showing % of contributions coming from within an org vs. outside #60

Open
filmaj opened this issue Dec 13, 2017 · 4 comments

Comments

@filmaj
Copy link
Contributor

filmaj commented Dec 13, 2017

It's similar to the current Collaboration chart, except instead of visualizing which orgs collaborate with each other, I would like to be able to track what % of contributions come from outside the org (vs. inside), for some definition of "contribution". One idea: number of commits in master authored by members of the organization, vs. number of commits by non-members of the org? I'm open to different definitions.

I would love for this to be time-series data, that is, tracking this % of outside contributions over time. This is similar to #35 in that slicing the data up by time would be required.

Finally, one extension of this could be doing a similar analysis except replacing 'org' with 'repo'.

Let me know what you think. I'm happy to take a stab at this, but I'm still learning the project 😓. Haven't delved into the updater/ portion of the repo yet, which is where I believe this change would need to land.

@larsxschneider
Copy link
Collaborator

larsxschneider commented Dec 13, 2017

Great idea for a chart 👍 ! As you already mentioned, the definition "contribution" is not trivial. A few thoughts:

  • "members of the organization" quickly gets blurry as teams tend to add external people quickly (good because it simplifies processes). That's why I calculated a home org for each user. That's the org that the user pushed most to. We could define an "external contribution" as a contribution that was made outside of your "home org".
  • Counting "commits by user" is possible but resource intensive/complicated because we would need to look into the actual repositories. GitHub does not track commits in its database but "pushes". That's why all other metrics are based on pushes. A single push can transfer multiple commits from different authors to a repository. However, in reality pushes are a reasonable approximation for commits I think.
  • I assume we would generate a chart similar to the "# of collaborators" chart, right? Question is, what timeframe do we look at for the contributions? Maybe we calculate the data for last week, last month, and last year and than provide buttons to switch between the datasets? Do you see a way to visualize that data in a real time-series?

Does this make sense to you? If yes, maybe we can share the work? I would be happy to work on the SQL statements/data gathering part and you could tackle the JS parts?

@filmaj
Copy link
Contributor Author

filmaj commented Dec 13, 2017

We could define an "external contribution" as a contribution that was made outside of your "home org".

Nice, thanks for the link to the code, that's helpful for me to understand - and this sounds great to me.

However, in reality pushes are a reasonable approximation for commits I think.

👍

I assume we would generate a chart similar to the "# of collaborators" chart, right?

Hmm, the chart link here does not work for me - looks like maybe an Autodesk intranet URL. If you mean similar to the "# of contributors" chart, then that is not exactly what I had envisioned. I was thinking more of a time-series graph (similar to the PR usage graph), graphing a single line that would be a percentage calculation of two numbers: number of pushes from people whose home org is a different org divided by total number of pushes (for each particular time slice).

Maybe we calculate the data for last week, last month, and last year and than provide buttons to switch between the datasets?

Sounds good to me.

Do you see a way to visualize that data in a real time-series?

Hopefully my answer two sections above provided sufficient clarity.

If yes, maybe we can share the work? I would be happy to work on the SQL statements/data gathering part and you could tackle the JS parts?

Fantastic! Hopefully I can learn some of the SQL/data bits a bit better as we work on it too 😄

@larsxschneider
Copy link
Collaborator

graphing a single line that would be a percentage calculation of two numbers

Understood. We would calculate that line for each organization, right? Maybe with a drop down box to pick the organization similar to "# of contributors" chart,? We might be able to add up all the contributions to show an "% of external contributions" on the entire instance. 🎉

@filmaj
Copy link
Contributor Author

filmaj commented Dec 13, 2017

Yeah, exactly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants