-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add functionality to diff GitHub Actions job logs and update related documentation and tool definitions #748
Conversation
…documentation and tool definitions
docs/src/components/BuiltinTools.mdx
Outdated
@@ -20,7 +20,8 @@ import { LinkCard } from '@astrojs/starlight/components'; | |||
<LinkCard title="github_actions_workflows_list" description="List all workflows as a list of 'id: name' pair." href="/genaiscript/reference/scripts/system#systemgithub_actions" /> | |||
<LinkCard title="github_actions_runs_list" description="List all runs for a workflow. Use 'git_actions_list_workflows' to list workflows." href="/genaiscript/reference/scripts/system#systemgithub_actions" /> | |||
<LinkCard title="github_actions_jobs_list" description="List all jobs for a run." href="/genaiscript/reference/scripts/system#systemgithub_actions" /> | |||
<LinkCard title="github_actions_job_log" description="Download job log." href="/genaiscript/reference/scripts/system#systemgithub_actions" /> | |||
<LinkCard title="github_actions_job_log_get" description="Download workflow job log." href="/genaiscript/reference/scripts/system#systemgithub_actions" /> | |||
<LinkCard title="github_actions_job_log_diff" description="Diffs two workflow job logs." href="/genaiscript/reference/scripts/system#systemgithub_actions" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tool name 'github_actions_job_log_diff' should be 'github_actions_job_logs_diff' to maintain consistency in naming convention.
generated by pr-docs-review-commit
incorrect_tool_name
@@ -796,7 +803,8 @@ Queries results from workflows in GitHub actions. | |||
- tool `github_actions_workflows_list`: List all workflows as a list of 'id: name' pair. | |||
- tool `github_actions_runs_list`: List all runs for a workflow. Use 'git_actions_list_workflows' to list workflows. | |||
- tool `github_actions_jobs_list`: List all jobs for a run. | |||
- tool `github_actions_job_log`: Download job log. | |||
- tool `github_actions_job_log_get`: Download workflow job log. | |||
- tool `github_actions_job_log_diff`: Diffs two workflow job logs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tool name 'github_actions_job_log_diff' should be 'github_actions_job_logs_diff' to maintain consistency in naming convention.
generated by pr-docs-review-commit
incorrect_tool_name
The changes in GIT_DIFF introduce a new functionality to the Here are the added functions and their descriptions:
The changes also update The changes should not introduce any breaking changes as they only add new functions. However, there's a typo in the method name Suggested changes: - private async downladJob(job_id: number) {
+ private async downloadJob(job_id: number) {
...
}
async diffWorkflowJobLogs(job_id: number, other_job_id: number) {
+ try {
...
+ } catch (error) {
+ console.error('Error diffing job logs:', error);
+ throw error;
+ }
}
|
Investigator reportRoot Cause AnalysisThe failure in the second run is caused by a TypeScript compilation error. The error message indicates:
This suggests there are syntax errors or unexpected tokens in the Suggested Fix
Without access to the actual file's content, it's difficult to specify the exact fix, but the focus should be on correcting the unexpected keywords or identifiers at the specified location.
|
No changes were detected in the The issue might be related to an environment change or an external dependency update. Further investigation would require checking those aspects.
|
This pull request adds functionality to diff GitHub Actions job logs. It includes updates to the documentation and tool definitions to support this new feature. The changes include adding a new method
diffWorkflowJobLogs
to the GitHub interface, as well as updating thedefTool
definitions forgithub_actions_job_log_get
andgithub_actions_job_log_diff
. This new functionality allows users to compare the logs of two different workflow jobs and see the differences between them.The
github_actions_job_log
function in thesystem.github_actions
tool is now renamed togithub_actions_job_log_get
and its associated description is updated accordingly. The name change makes the function intention clearer. 👌Introduced a new function (
github_actions_job_log_diff
) in thesystem.github_actions
tool. This function does the heavy lifting of diff'ing 2 workflow job logs. Given two job ids, this function downloads the corresponding logs and generates the diff. 🔍Added respective function descriptions, tool updates, and parameters in the tools' markdown files (
components/BuiltinTools.mdx
andreference/scripts/system.mdx
). 💼📚Added the newly introduced function
diffWorkflowJobLogs()
in theGitHubClient
class ingithub.ts
. This function internally calls private functiondownladJob()
to download individual job logs, processes them accordingly and generates the diff. 📂Updated the query constraints in the
agent_github.genai.mjs
file. It now advises consumers to prefer diffing job logs rather than downloading entire logs which can be very large. This promotes efficient usage of resources. 🛠️Lastly, updated the function signature of
diffWorkflowJobLogs()
inprompt_template.d.ts
, formally introducing this new function in the public API. 🌐