Skip to content

Commit

Permalink
try github script to comment
Browse files Browse the repository at this point in the history
  • Loading branch information
TRohit20 committed Feb 28, 2024
1 parent 871a46e commit d99abf8
Showing 1 changed file with 29 additions and 15 deletions.
44 changes: 29 additions & 15 deletions .github/workflows/notify-triager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,34 @@ jobs:
echo "md-triagers=$mdTriagers" >> $GITHUB_OUTPUT
echo "code-triagers=$codeTriagers" >> $GITHUB_OUTPUT
- name: Create Comment for .md files
# - name: Create Comment for .md files
# if: steps.md-pr-changes.outputs.any_changed == 'true'
# uses: mshick/[email protected]
# with:
# message: "The PR contains modifications to `.md` files, hence tagging Docs triagers for review and approval.
# cc: ${{ steps.read-triagers-json.outputs.md-triagers }}"
# env:
# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

# - name: Create Comment for non-.md files
# if: steps.non-md-pr-changes.outputs.any_changed == 'true'
# uses: mshick/[email protected]
# with:
# message: "The PR contains modifications to code related files, hence tagging Code triagers for review and approval.
# cc: ${{ steps.read-triagers-json.outputs.code-triagers }}"
# env:
# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

- name: Create comment for .md files
if: steps.md-pr-changes.outputs.any_changed == 'true'
uses: mshick/[email protected]
with:
message: "The PR contains modifications to `.md` files, hence tagging Docs triagers for review and approval.
cc: ${{ steps.read-triagers-json.outputs.md-triagers }}"
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

- name: Create Comment for non-.md files
if: steps.non-md-pr-changes.outputs.any_changed == 'true'
uses: mshick/[email protected]
uses: actions/github-script@v6
with:
message: "The PR contains modifications to code related files, hence tagging Code triagers for review and approval.
cc: ${{ steps.read-triagers-json.outputs.code-triagers }}"
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
github-token: ${{ secrets.GH_TOKEN }}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `The PR contains modifications to `.md` files, hence tagging Docs triagers for review and approval.
# cc: ${{ steps.read-triagers-json.outputs.md-triagers }}`
})

0 comments on commit d99abf8

Please sign in to comment.