Skip to content

Commit

Permalink
act compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
qododavid committed Jan 28, 2025
1 parent 331b7f3 commit 153f851
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
1 change: 0 additions & 1 deletion .github/actions/qodo-cover-pr/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,4 @@ runs:
env:
GITHUB_TOKEN: ${{ inputs.github_token }}
ACTION_REF: ${{ github.action_ref }}
<<: ${{ toJSON(env) }}
shell: bash
9 changes: 4 additions & 5 deletions .github/actions/qodo-cover-pr/scripts/run.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -e

BINARY_PATH="/tmp/bin/cover-agent-pro"
BINARY_PATH="/usr/local/bin/cover-agent-pro"
REPORT_DIR="/tmp"
REPORT_PATH="$REPORT_DIR/report.txt"
MODIFIED_FILES_JSON="/tmp/modified-files.json"
Expand Down Expand Up @@ -49,7 +49,7 @@ if [ "$PROJECT_LANGUAGE" == "python" ]; then
fi

# Skip git if in local mode
if ["$LOCAL" = "false"]; then
if [ "$LOCAL" = "false" ]; then
# Set up Git configuration
git config --global user.email "[email protected]"
git config --global user.name "Qodo Cover"
Expand All @@ -76,8 +76,7 @@ fi
# Download cover-agent-pro if not already downloaded
if [ ! -f "$BINARY_PATH" ]; then
echo "Downloading cover-agent-pro ${ACTION_REF}..."
mkdir -p /tmp/bin
wget -q -P /tmp/bin "https://github.com/qodo-ai/qodo-ci/releases/download/${ACTION_REF}/cover-agent-pro" >/dev/null
wget -q -P /usr/local/bin "https://github.com/qodo-ai/qodo-ci/releases/download/${ACTION_REF}/cover-agent-pro" >/dev/null
chmod +x "$BINARY_PATH"
fi

Expand All @@ -97,7 +96,7 @@ fi
--modified-files-json "$MODIFIED_FILES_JSON"

# Skip git if in local mode
if ["$LOCAL" = "false"]; then
if [ "$LOCAL" = "false" ]; then
# Handle any changes made by cover-agent-pro
if [ -n "$(git status --porcelain)" ]; then
TIMESTAMP=$(date +%s)
Expand Down
1 change: 0 additions & 1 deletion .github/actions/qodo-cover/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,4 @@ runs:
env:
GITHUB_TOKEN: ${{ inputs.github_token }}
ACTION_REF: ${{ github.action_ref }}
<<: ${{ toJSON(env) }}
shell: bash
9 changes: 4 additions & 5 deletions .github/actions/qodo-cover/scripts/run.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -e

BINARY_PATH="/tmp/bin/cover-agent-pro"
BINARY_PATH="/usr/local/bin/cover-agent-pro"
REPORT_DIR="/tmp"
REPORT_PATH="$REPORT_DIR/report.txt"

Expand Down Expand Up @@ -47,7 +47,7 @@ if [ "$PROJECT_LANGUAGE" == "python" ]; then
fi

# Skip git if in local mode
if ["$LOCAL" = "false"]; then
if [ "$LOCAL" = "false" ]; then
# Set up Git configuration
git config --global user.email "[email protected]"
git config --global user.name "Qodo Cover"
Expand All @@ -60,8 +60,7 @@ fi
# Download cover-agent-pro if not already downloaded
if [ ! -f "$BINARY_PATH" ]; then
echo "Downloading cover-agent-pro ${ACTION_REF}..."
mkdir -p /tmp/bin
wget -q -P /tmp/bin "https://github.com/qodo-ai/qodo-ci/releases/download/${ACTION_REF}/cover-agent-pro" >/dev/null
wget -q -P /usr/local/bin "https://github.com/qodo-ai/qodo-ci/releases/download/${ACTION_REF}/cover-agent-pro" >/dev/null
chmod +x "$BINARY_PATH"
fi

Expand All @@ -80,7 +79,7 @@ fi
--report-dir "$REPORT_DIR"

# Skip git if in local mode
if ["$LOCAL" = "false"]; then
if [ "$LOCAL" = "false" ]; then
# If new changes
if [ -n "$(git status --porcelain)" ]; then
TIMESTAMP=$(date +%s)
Expand Down

0 comments on commit 153f851

Please sign in to comment.