From 42308eb7e367f28ff7d961b5dac9bc85ccd9b227 Mon Sep 17 00:00:00 2001 From: Mikhail Avramenko Date: Fri, 30 Jul 2021 13:33:06 +0700 Subject: [PATCH] fix for retrieving pr number Signed-off-by: Mikhail Avramenko --- .github/workflows/pr-for-updates.yaml | 2 +- .github/workflows/update-dependent-repositories-gomod.yaml | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-for-updates.yaml b/.github/workflows/pr-for-updates.yaml index 51f622564e..ed6ef4d85f 100644 --- a/.github/workflows/pr-for-updates.yaml +++ b/.github/workflows/pr-for-updates.yaml @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v2 - name: Construct PR message run: | - PULL_REQUEST_BODY=$(git log --pretty='format:%B' -1 | sed '/^$/d;$d') + PULL_REQUEST_BODY=$(git log --pretty='format:%B' -1 | sed '/^$/d;$d' | sed 's/#/# /g') echo "$PULL_REQUEST_BODY" echo "PULL_REQUEST_BODY<> $GITHUB_ENV echo "$PULL_REQUEST_BODY" >> $GITHUB_ENV diff --git a/.github/workflows/update-dependent-repositories-gomod.yaml b/.github/workflows/update-dependent-repositories-gomod.yaml index 4e7ee90006..f34b221673 100644 --- a/.github/workflows/update-dependent-repositories-gomod.yaml +++ b/.github/workflows/update-dependent-repositories-gomod.yaml @@ -36,11 +36,16 @@ jobs: path: ${{ github.repository }} repository: ${{ github.repository }} token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }} + - name: Get sha + id: get-sha + run: | + echo ::set-output name=sha::$( curl -u "u:${{secrets.NSM_BOT_GITHUB_TOKEN}}" https://api.github.com/repos/networkservicemesh/sdk/git/ref/heads/master | jq .object.sha | tr -d '"' ) - name: Find merged PR uses: jwalton/gh-find-current-pr@v1.0.2 id: findPr with: - github-token: ${{ github.token }} + sha: ${{ steps.get-sha.outputs.sha }} + github-token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }} - name: Create commit message working-directory: ${{ github.repository }} run: |