generated from skills/template-template
-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Correct the git merge command * Add GITHUB_TOKEN to env * Make the script executable * Delete the comment
- Loading branch information
1 parent
420fa7a
commit cb89324
Showing
2 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env bash | ||
# Make sure this file is executable | ||
# chmod +x .github/script/merge-branch.sh | ||
# chmod a+x .github/script/merge-branch.sh | ||
|
||
# USAGE: This script is used to merge a branch into another branch | ||
|
||
|
@@ -11,11 +11,11 @@ git config user.name github-actions | |
git config user.email [email protected] | ||
|
||
# Merge branch | ||
echo "If branch $branch2 exists, merge branch origin $branch1 into branch $branch2" | ||
echo "If branch $branch2 exists, merge branch $branch1 into branch $branch2" | ||
if git show-ref --quiet refs/heads/$branch2 | ||
then | ||
git checkout $branch2 | ||
git merge origin $branch1 | ||
git merge $branch1 | ||
git push origin $branch2 | ||
else | ||
echo "Branch $branch2 does not exist" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters