Skip to content

Any way to checkout PR from issue_comment event? #331

Open
@aaronsteers

Description

@aaronsteers

The example in the docs here assumes a pull request event, but it does not work when operating on Pull Request comments, since those come through the issue_comment event.

I've spent several hours on this now and I don't see any way to checkout the branch associated with the issue_event.

Complications:

  • The event is the comment and it links to an issue, which only indirectly seems to have data on the pull request url.
  • Checking out the associate sha doesn't give push ability, since the branch name itself is not discoverable (at least not as well as I can tell).
  • Since issue_comment events have to be triggered by the workflow file on the default branch, it seems that is always the branch name provided. I haven't yet found any way to get the actual PR branch, although it seems this should be a straightforward and frequent use case for operating on PR comments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions