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

Add list of abandoned organizations #95

Merged
merged 1 commit into from
Jan 29, 2018
Merged

Add list of abandoned organizations #95

merged 1 commit into from
Jan 29, 2018

Conversation

larsxschneider
Copy link
Collaborator

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.

@larsxschneider larsxschneider force-pushed the lars/old-orgs branch 2 times, most recently from 6e44db6 to 7c2d22d Compare January 26, 2018 17:54
Copy link
Contributor

@pluehne pluehne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good addition to the housekeeping reports. I listed some suggestions below 🙂.

></canvas>
<div class="info-box">
<p>
An organizations is considered <em>abandoned</em> if none of its
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’d suggest not wrapping these lines manually and leaving this to the editor program. My argument is that diffs tend to become very ugly when flow text is manually rewrapped later on.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true. but diffs for very long lines are ugly too. I dunno

repositories).
</p>
<p>
If the content has still value, then you could <a href="https://help.github.com/articles/archiving-repositories/">archive</a>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’d write “still has value” instead of “has still value.”

query = '''
SELECT
users.login AS "organization",
date(MAX(pushes.created_at)) AS "last push"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn’t DATE be in uppercase for consistency?

JOIN users ON repositories.owner_id = users.id
JOIN pushes ON pushes.repository_id = repositories.id
WHERE
users.type = "organization"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation looks off by 3 spaces to me.

GROUP BY
users.id
HAVING
MAX(pushes.created_at) < DATE_SUB(NOW(), INTERVAL 1 YEAR)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’d prefer using the Python-based approach to selecting time ranges instead of using DATE_SUB(NOW()) and INTERVAL 1 YEAR.

The main reason for this is that I think it would be better to exclude today’s data from the report and to start with yesterday instead.

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!).
@larsxschneider
Copy link
Collaborator Author

@pluehne please review, again

Copy link
Contributor

@pluehne pluehne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good to me 😄!

@pluehne pluehne merged commit 316d8f9 into master Jan 29, 2018
@pluehne pluehne deleted the lars/old-orgs branch January 29, 2018 14:40
@pluehne pluehne changed the title add list of abandoned organizations Add list of abandoned organizations Jan 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants