-
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
List: organization owners #36
Changes from 2 commits
5122e2c
92f17fc
0f591a0
02d5a09
32d64d4
5fff345
7e9ce8d
be7a159
54eb44e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
layout: default | ||
title: Organization Owners | ||
permalink: /org-owners | ||
--- | ||
<h3> | ||
Organization owners | ||
</h3> | ||
|
||
<div class="row"> | ||
<div class="col-main"> | ||
<div class="chart-container"> | ||
<table class="table" data-url="{{ site.dataURL }}/org-owners.tsv"></table> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mlbright: You accidentally mixed spaces and tabs here. |
||
</div> | ||
</div> | ||
<div class="col-aside"> | ||
<div class="info-box"> | ||
<p>Owners for each GitHub organization.</p> | ||
</div> | ||
</div> | ||
</div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from .Report import * | ||
|
||
# Lists all orgs and their owners without site admins or suspended users | ||
class ReportOrgOwners(Report): | ||
def name(self): | ||
return "org-owners" | ||
|
||
# The data is overwritten every day, so skip reading the old data | ||
def readData(self): | ||
pass | ||
|
||
def updateData(self): | ||
self.header, self.data = self.parseData( | ||
self.executeScript(self.scriptPath("org-owners.sh")) | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
# | ||
# Get the owners for each org. Exclude site admins and suspended users. | ||
# | ||
echo -e "organization\towner" | ||
|
||
github-env bin/runner -e production "' | ||
User.where(:type => \"Organization\").each do |o| | ||
o.admins.where(:disabled => false, :gh_role => nil).each do |m| | ||
puts \"#{o.login}\\t#{m.name}\\n\" | ||
end | ||
end | ||
'" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ | |
from reports.ReportRepositoryHistory import * | ||
from reports.ReportTokenlessAuth import * | ||
from reports.ReportUsers import * | ||
from reports.ReportOrgOwners import * | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mlbright: Could you please sort these alphabetically? |
||
|
||
def writeMeta(dataDirectory): | ||
outputFilePath = os.path.join(dataDirectory, "meta.tsv") | ||
|
@@ -82,6 +83,7 @@ def main(): | |
ReportRepositoryHistory(configuration, dataDirectory, metaStats).update() | ||
ReportTokenlessAuth(configuration, dataDirectory, metaStats).update() | ||
ReportUsers(configuration, dataDirectory, metaStats).update() | ||
ReportOrgOwners(configuration, dataDirectory, metaStats).update() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mlbright: Could you please sort these alphabetically? |
||
|
||
# Write meta infos | ||
writeMeta(dataDirectory) | ||
|
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.
@mlbright: Can you make this title case (“Organization Owners”)?