Skip to content

Commit

Permalink
Fix comment parsing action
Browse files Browse the repository at this point in the history
  • Loading branch information
ravenac95 committed Mar 19, 2024
1 parent 4822bc5 commit cb43b8f
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/external-prs-handle-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@ on:
jobs:
external-prs-handle-comment:
name: external-prs-handle-commit
environment: testing
environment: external-prs-app
runs-on: ubuntu-latest

# This job only runs for pull request comments
if: ${{ github.event.issue.pull_request }}
if: github.event.issue.pull_request && contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Setup external pr tools
uses: ./.github/workflows/setup-external-pr-tools

- run: |
echo "A comment by $SENDER on PR $NUMBER from on an ISSUE FROM $PR_AUTHOR with comment: $COMMENT "
env:
NUMBER: ${{ github.event.issue.number }}
ID: ${{ github.event.issue.id }}
COMMENT: ${{ github.event.issue.body }}
SENDER: ${{ github.event.sender }}
PR_AUTHOR: ${{ github.event.issue.author_association }}
cd ops/external-prs && pnpm tools parse-comment ${{ github.repository }} ${{ github.event.comment.id }} sha.out

0 comments on commit cb43b8f

Please sign in to comment.