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 report script to show what repos a user pushed to last #15

Open
larsxschneider opened this issue Jan 9, 2018 · 0 comments
Open
Assignees

Comments

@larsxschneider
Copy link
Owner

larsxschneider commented Jan 9, 2018

    SELECT
        CONCAT('https://$GHE_HOST/', org.login, '/', repositories.name) AS repo,
        REPLACE(pushes.ref, 'refs/heads/', '') AS branch,
        pusher.login AS user,
        MAX(pushes.updated_at) AS 'last push date'
    FROM pushes, repositories, users AS org, users AS pusher
    WHERE
        pushes.pusher_id = pusher.id AND
        pushes.repository_id = repositories.id AND
        repositories.owner_id = org.id AND
        org.type = 'Organization' AND
        pusher.login = '$PUSHER'
    GROUP BY repositories.name, pusher.login, pushes.ref
    ORDER BY pushes.updated_at DESC, repositories.name, pushes.ref
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

1 participant