Skip to content

Instantly share code, notes, and snippets.

@thomaslagies
Last active January 15, 2025 09:09
Show Gist options
  • Select an option

  • Save thomaslagies/d0ccd0b2c8c40deb39aacd209ec5da7e to your computer and use it in GitHub Desktop.

Select an option

Save thomaslagies/d0ccd0b2c8c40deb39aacd209ec5da7e to your computer and use it in GitHub Desktop.
repair update-build-config.yml
#! /bin/bash
find ~/git2 -name update-build-config.yml -exec sed -i '' 's/run: npm install --no-save --force yo/run: npm install --no-save --force yo@"4.x"/g' {} \;
for repo in ~/git2/*; do
cd $repo
echo "Current directory is $repo"
git pull
git add .github/workflows/update-build-config.yml
git checkout -b yo-downgrade
git commit -m "chore: downgrade yo to 4.3.1"
git push --set-upstream origin yo-downgrade
gh pr create --body-file .github/pull_request_template.md --title "chore: downgrade yo to 4.3.1" --fill
gh pr list --json number,title,headRefName -q '.[] | select(.headRefName == "yo-downgrade") | .number' | xargs -I {} gh pr comment {} --body "/merge"
done
@thomaslagies
Copy link
Author

To get repos for folder git2 just run this:

gh repo list sealsystems --topic type-node-service -L 500 --json name -q '.[].name' | xargs -I {} gh repo clone sealsystems/{}

Change the topic depending on your needs. E.g. type-node-module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment