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.
Files changed (27) hide show
  1. matimo_github/__init__.py +17 -0
  2. matimo_github/tools/add-collaborator/definition.yaml +73 -0
  3. matimo_github/tools/create-issue/definition.yaml +96 -0
  4. matimo_github/tools/create-pull-request/definition.yaml +103 -0
  5. matimo_github/tools/create-release/definition.yaml +103 -0
  6. matimo_github/tools/create-repository/definition.yaml +112 -0
  7. matimo_github/tools/delete-repository/definition.yaml +51 -0
  8. matimo_github/tools/get-issue/definition.yaml +70 -0
  9. matimo_github/tools/get-repository/definition.yaml +83 -0
  10. matimo_github/tools/list-code-alerts/definition.yaml +85 -0
  11. matimo_github/tools/list-collaborators/definition.yaml +77 -0
  12. matimo_github/tools/list-commits/definition.yaml +81 -0
  13. matimo_github/tools/list-issues/definition.yaml +96 -0
  14. matimo_github/tools/list-pull-requests/definition.yaml +93 -0
  15. matimo_github/tools/list-releases/definition.yaml +66 -0
  16. matimo_github/tools/list-repositories/definition.yaml +79 -0
  17. matimo_github/tools/merge-pull-request/definition.yaml +88 -0
  18. matimo_github/tools/search-code/definition.yaml +75 -0
  19. matimo_github/tools/search-issues/definition.yaml +75 -0
  20. matimo_github/tools/search-repositories/definition.yaml +83 -0
  21. matimo_github/tools/search-users/definition.yaml +75 -0
  22. matimo_github/tools/update-code-alert/definition.yaml +86 -0
  23. matimo_github/tools/update-issue/definition.yaml +98 -0
  24. matimo_github-0.1.0.dist-info/METADATA +151 -0
  25. matimo_github-0.1.0.dist-info/RECORD +27 -0
  26. matimo_github-0.1.0.dist-info/WHEEL +4 -0
  27. matimo_github-0.1.0.dist-info/entry_points.txt +2 -0
@@ -0,0 +1,17 @@
1
+ """Matimo github provider — exposes the path to YAML tool definitions."""
2
+ from __future__ import annotations
3
+
4
+ import importlib.resources
5
+ from pathlib import Path
6
+
7
+
8
+ def get_tools_path() -> str:
9
+ """Return the absolute path to the bundled github tool definitions."""
10
+ try:
11
+ ref = importlib.resources.files("matimo_github") / "tools"
12
+ return str(ref)
13
+ except Exception:
14
+ return str(Path(__file__).parent / "tools")
15
+
16
+
17
+ __all__ = ["get_tools_path"]
@@ -0,0 +1,73 @@
1
+ name: github-add-collaborator
2
+ description: Add a user as a collaborator to a repository
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
+ username:
16
+ type: string
17
+ required: true
18
+ description: GitHub username to add
19
+ permission:
20
+ type: string
21
+ required: false
22
+ description: Permission level - pull, triage, push, maintain, or admin
23
+ default: push
24
+
25
+ execution:
26
+ type: http
27
+ method: PUT
28
+ url: 'https://api.github.com/repos/{owner}/{repo}/collaborators/{username}'
29
+ headers:
30
+ Accept: application/vnd.github+json
31
+ Authorization: 'Bearer {GITHUB_TOKEN}'
32
+ X-GitHub-Api-Version: '2022-11-28'
33
+ Content-Type: application/json
34
+ body:
35
+ permission: '{permission}'
36
+ timeout: 15000
37
+
38
+ authentication:
39
+ type: bearer
40
+ location: header
41
+ notes:
42
+ env: GITHUB_TOKEN
43
+ required: true
44
+ permission: Repository administration
45
+
46
+ output_schema:
47
+ type: object
48
+ properties:
49
+ id:
50
+ type: number
51
+ invitee:
52
+ type: object
53
+ permissions:
54
+ type: string
55
+
56
+ error_handling:
57
+ retry: 1
58
+ backoff_type: exponential
59
+ initial_delay_ms: 1000
60
+
61
+ examples:
62
+ - name: Add collaborator with push access
63
+ params:
64
+ owner: myorg
65
+ repo: myrepo
66
+ username: newuser
67
+ permission: push
68
+ - name: Add collaborator with admin access
69
+ params:
70
+ owner: myorg
71
+ repo: myrepo
72
+ username: admin_user
73
+ permission: admin
@@ -0,0 +1,96 @@
1
+ name: github-create-issue
2
+ description: Create a new issue in a repository
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
+ title:
16
+ type: string
17
+ required: true
18
+ description: Issue title
19
+ body:
20
+ type: string
21
+ required: false
22
+ description: Issue description (markdown supported)
23
+ assignees:
24
+ type: array
25
+ required: false
26
+ description: Array of github usernames to assign
27
+ labels:
28
+ type: array
29
+ required: false
30
+ description: Array of label names
31
+ milestone:
32
+ type: number
33
+ required: false
34
+ description: Milestone ID number
35
+
36
+ execution:
37
+ type: http
38
+ method: POST
39
+ url: 'https://api.github.com/repos/{owner}/{repo}/issues'
40
+ headers:
41
+ Accept: application/vnd.github+json
42
+ Authorization: 'Bearer {GITHUB_TOKEN}'
43
+ X-GitHub-Api-Version: '2022-11-28'
44
+ Content-Type: application/json
45
+ body:
46
+ title: '{title}'
47
+ body: '{body}'
48
+ assignees: '{assignees}'
49
+ labels: '{labels}'
50
+ milestone: '{milestone}'
51
+ timeout: 15000
52
+
53
+ authentication:
54
+ type: bearer
55
+ location: header
56
+ notes:
57
+ env: GITHUB_TOKEN
58
+ required: true
59
+ permission: Issues write
60
+
61
+ output_schema:
62
+ type: object
63
+ properties:
64
+ id:
65
+ type: number
66
+ number:
67
+ type: number
68
+ description: Issue number in repository
69
+ title:
70
+ type: string
71
+ state:
72
+ type: string
73
+ html_url:
74
+ type: string
75
+
76
+ error_handling:
77
+ retry: 1
78
+ backoff_type: exponential
79
+ initial_delay_ms: 1000
80
+
81
+ examples:
82
+ - name: Create simple issue
83
+ params:
84
+ owner: myorg
85
+ repo: myrepo
86
+ title: Bug in login flow
87
+ body: Users cannot log in with SSO
88
+ - name: Create issue with labels
89
+ params:
90
+ owner: myorg
91
+ repo: myrepo
92
+ title: Add dark mode
93
+ body: Implement dark theme
94
+ labels:
95
+ - enhancement
96
+ - ui
@@ -0,0 +1,103 @@
1
+ name: github-create-pull-request
2
+ description: Create a new pull request
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
+ title:
16
+ type: string
17
+ required: true
18
+ description: Pull request title
19
+ body:
20
+ type: string
21
+ required: false
22
+ description: Pull request description
23
+ head:
24
+ type: string
25
+ required: true
26
+ description: Head branch name or user:ref
27
+ base:
28
+ type: string
29
+ required: true
30
+ description: Base branch name
31
+ draft:
32
+ type: boolean
33
+ required: false
34
+ description: Whether PR is a draft
35
+ default: false
36
+ maintainer_can_modify:
37
+ type: boolean
38
+ required: false
39
+ description: Allow maintainers to edit PR
40
+ default: true
41
+
42
+ execution:
43
+ type: http
44
+ method: POST
45
+ url: 'https://api.github.com/repos/{owner}/{repo}/pulls'
46
+ headers:
47
+ Accept: application/vnd.github+json
48
+ Authorization: 'Bearer {GITHUB_TOKEN}'
49
+ X-GitHub-Api-Version: '2022-11-28'
50
+ Content-Type: application/json
51
+ body:
52
+ title: '{title}'
53
+ body: '{body}'
54
+ head: '{head}'
55
+ base: '{base}'
56
+ draft: '{draft}'
57
+ maintainer_can_modify: '{maintainer_can_modify}'
58
+ timeout: 15000
59
+
60
+ authentication:
61
+ type: bearer
62
+ location: header
63
+ notes:
64
+ env: GITHUB_TOKEN
65
+ required: true
66
+ permission: Pull requests write
67
+
68
+ output_schema:
69
+ type: object
70
+ properties:
71
+ id:
72
+ type: number
73
+ number:
74
+ type: number
75
+ title:
76
+ type: string
77
+ state:
78
+ type: string
79
+ html_url:
80
+ type: string
81
+
82
+ error_handling:
83
+ retry: 1
84
+ backoff_type: exponential
85
+ initial_delay_ms: 1000
86
+
87
+ examples:
88
+ - name: Create pull request
89
+ params:
90
+ owner: myorg
91
+ repo: myrepo
92
+ title: Add new feature
93
+ body: This PR adds support for...
94
+ head: feature/new-feature
95
+ base: main
96
+ - name: Create draft PR
97
+ params:
98
+ owner: myorg
99
+ repo: myrepo
100
+ title: WIP - Feature in progress
101
+ head: feature/experimental
102
+ base: main
103
+ draft: true
@@ -0,0 +1,103 @@
1
+ name: github-create-release
2
+ description: Create a new release in a repository
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
+ tag_name:
16
+ type: string
17
+ required: true
18
+ description: Release tag name (e.g., v1.0.0)
19
+ name:
20
+ type: string
21
+ required: false
22
+ description: Release name
23
+ body:
24
+ type: string
25
+ required: false
26
+ description: Release notes/description
27
+ draft:
28
+ type: boolean
29
+ required: false
30
+ description: Create as draft release
31
+ default: false
32
+ prerelease:
33
+ type: boolean
34
+ required: false
35
+ description: Mark as prerelease
36
+ default: false
37
+ target_commitish:
38
+ type: string
39
+ required: false
40
+ description: Target branch or commit SHA
41
+
42
+ execution:
43
+ type: http
44
+ method: POST
45
+ url: 'https://api.github.com/repos/{owner}/{repo}/releases'
46
+ headers:
47
+ Accept: application/vnd.github+json
48
+ Authorization: 'Bearer {GITHUB_TOKEN}'
49
+ X-GitHub-Api-Version: '2022-11-28'
50
+ Content-Type: application/json
51
+ body:
52
+ tag_name: '{tag_name}'
53
+ name: '{name}'
54
+ body: '{body}'
55
+ draft: '{draft}'
56
+ prerelease: '{prerelease}'
57
+ target_commitish: '{target_commitish}'
58
+ timeout: 15000
59
+
60
+ authentication:
61
+ type: bearer
62
+ location: header
63
+ notes:
64
+ env: GITHUB_TOKEN
65
+ required: true
66
+ permission: Repository content write
67
+
68
+ output_schema:
69
+ type: object
70
+ properties:
71
+ id:
72
+ type: number
73
+ tag_name:
74
+ type: string
75
+ name:
76
+ type: string
77
+ draft:
78
+ type: boolean
79
+ prerelease:
80
+ type: boolean
81
+ html_url:
82
+ type: string
83
+
84
+ error_handling:
85
+ retry: 1
86
+ backoff_type: exponential
87
+ initial_delay_ms: 1000
88
+
89
+ examples:
90
+ - name: Create release
91
+ params:
92
+ owner: myorg
93
+ repo: myrepo
94
+ tag_name: v1.0.0
95
+ name: Version 1.0.0
96
+ body: Initial release with core features
97
+ - name: Create prerelease
98
+ params:
99
+ owner: myorg
100
+ repo: myrepo
101
+ tag_name: v2.0.0-beta
102
+ prerelease: true
103
+ draft: true
@@ -0,0 +1,112 @@
1
+ name: github-create-repository
2
+ description: Create a new repository in an organization or user account
3
+ version: '1.0.0'
4
+ requires_approval: true
5
+
6
+ parameters:
7
+ org:
8
+ type: string
9
+ required: false
10
+ description: Organization name (omit for personal repos)
11
+ name:
12
+ type: string
13
+ required: true
14
+ description: Repository name
15
+ description:
16
+ type: string
17
+ required: false
18
+ description: Repository description
19
+ private:
20
+ type: boolean
21
+ required: false
22
+ description: Whether repo is private
23
+ default: false
24
+ has_issues:
25
+ type: boolean
26
+ required: false
27
+ description: Enable issues feature
28
+ default: true
29
+ has_wiki:
30
+ type: boolean
31
+ required: false
32
+ description: Enable wiki feature
33
+ default: true
34
+ has_downloads:
35
+ type: boolean
36
+ required: false
37
+ description: Enable downloads feature
38
+ default: true
39
+ auto_init:
40
+ type: boolean
41
+ required: false
42
+ description: Initialize with README, .gitignore, license
43
+ default: false
44
+ license_template:
45
+ type: string
46
+ required: false
47
+ description: License template (mit, apache-2.0, etc.)
48
+ gitignore_template:
49
+ type: string
50
+ required: false
51
+ description: Gitignore template (Node, Python, etc.)
52
+
53
+ execution:
54
+ type: http
55
+ method: POST
56
+ url: 'https://api.github.com/orgs/{org}/repos'
57
+ headers:
58
+ Accept: application/vnd.github+json
59
+ Authorization: 'Bearer {GITHUB_TOKEN}'
60
+ X-GitHub-Api-Version: '2022-11-28'
61
+ Content-Type: application/json
62
+ body:
63
+ name: '{name}'
64
+ description: '{description}'
65
+ private: '{private}'
66
+ has_issues: '{has_issues}'
67
+ has_wiki: '{has_wiki}'
68
+ auto_init: '{auto_init}'
69
+ license_template: '{license_template}'
70
+ gitignore_template: '{gitignore_template}'
71
+ timeout: 15000
72
+
73
+ authentication:
74
+ type: bearer
75
+ location: header
76
+ notes:
77
+ env: GITHUB_TOKEN
78
+ required: true
79
+ permission: Repo write
80
+
81
+ output_schema:
82
+ type: object
83
+ properties:
84
+ id:
85
+ type: number
86
+ name:
87
+ type: string
88
+ full_name:
89
+ type: string
90
+ private:
91
+ type: boolean
92
+ html_url:
93
+ type: string
94
+
95
+ error_handling:
96
+ retry: 1
97
+ backoff_type: exponential
98
+ initial_delay_ms: 1000
99
+
100
+ examples:
101
+ - name: Create public repository
102
+ params:
103
+ org: myorg
104
+ name: new-project
105
+ description: My new project
106
+ - name: Create private repo with license
107
+ params:
108
+ org: myorg
109
+ name: private-tools
110
+ private: true
111
+ license_template: mit
112
+ auto_init: true
@@ -0,0 +1,51 @@
1
+ name: github-delete-repository
2
+ description: Delete a repository (requires admin access)
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
+
16
+ execution:
17
+ type: http
18
+ method: DELETE
19
+ url: 'https://api.github.com/repos/{owner}/{repo}'
20
+ headers:
21
+ Accept: application/vnd.github+json
22
+ Authorization: 'Bearer {GITHUB_TOKEN}'
23
+ X-GitHub-Api-Version: '2022-11-28'
24
+ timeout: 15000
25
+
26
+ authentication:
27
+ type: bearer
28
+ location: header
29
+ notes:
30
+ env: GITHUB_TOKEN
31
+ required: true
32
+ permission: Admin (repository deletion/destruction)
33
+ caution: This is a destructive operation and cannot be undone
34
+
35
+ output_schema:
36
+ type: object
37
+ properties:
38
+ status:
39
+ type: number
40
+ description: HTTP 204 status code on success
41
+
42
+ error_handling:
43
+ retry: 1
44
+ backoff_type: exponential
45
+ initial_delay_ms: 1000
46
+
47
+ examples:
48
+ - name: Delete repository
49
+ params:
50
+ owner: myorg
51
+ repo: deprecated-project
@@ -0,0 +1,70 @@
1
+ name: github-get-issue
2
+ description: Get details of a specific issue
3
+ version: '1.0.0'
4
+
5
+ parameters:
6
+ owner:
7
+ type: string
8
+ required: true
9
+ description: Repository owner username or organization
10
+ repo:
11
+ type: string
12
+ required: true
13
+ description: Repository name
14
+ issue_number:
15
+ type: number
16
+ required: true
17
+ description: Issue number
18
+
19
+ execution:
20
+ type: http
21
+ method: GET
22
+ url: 'https://api.github.com/repos/{owner}/{repo}/issues/{issue_number}'
23
+ headers:
24
+ Accept: application/vnd.github+json
25
+ Authorization: 'Bearer {GITHUB_TOKEN}'
26
+ X-GitHub-Api-Version: '2022-11-28'
27
+ timeout: 10000
28
+
29
+ authentication:
30
+ type: bearer
31
+ location: header
32
+ notes:
33
+ env: GITHUB_TOKEN
34
+ optional: Public repos don't require authentication
35
+
36
+ output_schema:
37
+ type: object
38
+ properties:
39
+ id:
40
+ type: number
41
+ number:
42
+ type: number
43
+ title:
44
+ type: string
45
+ body:
46
+ type: string
47
+ state:
48
+ type: string
49
+ assignees:
50
+ type: array
51
+ labels:
52
+ type: array
53
+ created_at:
54
+ type: string
55
+ updated_at:
56
+ type: string
57
+ html_url:
58
+ type: string
59
+
60
+ error_handling:
61
+ retry: 2
62
+ backoff_type: exponential
63
+ initial_delay_ms: 500
64
+
65
+ examples:
66
+ - name: Get issue details
67
+ params:
68
+ owner: kubernetes
69
+ repo: kubernetes
70
+ issue_number: 12345
@@ -0,0 +1,83 @@
1
+ name: github-get-repository
2
+ description: Get detailed information about a repository
3
+ version: '1.0.0'
4
+
5
+ parameters:
6
+ owner:
7
+ type: string
8
+ required: true
9
+ description: Repository owner username or organization
10
+ repo:
11
+ type: string
12
+ required: true
13
+ description: Repository name
14
+
15
+ execution:
16
+ type: http
17
+ method: GET
18
+ url: 'https://api.github.com/repos/{owner}/{repo}'
19
+ headers:
20
+ Accept: application/vnd.github+json
21
+ Authorization: 'Bearer {GITHUB_TOKEN}'
22
+ X-GitHub-Api-Version: '2022-11-28'
23
+ timeout: 10000
24
+
25
+ authentication:
26
+ type: bearer
27
+ location: header
28
+ notes:
29
+ env: GITHUB_TOKEN
30
+ optional: Public repos don't require authentication
31
+
32
+ output_schema:
33
+ type: object
34
+ properties:
35
+ id:
36
+ type: number
37
+ name:
38
+ type: string
39
+ full_name:
40
+ type: string
41
+ owner:
42
+ type: object
43
+ private:
44
+ type: boolean
45
+ description:
46
+ type: string
47
+ fork:
48
+ type: boolean
49
+ created_at:
50
+ type: string
51
+ updated_at:
52
+ type: string
53
+ pushed_at:
54
+ type: string
55
+ homepage:
56
+ type: string
57
+ language:
58
+ type: string
59
+ stargazers_count:
60
+ type: number
61
+ watchers_count:
62
+ type: number
63
+ forks_count:
64
+ type: number
65
+ open_issues_count:
66
+ type: number
67
+ topics:
68
+ type: array
69
+ archived:
70
+ type: boolean
71
+ disabled:
72
+ type: boolean
73
+
74
+ error_handling:
75
+ retry: 2
76
+ backoff_type: exponential
77
+ initial_delay_ms: 500
78
+
79
+ examples:
80
+ - name: Get repository info
81
+ params:
82
+ owner: kubernetes
83
+ repo: kubernetes