-
Notifications
You must be signed in to change notification settings - Fork 114
Expand file tree
/
Copy pathmanifest.toml
More file actions
125 lines (108 loc) · 3.81 KB
/
manifest.toml
File metadata and controls
125 lines (108 loc) · 3.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name = "git"
version = "0.1.4"
description = "Query local and remote git repositories"
author = "julien040"
license = "UNLICENSED"
repository = "https://github.com/julien040/anyquery/tree/main/plugins/git"
homepage = "https://github.com/julien040/anyquery/tree/main/plugins/git"
type = "anyquery"
minimumAnyqueryVersion = "0.0.1"
tables = [
"commits",
"branches",
"tags",
"remotes",
"status",
"references",
"commits_diff",
]
[[table]]
name = "commits"
description = "List commits in a git repository"
examples = [
"-- List commits of a repository\nSELECT * FROM git_commits('path/to/repo');",
"Get the count of commits of 'Junio C Hamano' in the git repository\nSELECT count(*) FROM git_commits('https://github.com/git/git.git') WHERE author_name='Junio C Hamano';",
"""
-- Get infos about the parents of a commit (the parents columns is an array of hashes)
SELECT p.* FROM git_commits('path/to/repo') c, git_commits('path/to/repo') p, json_each(c.parents) parent
WHERE c.hash='a1b2c3d4' AND parent.value=p.hash;
""",
"""
-- How many commits were made in the last 7 days
SELECT count(*) FROM git_commits('path/to/repo') WHERE author_date > datetime('now', '-7 days');
"""
]
[[table]]
name = "branches"
description = "List branches in a git repository"
examples = [
"-- List branches of a repository\nSELECT * FROM git_branches('path/to/repo');",
"""-- Get the commit of a branch
SELECT * FROM git_branches('path/to/repo') b, git_commits('path/to/repo') c
WHERE b.name='main' AND b.hash=c.hash;""",
]
[[table]]
name = "tags"
description = "List tags in a git repository"
examples = [
"-- List tags of a repository\nSELECT * FROM git_tags('path/to/repo');",
"""-- Get the commit of a tag
SELECT * FROM git_tags('path/to/repo') t, git_commits('path/to/repo') c
WHERE t.name='v1.0.0' AND t.hash=c.hash;""",
]
[[table]]
name = "remotes"
description = "List remotes in a git repository"
examples = [
"-- List remotes of a repository\nSELECT * FROM git_remotes('path/to/repo');",
]
[[table]]
name = "status"
description = "Get the status of file in a git repository (untracked, modified, deleted, renamed, copied, updated in the staging area and working tree)"
examples = [
"-- Get the status of a repository\nSELECT * FROM git_status('path/to/repo');",
]
[[table]]
name = "references"
description = "List references in a git repository"
examples = [
"-- List references of a repository\nSELECT * FROM git_references('path/to/repo');",
]
[[table]]
name = "commits_diff"
description = "List all commits of a repository with additionnal diff stats (slower than git_commits)"
examples = [
"-- List commits of a repository with diff stats\nSELECT * FROM git_commits_diff('path/to/repo');",
"""
-- Get the most modified files in the git repository
SELECT sum(addition)+sum(deletion) as "changes", file_name FROM git_commits_diff('/path/to/repo') GROUP BY file_name ORDER BY
"changes" DESC LIMIT 10;""",
"""
-- Get the number of lines added per user in the git repository
SELECT sum(addition) as "addition", author_name FROM git_commits_diff('/path/to/repo') GROUP BY author_name ORDER BY "addition" DESC;
"""
]
[[file]]
platform = "linux/amd64"
directory = "dist/anyquery_linux_amd64_v1"
executablePath = "anyquery"
[[file]]
platform = "linux/arm64"
directory = "dist/anyquery_linux_arm64"
executablePath = "anyquery"
[[file]]
platform = "darwin/amd64"
directory = "dist/anyquery_darwin_amd64_v1"
executablePath = "anyquery"
[[file]]
platform = "darwin/arm64"
directory = "dist/anyquery_darwin_arm64"
executablePath = "anyquery"
[[file]]
platform = "windows/amd64"
directory = "dist/anyquery_windows_amd64_v1"
executablePath = "anyquery.exe"
[[file]]
platform = "windows/arm64"
directory = "dist/anyquery_windows_arm64"
executablePath = "anyquery.exe"