diff --git a/.github/workflows/test_labeler.yml b/.github/workflows/test_labeler.yml index 1135a11f14d8b..8804d1ce05517 100644 --- a/.github/workflows/test_labeler.yml +++ b/.github/workflows/test_labeler.yml @@ -20,25 +20,13 @@ jobs: if [[ "${{ github.event.workflow_run.name }}" == "Basic Build and Test (GCC 9, Curses, LTO)" ]]; then echo "::set-output name=label::BasicBuildPassed" fi - - name: get-pr-id - uses: actions/github-script@v5 - with: - github-token: ${{ secrets.TX_PR_CREATOR }} - script: | - github.rest.repos.listPullRequestsAssociatedWithCommit({ - owner: context.repo.owner, - repo: context.repo.repo, - commit_sha: '${{ github.event.workflow_run.head_commit.id }}' - }) - - name: debug - run: echo ${{ steps.get-pr-id.outputs.result }} - name: set-label if: ${{ github.event.workflow_run.conclusion == 'success' }} uses: actions/github-script@v5 with: script: | github.rest.issues.addLabels({ - issue_number: ${{ steps.get-pr-id.outputs.result[0].number }}, + issue_number: ${{github.event.pull_request.number}}, owner: context.repo.owner, repo: context.repo.repo, labels: ['${{ steps.setLabel.outputs.label }}'] @@ -49,7 +37,7 @@ jobs: with: script: | github.rest.issues.removeLabel({ - issue_number: ${{ steps.get-pr-id.outputs.result[0].number }}, + issue_number: ${{github.event.pull_request.number}}, owner: context.repo.owner, repo: context.repo.repo, name: '${{ steps.setLabel.outputs.label }}'