Skip to content

Commit 2e14eaf

Browse files
committed
✨ Add a few github.ghproxy.topmunity queries
1 parent 2f99872 commit 2e14eaf

6 files changed

+132
-0
lines changed
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
title = "What are the 10 biggest commit authors on GitHub?"
3+
description = "Get the 10 users with the most commits on GitHub for a given repository"
4+
5+
plugins = ["github"]
6+
7+
author = "julien040"
8+
9+
tags = ["github", "commits", "statistics"]
10+
11+
arguments = [
12+
{title="repository", display_title = "Repository name (owner/repo format)", type="string", description="The repository to fetch stars from (owner/repo)", regex="^[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+$"}
13+
]
14+
*/
15+
SELECT
16+
author,
17+
author_email,
18+
count(*) as commits
19+
FROM
20+
github.ghproxy.topmits_from_repository (@repository)
21+
GROUP BY
22+
author,
23+
author_email
24+
ORDER BY
25+
commits DESC
26+
LIMIT
27+
10;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
title = "What are the 10 most-starred repositories of a user?"
3+
description = "Get the 10 repositories with the most stars of a user"
4+
5+
plugins = ["github"]
6+
7+
author = "julien040"
8+
9+
tags = ["github", "stars", "repositories"]
10+
11+
arguments = [
12+
{title="user", display_title = "GitHub Username", type="string", description="The login username", regex="^[a-zA-Z0-9_-]+$"}
13+
]
14+
*/
15+
SELECT
16+
full_name as repository,
17+
stargazers_count as stars,
18+
forks_count as forks,
19+
html_url as url
20+
FROM
21+
github_repositories_from_user (@user)
22+
ORDER BY
23+
stargazers_count DESC
24+
LIMIT
25+
10;

queries/issues-assigned.sql

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
title = "Which open issues are assigned to me?"
3+
description = "Discover the issues assigned to you"
4+
5+
plugins = ["github"]
6+
7+
author = "julien040"
8+
9+
tags = ["github", "issues", "assigned"]
10+
11+
*/
12+
SELECT
13+
'#' || "number" as id,
14+
by,
15+
created_at,
16+
title,
17+
repository,
18+
'https://github.com' || repository || '/issues/' || "number" as url
19+
FROM
20+
github_my_issues ('assigned')
21+
WHERE
22+
state <> 'closed'
23+
AND is_pull_request = false;

queries/my-followers-github.sql

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
title = "Who follows me on GitHub?"
3+
description = "Get the list of users who follow you on GitHub"
4+
5+
plugins = ["github"]
6+
7+
author = "julien040"
8+
9+
tags = ["github", "followers"]
10+
11+
*/
12+
SELECT
13+
*
14+
FROM
15+
github_my_followers;

queries/pull-request-assigned.sql

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
title = "Which open pull requests are assigned to me?"
3+
description = "Discover the pull requests assigned to you"
4+
5+
plugins = ["github"]
6+
7+
author = "julien040"
8+
9+
tags = ["github", "pull requests", "assigned"]
10+
11+
*/
12+
SELECT
13+
'#' || "number" as id,
14+
by,
15+
created_at,
16+
title,
17+
repository,
18+
'https://github.com' || repository || '/issues/' || "number" as url
19+
FROM
20+
github_my_issues ('assigned')
21+
WHERE
22+
state <> 'closed'
23+
/*
24+
AND is_pull_request = true */;

queries/stargazers-github-repo.sql

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
title = "Who are the stargazers of a GitHub repository?"
3+
description = "List the users who starred a GitHub repository"
4+
5+
plugins = ["github"]
6+
7+
author = "julien040"
8+
9+
tags = ["github", "stars"]
10+
11+
arguments = [
12+
{title="repository", display_title = "Repository name (owner/repo format)", type="string", description="The repository to fetch stars from (owner/repo)", regex="^[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+$"}
13+
]
14+
*/
15+
SELECT
16+
*
17+
FROM
18+
github_stargazers_from_repository (@repository);

0 commit comments

Comments
 (0)