diff --git a/.github/workflows/pr-jira-validation.yaml b/.github/workflows/pr-jira-validation.yaml index 5cc3203c..b190eea4 100644 --- a/.github/workflows/pr-jira-validation.yaml +++ b/.github/workflows/pr-jira-validation.yaml @@ -15,8 +15,6 @@ on: jobs: validate: runs-on: ubuntu-latest - env: - GH_TOKEN: ${{ github.token }} steps: - name: Checkout code uses: actions/checkout@v3 @@ -29,6 +27,8 @@ jobs: - name: Get branch creation event id: get_branch_creation_event + env: + GH_TOKEN: ${{ github.token }} run: | echo "repo - ${{ github.repository }}" BRANCH_CREATION_EVENT=$(gh api -H "Accept: application/vnd.github.v3+json" -H "X-GitHub-Api-Version: 2022-11-28" /repos/${{ github.repository }}/activity | jq -c '[.[] | select(.type == "CreateEvent" and .payload.ref == "refs/heads/${{ env.branch }}")] | .[0]')