Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] branch outputs are <PR>/merge rather than the branch name #234

Closed
3 tasks done
chrisjohnson opened this issue May 12, 2023 · 4 comments · Fixed by #235
Closed
3 tasks done

[BUG] branch outputs are <PR>/merge rather than the branch name #234

chrisjohnson opened this issue May 12, 2023 · 4 comments · Fixed by #235
Labels
bug Something isn't working

Comments

@chrisjohnson
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Does this issue exist in the latest version?

  • I'm using the latest release

Describe the bug?

When running the action from a pull_request_review, none of current_branch, head_ref_branch and ref_branch actually include the branch name from the PR.

Here's what I see in the debug output:

##[debug]-e "CURRENT_BRANCH=20/merge" \
##[debug]-e "HEAD_REF_BRANCH=" \
##[debug]-e "REF_BRANCH=20/merge" \

To Reproduce

      - name: get branch name
        id: branch-name
        uses: tj-actions/branch-names@v6
      - name: run thing
        run: |
          docker run \
          --pull=always \
          -e "CURRENT_BRANCH=${{ steps.branch-name.outputs.current_branch }}" \
          -e "HEAD_REF_BRANCH=${{ steps.branch-name.outputs.head_ref_branch }}" \
          -e "REF_BRANCH=${{ steps.branch-name.outputs.ref_branch }}" \
          ...

What OS are you seeing the problem on?

ubuntu-latest or ubuntu-20.04, ubuntu-18.04

Expected behavior?

I'm not sure if my use case (triggering on pull_request_review) just isn't the desired one but my hope would be to have SOME way of consistently getting the branch name from the PR that the review was submitted for

Relevant log output

Included above

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@chrisjohnson chrisjohnson added the bug Something isn't working label May 12, 2023
@github-actions
Copy link

Thanks for reporting this issue, don't forget to star this project if you haven't already to help us reach a wider audience.

@chrisjohnson
Copy link
Author

It looks like github.event.pull_request.head.ref includes the right information on a pull_request_review

@jackton1
Copy link
Member

jackton1 commented May 15, 2023

@chrisjohnson Sorry for the delay getting to this, the issue has been resolved in the latest release.

@chrisjohnson
Copy link
Author

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants