fix: missing branch name to gitlab job

This commit is contained in:
Pierre Mavro
2020-11-03 00:55:26 +01:00
committed by Pierre Mavro
parent e188459d66
commit 0512d2e202
3 changed files with 4 additions and 2 deletions

View File

@@ -32,6 +32,7 @@ jobs:
run: |
branch=$(echo ${{github.ref}} | sed -r 's/.+\/(.+)/\1/')
echo "Branch name: $branch"
export GITHUB_BRANCH=$branch
gh_json=$(curl -s -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/Qovery/engine/pulls?state=open")
gh_pr=$(echo $gh_json | jq --compact-output '.[] | {labels, ref: .head.ref}' | awk "/$branch/")
echo "Pull request info: $(echo $gh_pr)"