diff --git a/.github/workflows/asana-notify-approved.yml b/.github/workflows/asana-notify-approved.yml index e0e5e23..8aeb7f7 100644 --- a/.github/workflows/asana-notify-approved.yml +++ b/.github/workflows/asana-notify-approved.yml @@ -1,17 +1,19 @@ -name: Pull Request Reviewed - on: + pull_request: + types: [opened, closed, reopened] pull_request_review: types: [submitted] jobs: - pr-reviewed: - if: github.event.review.state == 'approved' + create-comment-in-asana-task-job: runs-on: ubuntu-latest + name: Create a comment in Asana Task steps: - - name: Update Asana task -> PR approved - uses: duckduckgo/native-github-asana-sync@v1.1 + - name: Create a comment + uses: Asana/comment-on-task-github-action@v1.2 + id: createComment with: - asana-pat: ${{ secrets.GH_ASANA_SECRET }} - trigger-phrase: "ATASK:" - action: 'notify-pr-approved' + asana-secret: ${{ secrets.GH_ASANA_SECRET }} + comment-text: "{{PR_NAME}} is {{PR_STATE}}: {{PR_URL}}" + - name: Get status + run: echo "Status is ${{ steps.createComment.outputs.status }}"