From 65dc4f4187e53327d9874bd6f1a4a40aee945e88 Mon Sep 17 00:00:00 2001 From: Gery Hirschfeld Date: Thu, 29 Feb 2024 10:03:36 +0100 Subject: [PATCH] ci 3 --- .github/workflows/auto-pr-commend.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto-pr-commend.yml b/.github/workflows/auto-pr-commend.yml index ffd5333..eeeb949 100644 --- a/.github/workflows/auto-pr-commend.yml +++ b/.github/workflows/auto-pr-commend.yml @@ -21,7 +21,17 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 15 steps: - - run: echo "${{ github.event.pull_request.head.ref }}" + - run: echo "${{ github.event.issue.pull_request }}" + - run: echo "${{ github.event.issue.pull_request.url }}" + + - name: Get Branch Name + id: get-branch + run: | + COMMITS_URL="https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.issue.number }}" + BRANCH=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" $COMMITS_URL | jq -r '.head.ref') + echo "branch=$BRANCH" >> $GITHUB_OUTPUT + + - run: echo "${{ steps.get-branch.outputs.branch }}" # - name: Get Action URL # id: action-url # run: echo "url=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> $GITHUB_OUTPUT