-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Find the organizations that have not received a push for the longest time. Only look at organizations that have not received a push for at least one year. Only look at repositories that are still maintained (not archived!).
- Loading branch information
Lars Schneider
committed
Jan 26, 2018
1 parent
74fce70
commit 7c2d22d
Showing
6 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
organization last push | ||
old-org 2015-03-31 | ||
very-old-org 2015-08-19 | ||
granpa-org 2016-01-08 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
date abandoned organizations | ||
2018-01-25 84 | ||
2018-01-24 90 | ||
2018-01-23 92 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
layout: default | ||
title: Forks | ||
permalink: /housekeeping-abandoned-orgs | ||
--- | ||
|
||
<div class="chart-placeholder"> | ||
<h3>Abandoned Organizations</h3> | ||
<canvas | ||
data-url="{{ site.dataURL }}/organizations-abandoned.tsv" | ||
data-type="history" | ||
></canvas> | ||
<div class="info-box"> | ||
<p> | ||
An organizations is considered <em>abandoned</em> if none of its | ||
repositories has received a push in the last year (ignoring | ||
<a href="https://help.github.com/articles/archiving-repositories/">archived</a> | ||
repositories). | ||
</p> | ||
<p> | ||
If the content has still value, then you could <a href="https://help.github.com/articles/archiving-repositories/">archive</a> | ||
all repositories in these organizations to emphasize the fact | ||
that they are not maintained anymore. If the content is not | ||
valuable anymore, then you could <a href="https://help.github.com/articles/deleting-an-organization-account/">delete the organization</a> | ||
to reduce clutter on your GitHub Enterprise appliance. | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<div class="chart-placeholder"> | ||
<table data-url="{{ site.dataURL }}/organizations-abandoned-detailed.tsv"></table> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
from .ReportDaily import * | ||
|
||
# Find the organizations that have not received a push for the longest time. | ||
# Only look at organizations that have not received a push for at least one | ||
# year. Only look at repositories that are still maintained (not archived!). | ||
class ReportOrgsAbandoned(ReportDaily): | ||
def name(self): | ||
return "organizations-abandoned" | ||
|
||
def updateDailyData(self): | ||
self.detailedHeader, self.detailedData = self.parseData(self.executeQuery(self.query())) | ||
if len(self.data) == 0: | ||
self.header = ["date", "abandoned organizations"] | ||
self.data.append([str(self.yesterday()), len(self.detailedData)]) | ||
self.truncateData(self.timeRangeTotal()) | ||
self.sortDataByDate() | ||
|
||
def query(self): | ||
query = ''' | ||
SELECT | ||
users.login AS "organization", | ||
date(MAX(pushes.created_at)) AS "last push" | ||
FROM | ||
repositories | ||
JOIN users ON repositories.owner_id = users.id | ||
JOIN pushes ON pushes.repository_id = repositories.id | ||
WHERE | ||
users.type = "organization" | ||
AND repositories.maintained = 1 ''' + \ | ||
self.andExcludedEntities("users.login") + ''' | ||
GROUP BY | ||
users.id | ||
HAVING | ||
MAX(pushes.created_at) < DATE_SUB(NOW(), INTERVAL 1 YEAR) | ||
ORDER BY | ||
MAX(pushes.created_at) | ||
''' | ||
return query |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters