Skip to content

Commit

Permalink
fix: machete workflow - use squash commit instead merge
Browse files Browse the repository at this point in the history
  • Loading branch information
DarthB committed Jan 18, 2025
1 parent 817cd0d commit 9b94372
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/machete.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: machete

on:
schedule:
- cron: '0 8 * * *'
- cron: "0 8 * * *"
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -63,14 +63,14 @@ jobs:
git push https://x-access-token:${{ secrets.DELTA_BOT_GH_TOKEN }}@github.com/${{ github.repository }} $BRANCH_NAME
echo "Changes committed and pushed to $BRANCH_NAME"
echo "Attempting to create a pull request..."
# Create a pull request
PR_URL=$(gh pr create --base master --head $BRANCH_NAME --title "Fix unused dependencies" --body "This PR fixes unused dependencies found by cargo machete." --draft=false --label "dependencies")
echo "Pull request created: $PR_URL"
# Automatically merge the pull request after it meets the requirements
gh pr merge "$PR_URL" --merge --delete-branch
gh pr merge "$PR_URL" --squash --delete-branch
echo "Pull request merged and branch deleted."
else
echo "No changes detected. No commit or push."
fi
fi

0 comments on commit 9b94372

Please sign in to comment.