8BitJonny / gh-get-current-pr

Github Action for getting all the details about the current Pull Request if the commit is part of one
GNU General Public License v3.0
121 stars 27 forks source link

ability to fetch data from PR_URL (when triggered by a comment) #318

Open digitalkaoz opened 2 weeks ago

digitalkaoz commented 2 weeks ago

Subject of the issue

i want to get detailed infos about a PR when triggered by issue_comment (have a PR_URL, but nothing else)

Your git environment

on:
  issue_comment:
    types: [created, edited]
...
  steps:
      - uses: 8BitJonny/gh-get-current-pr@3.0.0
        id: PR
        with:
          prUrl: ${{ github.event.issue.html_url }} #thats what i need

Steps to reproduce

Expected behaviour

Works the same as with a concrete SHA

Actual behaviour

doesnt work at all

8BitJonny commented 2 weeks ago

Yeah, thats not possible and never was. prUrl is an output that you get when a pr was found. But this repo currently only supports taking a SHA as input to find a PR by.

if you want, you can open a PR for it and implement it yourself. I'd be happy to review that, I want to focus my time to maintaining the library right now and not to extend it