Skip to content

Instantly share code, notes, and snippets.

@jkatayama
Last active July 3, 2023 12:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkatayama/7d7921fd39f96f72c841b4bc75b9db08 to your computer and use it in GitHub Desktop.
Save jkatayama/7d7921fd39f96f72c841b4bc75b9db08 to your computer and use it in GitHub Desktop.
git command
```
git branch -a | egrep "(bitrise)"| sed 's/remotes\/origin\///' | xargs git push --delete origin
```
```shell
gh pr list --limit 100 --json number,title,url --jq '.[] | .url' --search "is:pr is:open yml" | while read URL; do\ngh pr close ${URL} -c "duplicate pr"\ndone
```
  • delete all remote branches that contain "bitrise"
```shell
git branch -a | egrep "(bitrise)"| sed 's/remotes\/origin\///' | xargs git push --delete origin
  • close PRs if the pr title contains "yml" with a comment "duplicate pr"
gh pr list --limit 100 --json number,title,url --jq '.[] | .url' --search "is:pr is:open yml" | while read URL; do\ngh pr close ${URL} -c "duplicate pr"\ndone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment