unsplash / comment-on-pr

A GitHub Action to comment on the relevant open PR when a commit is pushed.
MIT License
150 stars 84 forks source link

Add support for ENV variables #23

Closed kevinfarrugia closed 4 years ago

kevinfarrugia commented 4 years ago

As a user I would like to be able to add variables to the commit message.

Example:

- name: Comment on PR
  uses: unsplash/comment-on-pr@master
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    VARIABLE: "Foo"
  with:
    msg: "Check out this message $VARIABLE!"
    check_for_duplicate_msg: false
kevinfarrugia commented 4 years ago

I have managed to workaround using

- name: Comment on PR
  uses: unsplash/comment-on-pr@master
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    VARIABLE: "Check out this message Foo"
  with:
    msg: ${{ env.VARIABLE }}
    check_for_duplicate_msg: false