From 9fba2abb99af218d0eb171b0759ac141362c9f55 Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Thu, 20 Jun 2024 11:06:57 +0200 Subject: [PATCH 1/2] fix: revert breaking linter changes --- .github/create-cli-pr.sh | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/create-cli-pr.sh b/.github/create-cli-pr.sh index 673609fa5..aea04baa9 100755 --- a/.github/create-cli-pr.sh +++ b/.github/create-cli-pr.sh @@ -18,9 +18,7 @@ set -ex CLI_DIR=$(mktemp -d) - - -gh repo clone git@github.com:snyk/cli.git "$CLI_DIR" -- --depth=1 +gh repo clone git@github.com:snyk/cli.git $CLI_DIR -- --depth=1 pushd "$CLI_DIR/cliv2" LS_COMMIT_HASH=$(grep snyk-ls go.mod| cut -d "-" -f 4) popd @@ -28,24 +26,23 @@ popd WHAT_CHANGED=$(git whatchanged "$LS_COMMIT_HASH"...HEAD) BODY=$(printf "## Changes since last integration of Language Server\n\n\`\`\`\n%s\n\`\`\`" "$WHAT_CHANGED") -pushd "$CLI_DIR" +pushd $CLI_DIR UPGRADE=$(go run scripts/upgrade-snyk-go-dependencies.go --name=snyk-ls) - NEW_LS_VERSION=$(echo "$UPGRADE" | sed 's/.*Sha: \(.*\) URL.*/\1/') - BRANCH=feat/automatic-upgrade-of-ls-to-$NEW_LS_VERSION - git checkout -b "$BRANCH" + LS_VERSION=$(echo $UPGRADE | sed 's/.*Sha: \(.*\) URL.*/\1/') + BRANCH=feat/automatic-upgrade-of-ls-to-$LS_VERSION + git checkout -b $BRANCH git config --global user.email "team-ide@snyk.io" git config --global user.name "Snyk Team IDE" git config --global gpg.format ssh git config --global commit.gpgsign true - echo "$PUB_SIGNING_KEY" > signingkey.pub + echo $PUB_SIGNING_KEY > signingkey.pub git config --global user.signingkey ./signingkey.pub - git commit -am "feat: automatic integration of language server $NEW_LS_VERSION" - git push --set-upstream origin "$BRANCH" - + 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 ($NEW_LS_VERSION)" --body "$BODY" + gh pr create --repo github.com/snyk/cli --base main --head $BRANCH --title "feat(language-server): integrate LS ($LS_VERSION)" --body "$BODY" gh pr merge -m --auto popd From bc72e38a9d5d2756409dfc599555eff1bc97c103 Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Thu, 20 Jun 2024 11:19:51 +0200 Subject: [PATCH 2/2] fix: complete history in create-cli-pr.yaml --- .github/workflows/create-cli-pr.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/create-cli-pr.yaml b/.github/workflows/create-cli-pr.yaml index db620ba57..810779cfb 100644 --- a/.github/workflows/create-cli-pr.yaml +++ b/.github/workflows/create-cli-pr.yaml @@ -11,6 +11,8 @@ jobs: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Determine Go version run: |