Skip to content
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

chore: update typo PR script #5488

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions scripts/redo-typo-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,21 @@ gh pr checkout $ORIGINAL_PR_NUMBER
echo "Creating new local branch $NEW_BRANCH"
git checkout -b $NEW_BRANCH

# Step 3: Push the new branch to GitHub
# Step 3: Squash commits
echo "Squashing new local branch $NEW_BRANCH"
git reset --soft master
git add .
git commit -m "chore: typo fixes"

# Step 4: Push the new branch to GitHub
echo "Pushing new branch $NEW_BRANCH to GitHub"
git commit --amend --no-edit
git push origin $NEW_BRANCH

# Step 4: create a new pull request
# Step 5: create a new pull request
echo "Creating a new pull request for $NEW_BRANCH"
gh pr create --base master --head $NEW_BRANCH --title "chore: redo typo PR by $AUTHOR" --body "Thanks $AUTHOR for https://github.com/$REPO/pull/$ORIGINAL_PR_NUMBER. Our policy is to redo typo changes to dissuade metric farming. This is an automated script."

# Step 5: Close the original PR
# Step 6: Close the original PR
echo "Closing original PR #$ORIGINAL_PR_NUMBER"
gh pr close $ORIGINAL_PR_NUMBER

Expand Down
Loading