-
Notifications
You must be signed in to change notification settings - Fork 47
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
Chart: total number of organizations and teams (v2) #43
Conversation
"demo-data" was accidentally ignored in 8eab15d. Fix this and ignore the directory "hubble-data". This is useful for local debugging as you can clone your production "hubble-data" repository into this directory.
"github-enterprise" is an entry in the organizations table but no real organization in GitHub Enterprise. Refactor the "excludedEntities" mechanism to accept a list of entities instead of a single string and exclude "github-enterprise" in the example config. Please note that this approach also excludes repositories with the name "github-enterprise". That shouldn't be a big problem in the real world, though.
updater/config.py.example
Outdated
# then define that here to exclude them from all kinds of statistics. | ||
# "github-enterprise" is a default organization in GitHub Enterprise that | ||
# we exclude here, too (Note: this also excludes repositories with the name | ||
" "github-enterprise"). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The leading "
looks like a typo, or is this intentional?
updater/reports/ReportOrgHistory.py
Outdated
# Lists the total number of organizations | ||
class ReportOrgHistory(ReportDaily): | ||
def name(self): | ||
return "orgs-history" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the report file is called orgs-history
, shouldn’t we rename the class to ReportOrgsHistory
then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, now I think it might be best to call the output file and the report org-history
and ReportOrgHistory
(because it really sounds strange in plural here), and only prepend orgs-
to the HTML pages, which are in the category orgs
. What do you think, @larsxschneider?
updater/reports/ReportTeamHistory.py
Outdated
# Lists the total number of organizations | ||
class ReportTeamHistory(ReportDaily): | ||
def name(self): | ||
return "teams-history" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above comments for org-history
.
9414d7f
to
e0ef5f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks @toddocon and @larsxschneider!
This chart mimics the output from the stats API call ( api/v3/enterprise/stats/orgs ). It shows the total number of orgs and total number of teams. The API also returns total number of disabled Orgs and total team members. The first is always 0 for us so I skipped it. The second, total team members, I have not been able to reverse engineer via a SQL call. If we want total teams per Org, then maybe that should be a table below this chart (similar to the Org owners table)? I can research this as a v3 enhancement to this chart and maybe include other useful Org information in the chart. |
OK. Not sure if total members of teams per org is necessary. That was just a misunderstanding on my end. I divided the two numbers into two graphs because they can vastly differ (e.g. you could have only 5 orgs but 5000 teams) and then they would be hard to see. |
@toddocon You need to adjust your local config file to exclude "github-enterprise". |
@toddocon Can you give me a quick review for the final PR here? |
I will adjust my file. My org/team numbers do differ drastically. Good catch on breaking the data up into two charts. Thanks! |
Reviewing now.... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Two charts now instead on one and everything adjusted accordingly. Like the handling of the special built-in user github-enterprise.
This is a continuation of @toddocon work in #39