Asana / comment-on-task-github-action

26 stars 15 forks source link

Support github.actor in comment-text #15

Open tiagovrtr opened 1 year ago

tiagovrtr commented 1 year ago

Allow the use of ${{ github.actor }} attribute in the comment-text param as {{PR_ACTOR}}, for example, to identify which user has submitted a review:

on:
  pull_request_review:
    types: [submitted]
jobs:
  create-comment-in-asana-task-job:
    runs-on: ubuntu-latest
    name: Alert new PR review in Asana Task
    steps:
      - name: Create a comment
        uses: Asana/comment-on-task-github-action@latest
        id: createComment
        with:
          asana-secret: ${{ secrets.ASANA_SECRET }}
          comment-text: "A review for PR #{{PR_ID}} has been submitted by {{PR_ACTOR}}: {{PR_URL}}"
      - name: Get status
        run: echo "Status is ${{ steps.createComment.outputs.status }}"