-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- uses same branch and title all the time
- Loading branch information
1 parent
e588600
commit be728dc
Showing
1 changed file
with
11 additions
and
4 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 |
---|---|---|
|
@@ -29,7 +29,7 @@ BODY=$(printf "## Changes since last integration of Language Server\n\n\`\`\`\n% | |
pushd $CLI_DIR | ||
UPGRADE=$(go run scripts/upgrade-snyk-go-dependencies.go --name=snyk-ls) | ||
LS_VERSION=$(echo $UPGRADE | sed 's/.*Sha: \(.*\) URL.*/\1/') | ||
BRANCH=feat/automatic-upgrade-of-ls-to-$LS_VERSION | ||
BRANCH=feat/automatic-upgrade-of-ls | ||
git checkout -b $BRANCH | ||
|
||
git config --global user.email "[email protected]" | ||
|
@@ -41,8 +41,15 @@ pushd $CLI_DIR | |
git config --global user.signingkey ./signingkey.pub | ||
|
||
git commit -am "feat: automatic integration of language server $LS_VERSION" | ||
git push --set-upstream origin $BRANCH | ||
|
||
gh pr create --repo github.com/snyk/cli --base main --head $BRANCH --title "feat(language-server): integrate LS ($LS_VERSION)" --body "$BODY" | ||
git push -f --set-upstream origin $BRANCH | ||
|
||
TITLE="feat(language-server): integrate LS" | ||
PR=$(gh pr list --search "$TITLE" 2>&1 | grep -e "$TITLE" | cut -f1) | ||
if [[ ! $PR ]]; then | ||
echo "Creating new PR" | ||
gh pr create --repo github.com/snyk/cli --base main --head $BRANCH --title "$TITLE" --body "$BODY" | ||
elif | ||
gh pr edit $PR --repo github.com/snyk/cli --body "$BODY" | ||
fi | ||
gh pr merge -m --auto | ||
popd |