Skip to content

Commit

Permalink
Back to no pr
Browse files Browse the repository at this point in the history
  • Loading branch information
mauromorales committed Aug 26, 2021
1 parent 1ff597f commit e17100d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fi

CLONE_DIR=$(mktemp -d)

echo "Setting git variables"
echo "Setting git variables for commit user"
export GITHUB_TOKEN=$API_TOKEN_GITHUB
git config --global user.email "$INPUT_USER_EMAIL"
git config --global user.name "$INPUT_USER_NAME"
Expand All @@ -27,17 +27,14 @@ echo "Cloning destination git repository"
git clone "https://$API_TOKEN_GITHUB@github.com/$INPUT_DESTINATION_REPO.git" "$CLONE_DIR"

cd "$CLONE_DIR"
git remote add upstream "https://$API_TOKEN_GITHUB@github.com/$GITHUB_REPOSITORY.git"
git checkout -b "$INPUT_DESTINATION_HEAD_BRANCH-$GITHUB_SHA"
git checkout "$INPUT_DESTINATION_HEAD_BRANCH"

echo "Fetching upstream"
git remote add upstream "https://$API_TOKEN_GITHUB@github.com/$GITHUB_REPOSITORY.git"
git fetch upstream

echo "Merging"
git merge upstream/master --log -m 'Merge upstream/master'

echo "Pushing git commit"
git push -u origin HEAD:$INPUT_DESTINATION_HEAD_BRANCH
echo "Creating a pull request"
gh pr create -f -R $INPUT_DESTINATION_REPO \
$PULL_REQUEST_REVIEWERS

0 comments on commit e17100d

Please sign in to comment.