Skip to content

Commit

Permalink
List all
Browse files Browse the repository at this point in the history
  • Loading branch information
jesperancinha committed Oct 28, 2024
1 parent 112e0b9 commit 07c72a4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
20 changes: 20 additions & 0 deletions list-all-pr-and-branches.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

cd ..
for item in *; do
if [[ -d "$item" ]]; then
cd "${item}" || exit
git fetch -p
echo "---*** List status of PRs and branches in $item ***---"
for branch_name in $(git branch -r | grep -v '\->' | sed 's/origin\///' | grep -v 'master' | grep -v 'main' | grep -v 'migration-to-kotlin'); do
echo "- Project $item, Branch exists!: $branch_name"
done
if git status | grep -q "nothing to commit, working tree clean" ; then
echo "- Nothing to commit!";
else
git status;
fi
cd ..
fi
done
cd project-signer || exit
4 changes: 2 additions & 2 deletions update-all-prs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cd ..
for item in *; do
if [[ -d "$item" ]]; then
cd "${item}" || exit
echo "---*** Accept PR Makefile command found in $item ***---"
echo "---*** Updating PRs in project $item ***---"
if git ls-remote --exit-code --heads "$remote_name" "master"; then
master_branch="master"
fi
Expand All @@ -18,7 +18,7 @@ for item in *; do
git pull
git fetch -p
for branch_name in $(git branch -r | grep -v '\->' | sed 's/origin\///' | grep -v 'master' | grep -v 'main' | grep -v 'migration-to-kotlin'); do
echo "Processing branch: $branch"
echo "Processing branch: $branch_name"
if [ -n "${master_branch}" ]; then
git checkout "${branch_name}"
git merge origin/"${master_branch}" --no-edit
Expand Down

0 comments on commit 07c72a4

Please sign in to comment.