-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: parse Tool Spec in building stage
- Loading branch information
1 parent
ec690ac
commit 4037be6
Showing
12 changed files
with
184 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,6 @@ credentials/ | |
|
||
**/.next | ||
**/node_modules | ||
config | ||
config | ||
|
||
.dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,6 @@ config/**.yaml | |
|
||
screenshots | ||
|
||
**/tmp | ||
**/tmp | ||
|
||
.dist |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"kind": "Function", "metadata": {"name": "github", "description": "Manage GitHub issues and pull requests", "provider": "private"}, "spec": {"runtime": {"language": "python", "version": "3.11"}, "dependencies": [{"name": "npiai", "version": "0.1.0"}], "functions": [{"description": "Add a comment to the target issue.", "name": "add_issue_comment", "parameters": {"properties": {"repo": {"description": "Name of the repository in format {owner}/{repo}", "type": "string"}, "number": {"description": "Issue number", "type": "integer"}, "body": {"description": "Body of the comment in markdown format", "type": "string"}}, "required": ["repo", "number", "body"], "type": "object"}, "fewShots": null}, {"description": "Add a comment to the target pull request.", "name": "add_pull_request_comment", "parameters": {"properties": {"repo": {"description": "Name of the repository in format {owner}/{repo}", "type": "string"}, "number": {"description": "Pull request number", "type": "integer"}, "body": {"description": "Body of the comment in markdown format", "type": "string"}}, "required": ["repo", "number", "body"], "type": "object"}, "fewShots": null}, {"description": "Create an issue under the given repository.", "name": "create_issue", "parameters": {"properties": {"repo": {"description": "Name of the repository in format {owner}/{repo}", "type": "string"}, "title": {"description": "Title of the issue", "type": "string"}, "body": {"description": "Body of the issue in markdown format", "type": "string"}, "labels": {"default": null, "description": "List of labels to add to the issue", "items": {"type": "string"}, "type": "array"}, "assignees": {"default": null, "description": "List of users to assign to the issue", "items": {"type": "string"}, "type": "array"}}, "required": ["repo", "title", "body"], "type": "object"}, "fewShots": null}, {"description": "Create a pull request under the given repository.", "name": "create_pull_request", "parameters": {"properties": {"repo": {"description": "Name of the repository in format {owner}/{repo}", "type": "string"}, "title": {"description": "Title of the pull request", "type": "string"}, "body": {"description": "Body of the pull request", "type": "string"}, "base": {"description": "Base branch of the pull request, i.e., the branch to merge the pull request into", "type": "string"}, "head": {"description": "Head branch of the pull request, i.e., the branch with your changes", "type": "string"}, "is_draft": {"default": false, "description": "Whether the pull request is a draft or not", "type": "boolean"}, "labels": {"default": null, "description": "List of labels to add to the pull request", "items": {"type": "string"}, "type": "array"}, "assignees": {"default": null, "description": "List of users to assign to the pull request", "items": {"type": "string"}, "type": "array"}}, "required": ["repo", "title", "body", "base", "head"], "type": "object"}, "fewShots": null}, {"description": "Edit an existing issue. You can also close or reopen an issue by specifying the state parameter.", "name": "edit_issue", "parameters": {"properties": {"repo": {"description": "Name of the repository in format {owner}/{repo}", "type": "string"}, "number": {"description": "Issue number", "type": "integer"}, "title": {"default": null, "description": "Title of the issue", "type": "string"}, "body": {"default": null, "description": "Body of the issue in markdown format", "type": "string"}, "labels": {"default": null, "description": "List of labels to add to the issue", "items": {"type": "string"}, "type": "array"}, "assignees": {"default": null, "description": "List of users to assign to the issue", "items": {"type": "string"}, "type": "array"}, "state": {"default": null, "description": "Whether the issue is open or closed", "enum": ["open", "closed"], "type": "string"}}, "required": ["repo", "number"], "type": "object"}, "fewShots": null}, {"description": "Edit an existing pull request. You can also close or reopen a pull request by specifying the state parameter.", "name": "edit_pull_request", "parameters": {"properties": {"repo": {"description": "Name of the repository in format {owner}/{repo}", "type": "string"}, "number": {"description": "Pull request number", "type": "integer"}, "title": {"default": null, "description": "Title of the pull request", "type": "string"}, "body": {"default": null, "description": "Body of the pull request in markdown format", "type": "string"}, "base": {"default": null, "description": "Base branch of the pull request, i.e., the branch with your changes", "type": "string"}, "labels": {"default": null, "description": "List of labels to add to the pull request", "items": {"type": "string"}, "type": "array"}, "assignees": {"default": null, "description": "List of users to assign to the pull request", "items": {"type": "string"}, "type": "array"}, "state": {"default": null, "description": "Whether the pull request is open or closed", "enum": ["open", "closed"], "type": "string"}}, "required": ["repo", "number"], "type": "object"}, "fewShots": null}, {"description": "Fork a repository on GitHub.", "name": "fork", "parameters": {"properties": {"repo": {"description": "Name of the repository in format {owner}/{repo}", "type": "string"}}, "required": ["repo"], "type": "object"}, "fewShots": null}, {"description": "Get an issue from the given repository.", "name": "get_issue", "parameters": {"properties": {"repo": {"description": "Name of the repository in format {owner}/{repo}", "type": "string"}, "number": {"description": "Issue number", "type": "integer"}}, "required": ["repo", "number"], "type": "object"}, "fewShots": null}, {"description": "Get a pull request from the given repository.", "name": "get_pull_request", "parameters": {"properties": {"repo": {"description": "Name of the repository in format {owner}/{repo}", "type": "string"}, "number": {"description": "Pull request number", "type": "integer"}}, "required": ["repo", "number"], "type": "object"}, "fewShots": null}, {"description": "Search for issues or pull requests on GitHub.", "name": "search_issue_pr", "parameters": {"properties": {"query": {"description": "Search query to search for GitHub issues and pull requests. Below are some query examples:\n1. Search for all issues containing \"performance\" in the repository npi/npi: `is:issue repo:npi/npi performance`\n2. Search for open pull requests in repository npi/npi: `is:pr is:open repo:npi/npi`", "type": "string"}, "max_results": {"description": "Maximum number of results to return", "type": "integer"}}, "required": ["query", "max_results"], "type": "object"}, "fewShots": null}, {"description": "Search for repositories on GitHub.", "name": "search_repositories", "parameters": {"properties": {"query": {"description": "Search query to search for GitHub repositories. Below are some query examples:\n1. Search for all repositories that contain \"test\" and use Python: `test language:python`\n2. Search for repositories with more than 1000 stars: `stars:>1000`", "type": "string"}, "max_results": {"description": "Maximum number of results to return", "type": "integer"}}, "required": ["query", "max_results"], "type": "object"}, "fewShots": null}, {"description": "Star a repository on GitHub.", "name": "star", "parameters": {"properties": {"repo": {"description": "Name of the repository in format {owner}/{repo}", "type": "string"}}, "required": ["repo"], "type": "object"}, "fewShots": null}, {"description": "Subscribe to notifications (a.k.a. watch) for activity in a repository on GitHub.", "name": "watch", "parameters": {"properties": {"repo": {"description": "Name of the repository in format {owner}/{repo}", "type": "string"}}, "required": ["repo"], "type": "object"}, "fewShots": null}]}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package reconcile | ||
|
||
import ( | ||
"os" | ||
"testing" | ||
) | ||
|
||
func Test_ParseToolSpec(t *testing.T) { | ||
data, err := os.ReadFile("tool.spec.json") | ||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
_, _, err = parseToolSpec(data) | ||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.