vsoch / pull-request-action

open a pull request when a branch is pushed or updated

Home Page:https://github.com/marketplace/actions/pull-request-action

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enable author as assignee

francoisaubert1 opened this issue · comments

Hi there!
What would you think of adding a variable to add author as assignee. For instance ASSIGN_AUTHOR_AS_ASSIGNEE ?
Thank you for your work.

hey @francoisaubert1 ! Since we have a variable that can be set in the environment for an assignee, it would be relatively straight forward to add a step to your workflow to handle this logic. I think you could just make a step that sets ‘${{ github.actor }} to be the PULL_REQUEST_ASSIGNEES. E.g., something like:

    steps:
      - name: pull-request-action
        uses: vsoch/pull-request-action@x.x.x
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          PULL_REQUEST_ASSIGNEES: ${{ github.actor }}

You could also explicitly set the variable in a previous step, if the above doesn't work. Give that a shot and let me know!

Indeed, works smoothly with the above solution... Thank you 👍