[ ] π Sweep Needs Improvement
I created this PR to fix the failing GitHub Actions.## Description
This PR addresses the issue of failing GitHub Actions due to the use of deprecated commands save-state and set-output. It introduces a utility script to assist in transitioning from these deprecated commands to the new method of using Environment Files in GitHub Actions workflow files.
Changes include:
A new utility script github_actions_transition.py in the sweepai/utils/ directory. This script contains a function update_workflow_file(file_path) that updates a given GitHub Actions workflow file to replace deprecated commands with the new method of writing to the $GITHUB_ENV and $GITHUB_OUTPUT files.
Modifications in sweepai/api.py to call the update_workflow_file function for each GitHub Actions workflow file before creating a pull request.
Modifications in sweepai/handlers/on_ticket.py to include a recommendation in the sandbox execution message to use the github_actions_transition.py script if the GitHub Actions failure is due to the use of deprecated commands.
Summary of Changes
Created sweepai/utils/github_actions_transition.py to assist in transitioning GitHub Actions workflow files.
Modified sweepai/api.py to update GitHub Actions workflow files before creating a pull request.
Modified sweepai/handlers/on_ticket.py to recommend using the transition script in case of failures due to deprecated commands.
PR Feedback (click)
save-state
andset-output
. It introduces a utility script to assist in transitioning from these deprecated commands to the new method of using Environment Files in GitHub Actions workflow files.Changes include:
github_actions_transition.py
in thesweepai/utils/
directory. This script contains a functionupdate_workflow_file(file_path)
that updates a given GitHub Actions workflow file to replace deprecated commands with the new method of writing to the$GITHUB_ENV
and$GITHUB_OUTPUT
files.sweepai/api.py
to call theupdate_workflow_file
function for each GitHub Actions workflow file before creating a pull request.sweepai/handlers/on_ticket.py
to include a recommendation in the sandbox execution message to use thegithub_actions_transition.py
script if the GitHub Actions failure is due to the use of deprecated commands.Summary of Changes
sweepai/utils/github_actions_transition.py
to assist in transitioning GitHub Actions workflow files.sweepai/api.py
to update GitHub Actions workflow files before creating a pull request.sweepai/handlers/on_ticket.py
to recommend using the transition script in case of failures due to deprecated commands.