matimo-github 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- matimo_github/__init__.py +17 -0
- matimo_github/tools/add-collaborator/definition.yaml +73 -0
- matimo_github/tools/create-issue/definition.yaml +96 -0
- matimo_github/tools/create-pull-request/definition.yaml +103 -0
- matimo_github/tools/create-release/definition.yaml +103 -0
- matimo_github/tools/create-repository/definition.yaml +112 -0
- matimo_github/tools/delete-repository/definition.yaml +51 -0
- matimo_github/tools/get-issue/definition.yaml +70 -0
- matimo_github/tools/get-repository/definition.yaml +83 -0
- matimo_github/tools/list-code-alerts/definition.yaml +85 -0
- matimo_github/tools/list-collaborators/definition.yaml +77 -0
- matimo_github/tools/list-commits/definition.yaml +81 -0
- matimo_github/tools/list-issues/definition.yaml +96 -0
- matimo_github/tools/list-pull-requests/definition.yaml +93 -0
- matimo_github/tools/list-releases/definition.yaml +66 -0
- matimo_github/tools/list-repositories/definition.yaml +79 -0
- matimo_github/tools/merge-pull-request/definition.yaml +88 -0
- matimo_github/tools/search-code/definition.yaml +75 -0
- matimo_github/tools/search-issues/definition.yaml +75 -0
- matimo_github/tools/search-repositories/definition.yaml +83 -0
- matimo_github/tools/search-users/definition.yaml +75 -0
- matimo_github/tools/update-code-alert/definition.yaml +86 -0
- matimo_github/tools/update-issue/definition.yaml +98 -0
- matimo_github-0.1.0.dist-info/METADATA +151 -0
- matimo_github-0.1.0.dist-info/RECORD +27 -0
- matimo_github-0.1.0.dist-info/WHEEL +4 -0
- matimo_github-0.1.0.dist-info/entry_points.txt +2 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
name: github-search-code
|
|
2
|
+
description: Search for code content across GitHub repositories
|
|
3
|
+
version: '1.0.0'
|
|
4
|
+
|
|
5
|
+
parameters:
|
|
6
|
+
query:
|
|
7
|
+
type: string
|
|
8
|
+
required: true
|
|
9
|
+
description: Code search query with qualifiers (e.g., 'className:MyClass repo:owner/repo')
|
|
10
|
+
sort:
|
|
11
|
+
type: string
|
|
12
|
+
required: false
|
|
13
|
+
description: Sort field - indexed (default)
|
|
14
|
+
default: indexed
|
|
15
|
+
order:
|
|
16
|
+
type: string
|
|
17
|
+
required: false
|
|
18
|
+
description: Sort order - asc or desc
|
|
19
|
+
default: desc
|
|
20
|
+
per_page:
|
|
21
|
+
type: number
|
|
22
|
+
required: false
|
|
23
|
+
description: Results per page (max 100)
|
|
24
|
+
default: 30
|
|
25
|
+
page:
|
|
26
|
+
type: number
|
|
27
|
+
required: false
|
|
28
|
+
description: Page number for pagination
|
|
29
|
+
default: 1
|
|
30
|
+
|
|
31
|
+
execution:
|
|
32
|
+
type: http
|
|
33
|
+
method: GET
|
|
34
|
+
url: 'https://api.github.com/search/code'
|
|
35
|
+
query_params:
|
|
36
|
+
q: '{query}'
|
|
37
|
+
sort: '{sort}'
|
|
38
|
+
order: '{order}'
|
|
39
|
+
per_page: '{per_page}'
|
|
40
|
+
page: '{page}'
|
|
41
|
+
headers:
|
|
42
|
+
Accept: application/vnd.github+json
|
|
43
|
+
Authorization: 'Bearer {GITHUB_TOKEN}'
|
|
44
|
+
X-GitHub-Api-Version: '2022-11-28'
|
|
45
|
+
timeout: 30000
|
|
46
|
+
|
|
47
|
+
authentication:
|
|
48
|
+
type: bearer
|
|
49
|
+
location: header
|
|
50
|
+
notes:
|
|
51
|
+
env: GITHUB_TOKEN
|
|
52
|
+
rate_limit: 10 req/min authenticated (requires authentication)
|
|
53
|
+
note: Code search requires authentication and only searches default branch
|
|
54
|
+
|
|
55
|
+
output_schema:
|
|
56
|
+
type: object
|
|
57
|
+
properties:
|
|
58
|
+
total_count:
|
|
59
|
+
type: number
|
|
60
|
+
items:
|
|
61
|
+
type: array
|
|
62
|
+
description: Array of code search result objects
|
|
63
|
+
|
|
64
|
+
error_handling:
|
|
65
|
+
retry: 2
|
|
66
|
+
backoff_type: exponential
|
|
67
|
+
initial_delay_ms: 1000
|
|
68
|
+
|
|
69
|
+
examples:
|
|
70
|
+
- name: Find function definitions
|
|
71
|
+
params:
|
|
72
|
+
query: 'function handleSubmit repo:facebook/react'
|
|
73
|
+
- name: Search for configuration files
|
|
74
|
+
params:
|
|
75
|
+
query: 'filename:tsconfig.json'
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
name: github-search-issues
|
|
2
|
+
description: Search for issues and pull requests across GitHub
|
|
3
|
+
version: '1.0.0'
|
|
4
|
+
|
|
5
|
+
parameters:
|
|
6
|
+
query:
|
|
7
|
+
type: string
|
|
8
|
+
required: true
|
|
9
|
+
description: Search query with qualifiers (e.g., 'is:open type:issue repo:owner/repo')
|
|
10
|
+
sort:
|
|
11
|
+
type: string
|
|
12
|
+
required: false
|
|
13
|
+
description: Sort field - comments, reactions, created, or updated
|
|
14
|
+
default: created
|
|
15
|
+
order:
|
|
16
|
+
type: string
|
|
17
|
+
required: false
|
|
18
|
+
description: Sort order - asc or desc
|
|
19
|
+
default: desc
|
|
20
|
+
per_page:
|
|
21
|
+
type: number
|
|
22
|
+
required: false
|
|
23
|
+
description: Results per page (max 100)
|
|
24
|
+
default: 30
|
|
25
|
+
page:
|
|
26
|
+
type: number
|
|
27
|
+
required: false
|
|
28
|
+
description: Page number for pagination
|
|
29
|
+
default: 1
|
|
30
|
+
|
|
31
|
+
execution:
|
|
32
|
+
type: http
|
|
33
|
+
method: GET
|
|
34
|
+
url: 'https://api.github.com/search/issues'
|
|
35
|
+
query_params:
|
|
36
|
+
q: '{query}'
|
|
37
|
+
sort: '{sort}'
|
|
38
|
+
order: '{order}'
|
|
39
|
+
per_page: '{per_page}'
|
|
40
|
+
page: '{page}'
|
|
41
|
+
headers:
|
|
42
|
+
Accept: application/vnd.github+json
|
|
43
|
+
Authorization: 'Bearer {GITHUB_TOKEN}'
|
|
44
|
+
X-GitHub-Api-Version: '2022-11-28'
|
|
45
|
+
timeout: 30000
|
|
46
|
+
|
|
47
|
+
authentication:
|
|
48
|
+
type: bearer
|
|
49
|
+
location: header
|
|
50
|
+
notes:
|
|
51
|
+
env: GITHUB_TOKEN
|
|
52
|
+
rate_limit: 30 req/min authenticated
|
|
53
|
+
scope: Searches both issues and pull requests
|
|
54
|
+
|
|
55
|
+
output_schema:
|
|
56
|
+
type: object
|
|
57
|
+
properties:
|
|
58
|
+
total_count:
|
|
59
|
+
type: number
|
|
60
|
+
items:
|
|
61
|
+
type: array
|
|
62
|
+
description: Array of issue/PR objects
|
|
63
|
+
|
|
64
|
+
error_handling:
|
|
65
|
+
retry: 2
|
|
66
|
+
backoff_type: exponential
|
|
67
|
+
initial_delay_ms: 1000
|
|
68
|
+
|
|
69
|
+
examples:
|
|
70
|
+
- name: Find open issues with bug label
|
|
71
|
+
params:
|
|
72
|
+
query: 'is:open label:bug type:issue'
|
|
73
|
+
- name: Find pull requests awaiting review
|
|
74
|
+
params:
|
|
75
|
+
query: 'is:open type:pr review:pending'
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
name: github-search-repositories
|
|
2
|
+
description: Search for repositories on GitHub by name, description, topics, or stars
|
|
3
|
+
version: '1.0.0'
|
|
4
|
+
|
|
5
|
+
parameters:
|
|
6
|
+
query:
|
|
7
|
+
type: string
|
|
8
|
+
required: true
|
|
9
|
+
description: Search query (e.g., 'language:javascript stars:>1000')
|
|
10
|
+
sort:
|
|
11
|
+
type: string
|
|
12
|
+
required: false
|
|
13
|
+
description: Sort field - stars, forks, help-wanted-issues, or updated
|
|
14
|
+
default: stars
|
|
15
|
+
order:
|
|
16
|
+
type: string
|
|
17
|
+
required: false
|
|
18
|
+
description: Sort order - asc or desc
|
|
19
|
+
default: desc
|
|
20
|
+
per_page:
|
|
21
|
+
type: number
|
|
22
|
+
required: false
|
|
23
|
+
description: Results per page (max 100)
|
|
24
|
+
default: 30
|
|
25
|
+
page:
|
|
26
|
+
type: number
|
|
27
|
+
required: false
|
|
28
|
+
description: Page number for pagination
|
|
29
|
+
default: 1
|
|
30
|
+
|
|
31
|
+
execution:
|
|
32
|
+
type: http
|
|
33
|
+
method: GET
|
|
34
|
+
url: 'https://api.github.com/search/repositories'
|
|
35
|
+
query_params:
|
|
36
|
+
q: '{query}'
|
|
37
|
+
sort: '{sort}'
|
|
38
|
+
order: '{order}'
|
|
39
|
+
per_page: '{per_page}'
|
|
40
|
+
page: '{page}'
|
|
41
|
+
headers:
|
|
42
|
+
Accept: application/vnd.github+json
|
|
43
|
+
Authorization: 'Bearer {GITHUB_TOKEN}'
|
|
44
|
+
X-GitHub-Api-Version: '2022-11-28'
|
|
45
|
+
timeout: 30000
|
|
46
|
+
|
|
47
|
+
authentication:
|
|
48
|
+
type: bearer
|
|
49
|
+
location: header
|
|
50
|
+
name: Authorization
|
|
51
|
+
notes:
|
|
52
|
+
env: GITHUB_TOKEN
|
|
53
|
+
types: OAuth2 token or Personal Access Token
|
|
54
|
+
rate_limit: 30 req/min authenticated
|
|
55
|
+
|
|
56
|
+
output_schema:
|
|
57
|
+
type: object
|
|
58
|
+
properties:
|
|
59
|
+
total_count:
|
|
60
|
+
type: number
|
|
61
|
+
description: Total number of matching repositories
|
|
62
|
+
incomplete_results:
|
|
63
|
+
type: boolean
|
|
64
|
+
description: Whether results were truncated
|
|
65
|
+
items:
|
|
66
|
+
type: array
|
|
67
|
+
description: Array of repository objects
|
|
68
|
+
|
|
69
|
+
error_handling:
|
|
70
|
+
retry: 2
|
|
71
|
+
backoff_type: exponential
|
|
72
|
+
initial_delay_ms: 1000
|
|
73
|
+
|
|
74
|
+
examples:
|
|
75
|
+
- name: Search popular JavaScript repos
|
|
76
|
+
params:
|
|
77
|
+
query: 'language:javascript stars:>5000'
|
|
78
|
+
sort: stars
|
|
79
|
+
- name: Search recently updated Python projects
|
|
80
|
+
params:
|
|
81
|
+
query: 'language:python updated:>2024-01-01'
|
|
82
|
+
sort: updated
|
|
83
|
+
order: desc
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
name: github-search-users
|
|
2
|
+
description: Search for GitHub users by name, location, or follower count
|
|
3
|
+
version: '1.0.0'
|
|
4
|
+
|
|
5
|
+
parameters:
|
|
6
|
+
query:
|
|
7
|
+
type: string
|
|
8
|
+
required: true
|
|
9
|
+
description: Search query (e.g., 'location:San Francisco followers:>5000')
|
|
10
|
+
sort:
|
|
11
|
+
type: string
|
|
12
|
+
required: false
|
|
13
|
+
description: Sort field - followers, repositories, or joined
|
|
14
|
+
default: followers
|
|
15
|
+
order:
|
|
16
|
+
type: string
|
|
17
|
+
required: false
|
|
18
|
+
description: Sort order - asc or desc
|
|
19
|
+
default: desc
|
|
20
|
+
per_page:
|
|
21
|
+
type: number
|
|
22
|
+
required: false
|
|
23
|
+
description: Results per page (max 100)
|
|
24
|
+
default: 30
|
|
25
|
+
page:
|
|
26
|
+
type: number
|
|
27
|
+
required: false
|
|
28
|
+
description: Page number for pagination
|
|
29
|
+
default: 1
|
|
30
|
+
|
|
31
|
+
execution:
|
|
32
|
+
type: http
|
|
33
|
+
method: GET
|
|
34
|
+
url: 'https://api.github.com/search/users'
|
|
35
|
+
query_params:
|
|
36
|
+
q: '{query}'
|
|
37
|
+
sort: '{sort}'
|
|
38
|
+
order: '{order}'
|
|
39
|
+
per_page: '{per_page}'
|
|
40
|
+
page: '{page}'
|
|
41
|
+
headers:
|
|
42
|
+
Accept: application/vnd.github+json
|
|
43
|
+
Authorization: 'Bearer {GITHUB_TOKEN}'
|
|
44
|
+
X-GitHub-Api-Version: '2022-11-28'
|
|
45
|
+
timeout: 30000
|
|
46
|
+
|
|
47
|
+
authentication:
|
|
48
|
+
type: bearer
|
|
49
|
+
location: header
|
|
50
|
+
notes:
|
|
51
|
+
env: GITHUB_TOKEN
|
|
52
|
+
optional: Can be called without authentication (public users only)
|
|
53
|
+
rate_limit: 30 req/min authenticated
|
|
54
|
+
|
|
55
|
+
output_schema:
|
|
56
|
+
type: object
|
|
57
|
+
properties:
|
|
58
|
+
total_count:
|
|
59
|
+
type: number
|
|
60
|
+
items:
|
|
61
|
+
type: array
|
|
62
|
+
description: Array of user objects
|
|
63
|
+
|
|
64
|
+
error_handling:
|
|
65
|
+
retry: 2
|
|
66
|
+
backoff_type: exponential
|
|
67
|
+
initial_delay_ms: 1000
|
|
68
|
+
|
|
69
|
+
examples:
|
|
70
|
+
- name: Find developers in San Francisco
|
|
71
|
+
params:
|
|
72
|
+
query: 'location:"San Francisco" followers:>100'
|
|
73
|
+
- name: Find contributors to TypeScript
|
|
74
|
+
params:
|
|
75
|
+
query: 'org:microsoft followers:>50'
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
name: github-update-code-alert
|
|
2
|
+
description: Update the status of a code scanning security alert
|
|
3
|
+
version: '1.0.0'
|
|
4
|
+
requires_approval: true
|
|
5
|
+
|
|
6
|
+
parameters:
|
|
7
|
+
owner:
|
|
8
|
+
type: string
|
|
9
|
+
required: true
|
|
10
|
+
description: Repository owner username or organization
|
|
11
|
+
repo:
|
|
12
|
+
type: string
|
|
13
|
+
required: true
|
|
14
|
+
description: Repository name
|
|
15
|
+
alert_number:
|
|
16
|
+
type: number
|
|
17
|
+
required: true
|
|
18
|
+
description: Alert number
|
|
19
|
+
state:
|
|
20
|
+
type: string
|
|
21
|
+
required: true
|
|
22
|
+
description: New state - open, dismissed, or fixed
|
|
23
|
+
dismissed_reason:
|
|
24
|
+
type: string
|
|
25
|
+
required: false
|
|
26
|
+
description: If dismissing, the reason - false positive, won't fix, used in tests, etc.
|
|
27
|
+
dismissed_comment:
|
|
28
|
+
type: string
|
|
29
|
+
required: false
|
|
30
|
+
description: Optional comment when dismissing
|
|
31
|
+
|
|
32
|
+
execution:
|
|
33
|
+
type: http
|
|
34
|
+
method: PATCH
|
|
35
|
+
url: 'https://api.github.com/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}'
|
|
36
|
+
headers:
|
|
37
|
+
Accept: application/vnd.github+json
|
|
38
|
+
Authorization: 'Bearer {GITHUB_TOKEN}'
|
|
39
|
+
X-GitHub-Api-Version: '2022-11-28'
|
|
40
|
+
Content-Type: application/json
|
|
41
|
+
body:
|
|
42
|
+
state: '{state}'
|
|
43
|
+
dismissed_reason: '{dismissed_reason}'
|
|
44
|
+
dismissed_comment: '{dismissed_comment}'
|
|
45
|
+
timeout: 15000
|
|
46
|
+
|
|
47
|
+
authentication:
|
|
48
|
+
type: bearer
|
|
49
|
+
location: header
|
|
50
|
+
notes:
|
|
51
|
+
env: GITHUB_TOKEN
|
|
52
|
+
required: true
|
|
53
|
+
permission: Security events write
|
|
54
|
+
note: Requires GitHub Advanced Security enabled
|
|
55
|
+
|
|
56
|
+
output_schema:
|
|
57
|
+
type: object
|
|
58
|
+
properties:
|
|
59
|
+
number:
|
|
60
|
+
type: number
|
|
61
|
+
state:
|
|
62
|
+
type: string
|
|
63
|
+
dismissed_at:
|
|
64
|
+
type: string
|
|
65
|
+
dismissed_reason:
|
|
66
|
+
type: string
|
|
67
|
+
|
|
68
|
+
error_handling:
|
|
69
|
+
retry: 1
|
|
70
|
+
backoff_type: exponential
|
|
71
|
+
initial_delay_ms: 1000
|
|
72
|
+
|
|
73
|
+
examples:
|
|
74
|
+
- name: Dismiss false positive
|
|
75
|
+
params:
|
|
76
|
+
owner: myorg
|
|
77
|
+
repo: myrepo
|
|
78
|
+
alert_number: 42
|
|
79
|
+
state: dismissed
|
|
80
|
+
dismissed_reason: false positive
|
|
81
|
+
- name: Reopen alert
|
|
82
|
+
params:
|
|
83
|
+
owner: myorg
|
|
84
|
+
repo: myrepo
|
|
85
|
+
alert_number: 42
|
|
86
|
+
state: open
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
name: github-update-issue
|
|
2
|
+
description: Update an issue - title, body, state, assignees, labels
|
|
3
|
+
version: '1.0.0'
|
|
4
|
+
requires_approval: true
|
|
5
|
+
|
|
6
|
+
parameters:
|
|
7
|
+
owner:
|
|
8
|
+
type: string
|
|
9
|
+
required: true
|
|
10
|
+
description: Repository owner username or organization
|
|
11
|
+
repo:
|
|
12
|
+
type: string
|
|
13
|
+
required: true
|
|
14
|
+
description: Repository name
|
|
15
|
+
issue_number:
|
|
16
|
+
type: number
|
|
17
|
+
required: true
|
|
18
|
+
description: Issue number
|
|
19
|
+
title:
|
|
20
|
+
type: string
|
|
21
|
+
required: false
|
|
22
|
+
description: New issue title
|
|
23
|
+
body:
|
|
24
|
+
type: string
|
|
25
|
+
required: false
|
|
26
|
+
description: New issue body
|
|
27
|
+
state:
|
|
28
|
+
type: string
|
|
29
|
+
required: false
|
|
30
|
+
description: New state - open or closed
|
|
31
|
+
assignees:
|
|
32
|
+
type: array
|
|
33
|
+
required: false
|
|
34
|
+
description: Array of usernames to assign
|
|
35
|
+
labels:
|
|
36
|
+
type: array
|
|
37
|
+
required: false
|
|
38
|
+
description: Array of label names
|
|
39
|
+
|
|
40
|
+
execution:
|
|
41
|
+
type: http
|
|
42
|
+
method: PATCH
|
|
43
|
+
url: 'https://api.github.com/repos/{owner}/{repo}/issues/{issue_number}'
|
|
44
|
+
headers:
|
|
45
|
+
Accept: application/vnd.github+json
|
|
46
|
+
Authorization: 'Bearer {GITHUB_TOKEN}'
|
|
47
|
+
X-GitHub-Api-Version: '2022-11-28'
|
|
48
|
+
Content-Type: application/json
|
|
49
|
+
body:
|
|
50
|
+
title: '{title}'
|
|
51
|
+
body: '{body}'
|
|
52
|
+
state: '{state}'
|
|
53
|
+
assignees: '{assignees}'
|
|
54
|
+
labels: '{labels}'
|
|
55
|
+
timeout: 15000
|
|
56
|
+
|
|
57
|
+
authentication:
|
|
58
|
+
type: bearer
|
|
59
|
+
location: header
|
|
60
|
+
notes:
|
|
61
|
+
env: GITHUB_TOKEN
|
|
62
|
+
required: true
|
|
63
|
+
permission: Issues write
|
|
64
|
+
|
|
65
|
+
output_schema:
|
|
66
|
+
type: object
|
|
67
|
+
properties:
|
|
68
|
+
id:
|
|
69
|
+
type: number
|
|
70
|
+
number:
|
|
71
|
+
type: number
|
|
72
|
+
title:
|
|
73
|
+
type: string
|
|
74
|
+
state:
|
|
75
|
+
type: string
|
|
76
|
+
updated_at:
|
|
77
|
+
type: string
|
|
78
|
+
|
|
79
|
+
error_handling:
|
|
80
|
+
retry: 1
|
|
81
|
+
backoff_type: exponential
|
|
82
|
+
initial_delay_ms: 1000
|
|
83
|
+
|
|
84
|
+
examples:
|
|
85
|
+
- name: Close an issue
|
|
86
|
+
params:
|
|
87
|
+
owner: myorg
|
|
88
|
+
repo: myrepo
|
|
89
|
+
issue_number: 42
|
|
90
|
+
state: closed
|
|
91
|
+
- name: Update issue labels
|
|
92
|
+
params:
|
|
93
|
+
owner: myorg
|
|
94
|
+
repo: myrepo
|
|
95
|
+
issue_number: 42
|
|
96
|
+
labels:
|
|
97
|
+
- fixed
|
|
98
|
+
- closed
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: matimo-github
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Matimo provider — GitHub tools (repos, issues, PRs, releases)
|
|
5
|
+
License: MIT
|
|
6
|
+
Keywords: agents,ai,github,matimo,tools
|
|
7
|
+
Classifier: Development Status :: 4 - Beta
|
|
8
|
+
Classifier: Intended Audience :: Developers
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
+
Requires-Python: >=3.11
|
|
12
|
+
Requires-Dist: matimo-core<0.2.0,>=0.1.0
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
|
|
15
|
+
# matimo-github
|
|
16
|
+
|
|
17
|
+
> GitHub tools for [Matimo](https://matimo.dev) — manage repositories, issues, pull requests, releases, and more.
|
|
18
|
+
|
|
19
|
+
[](https://pypi.org/project/matimo-github/)
|
|
20
|
+
[](https://matimo.dev/docs)
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Installation
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install matimo matimo-github
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Available Tools (27 Total)
|
|
33
|
+
|
|
34
|
+
| Category | Tool | Description |
|
|
35
|
+
|----------|------|-------------|
|
|
36
|
+
| **Repositories** | `get-repository` | Get repository details |
|
|
37
|
+
| | `list-repositories` | List repositories for user/org |
|
|
38
|
+
| | `create-repository` | Create a new repository |
|
|
39
|
+
| | `delete-repository` | Delete a repository |
|
|
40
|
+
| | `search-repositories` | Search GitHub repositories |
|
|
41
|
+
| **Issues** | `list-issues` | List issues in a repository |
|
|
42
|
+
| | `get-issue` | Get a single issue |
|
|
43
|
+
| | `create-issue` | Create a new issue |
|
|
44
|
+
| | `update-issue` | Update issue title, body, state, labels |
|
|
45
|
+
| | `search-issues` | Search issues across GitHub |
|
|
46
|
+
| **Pull Requests** | `list-pull-requests` | List PRs in a repository |
|
|
47
|
+
| | `create-pull-request` | Open a new pull request |
|
|
48
|
+
| | `merge-pull-request` | Merge a pull request |
|
|
49
|
+
| **Releases** | `list-releases` | List releases for a repository |
|
|
50
|
+
| | `create-release` | Create a new release with tag |
|
|
51
|
+
| **Commits** | `list-commits` | List commits on a branch |
|
|
52
|
+
| **Collaborators** | `list-collaborators` | List repository collaborators |
|
|
53
|
+
| | `add-collaborator` | Add a collaborator |
|
|
54
|
+
| **Code Search** | `search-code` | Search code across repositories |
|
|
55
|
+
| | `search-users` | Search GitHub users |
|
|
56
|
+
| **Security** | `list-code-alerts` | List Dependabot/code scanning alerts |
|
|
57
|
+
| | `update-code-alert` | Dismiss or resolve a code alert |
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Quick Start
|
|
62
|
+
|
|
63
|
+
```python
|
|
64
|
+
import asyncio
|
|
65
|
+
import os
|
|
66
|
+
from matimo import Matimo
|
|
67
|
+
from matimo_github import get_tools_path
|
|
68
|
+
|
|
69
|
+
async def main():
|
|
70
|
+
matimo = await Matimo.init(get_tools_path())
|
|
71
|
+
|
|
72
|
+
# List open issues
|
|
73
|
+
result = await matimo.execute('list-issues', {
|
|
74
|
+
'owner': 'my-org',
|
|
75
|
+
'repo': 'my-repo',
|
|
76
|
+
'state': 'open',
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
# Create an issue
|
|
80
|
+
await matimo.execute('create-issue', {
|
|
81
|
+
'owner': 'my-org',
|
|
82
|
+
'repo': 'my-repo',
|
|
83
|
+
'title': 'Bug: login fails on mobile',
|
|
84
|
+
'body': 'Steps to reproduce...',
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
asyncio.run(main())
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Authentication
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
export GITHUB_TOKEN="ghp_your-personal-access-token"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Required Scopes
|
|
99
|
+
|
|
100
|
+
| Operations | Required Scope |
|
|
101
|
+
|-----------|---------------|
|
|
102
|
+
| Read public repos, issues, PRs | `public_repo` |
|
|
103
|
+
| Read private repositories | `repo` |
|
|
104
|
+
| Create/update issues, PRs | `repo` |
|
|
105
|
+
| Manage collaborators | `repo` + `admin:org` |
|
|
106
|
+
| Delete repositories | `delete_repo` |
|
|
107
|
+
| Read security alerts | `security_events` |
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## LangChain Agent Example
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
from matimo import Matimo
|
|
115
|
+
from matimo_github import get_tools_path
|
|
116
|
+
from matimo.integrations.langchain import convert_tools_to_langchain
|
|
117
|
+
from langchain_openai import ChatOpenAI
|
|
118
|
+
from langchain.agents import AgentExecutor, create_tool_calling_agent
|
|
119
|
+
from langchain_core.prompts import ChatPromptTemplate
|
|
120
|
+
|
|
121
|
+
matimo = await Matimo.init(get_tools_path())
|
|
122
|
+
lc_tools = convert_tools_to_langchain(
|
|
123
|
+
matimo.list_tools(), matimo,
|
|
124
|
+
credentials={'GITHUB_TOKEN': os.environ['GITHUB_TOKEN']},
|
|
125
|
+
)
|
|
126
|
+
llm = ChatOpenAI(model='gpt-4o-mini')
|
|
127
|
+
prompt = ChatPromptTemplate.from_messages([
|
|
128
|
+
('system', 'You are a GitHub assistant.'),
|
|
129
|
+
('human', '{input}'),
|
|
130
|
+
('placeholder', '{agent_scratchpad}'),
|
|
131
|
+
])
|
|
132
|
+
agent = create_tool_calling_agent(llm, lc_tools, prompt)
|
|
133
|
+
executor = AgentExecutor(agent=agent, tools=lc_tools)
|
|
134
|
+
result = await executor.ainvoke({'input': 'List all open issues in tallclub/matimo'})
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Documentation
|
|
140
|
+
|
|
141
|
+
- [GitHub REST API Reference](https://docs.github.com/en/rest)
|
|
142
|
+
- [Python Examples](https://github.com/tallclub/matimo/tree/main/python/examples/native/github)
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Links
|
|
147
|
+
|
|
148
|
+
- **PyPI:** https://pypi.org/project/matimo-github/
|
|
149
|
+
- **GitHub:** https://github.com/tallclub/matimo
|
|
150
|
+
- **GitHub Docs:** https://docs.github.com/en/rest
|
|
151
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
matimo_github/__init__.py,sha256=NrzTX-RBXrIXDBsj6d5jXi0MxZe1OqR5DTBDcMb36Fo,475
|
|
2
|
+
matimo_github/tools/add-collaborator/definition.yaml,sha256=XD3U_lR1aMHaRiR8ni4EkZeEfe4td6B-89nnAiilwLI,1558
|
|
3
|
+
matimo_github/tools/create-issue/definition.yaml,sha256=GmZGOxVJS8vx6IQlFFdtSu-cCfIoszp8VgA5xfkBwnY,1981
|
|
4
|
+
matimo_github/tools/create-pull-request/definition.yaml,sha256=XBrmQXBdl_IiaMi-CpZdfJF_31kqCccYIIF2TCXzSOk,2125
|
|
5
|
+
matimo_github/tools/create-release/definition.yaml,sha256=y1K0zNjXhpeIhEy_ArM2pHv1iMWEsEuvgZPCcN9He1s,2130
|
|
6
|
+
matimo_github/tools/create-repository/definition.yaml,sha256=EZIJAos9auKIszhS1DlqSw-fX6C6b8OvL4d4WVS-Ji8,2478
|
|
7
|
+
matimo_github/tools/delete-repository/definition.yaml,sha256=26ikpI3K7eL5xn4f8hvbuWxECAYomV4huMXVc8JoiYw,1100
|
|
8
|
+
matimo_github/tools/get-issue/definition.yaml,sha256=uT4M416uMee1mDI1olxZNg43whu3UTJVxcXFrbpPWSg,1325
|
|
9
|
+
matimo_github/tools/get-repository/definition.yaml,sha256=OuRB6BvnCACPdh35M3LUotrDD1_LWMG_ETGTEDkO7mo,1546
|
|
10
|
+
matimo_github/tools/list-code-alerts/definition.yaml,sha256=h6XkpFtHl0qZdNEbFrEA3uUwEo4x_L8RW-6_5leSVng,1925
|
|
11
|
+
matimo_github/tools/list-collaborators/definition.yaml,sha256=F9p4sNRHQsPpsG8lby7DuDRKvoF685D8JPoeOVJ1oXg,1686
|
|
12
|
+
matimo_github/tools/list-commits/definition.yaml,sha256=zt8muBl4_n-ShyqhCd9o8PpCb_xweXJgzmKyYsY8ZDw,1711
|
|
13
|
+
matimo_github/tools/list-issues/definition.yaml,sha256=5Hiw4eDrt8H-8DXNn73V2NZYJC5tK1vPaK84S82SdXM,2109
|
|
14
|
+
matimo_github/tools/list-pull-requests/definition.yaml,sha256=Xp6YY731pymT8XJiiZRkKW_Fn-fojAbBfO0s_muLI3c,2031
|
|
15
|
+
matimo_github/tools/list-releases/definition.yaml,sha256=HT7eVzTRdYs1vygs-ta0i79H4waBlvsrgUbaKkPNAp4,1326
|
|
16
|
+
matimo_github/tools/list-repositories/definition.yaml,sha256=vqjr3LepkLHcOjsfFCec5ygV6E_hHEVNqdw_Mqwm1Po,1741
|
|
17
|
+
matimo_github/tools/merge-pull-request/definition.yaml,sha256=rPkx1HJY2VuVczBPs1WAbfyqJxeckQSJbk-6OpxpSi8,1900
|
|
18
|
+
matimo_github/tools/search-code/definition.yaml,sha256=vAgKCNgCsDEYzX9DTJUNocVFR_lmfLxNDgfif0uTgeY,1725
|
|
19
|
+
matimo_github/tools/search-issues/definition.yaml,sha256=XIhzOTCgiDdpUxmq0ezQdDS3Lz3cxF0CgWjPuEuTHPs,1687
|
|
20
|
+
matimo_github/tools/search-repositories/definition.yaml,sha256=Mi-eyLqO3nF0IPyDFOBcYad6GvYH_gT8NxkB2gn7x1E,1948
|
|
21
|
+
matimo_github/tools/search-users/definition.yaml,sha256=-uhK2Bu_55nNp4rfFyFWPcJ6YOk1Dvdj1ZQ115LrsRQ,1703
|
|
22
|
+
matimo_github/tools/update-code-alert/definition.yaml,sha256=XvkKZEPyl2g1IHeHR2WTnorpakxqHepp31Fu6r2QTvo,1951
|
|
23
|
+
matimo_github/tools/update-issue/definition.yaml,sha256=6uztV19vNloUDPcJlhKv-3g9egcW73Re3d-3Xt68EmI,1947
|
|
24
|
+
matimo_github-0.1.0.dist-info/METADATA,sha256=TQRP5B7XBO-x3Ll926evg-s47vBmrx6-X6YDGrbGBoE,4546
|
|
25
|
+
matimo_github-0.1.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
26
|
+
matimo_github-0.1.0.dist-info/entry_points.txt,sha256=BU1c8DBdjs2sGs_FSjNuezbKLbNmLhaxlm_DuQdGdyI,57
|
|
27
|
+
matimo_github-0.1.0.dist-info/RECORD,,
|