Skip to content

Commit

Permalink
modify output
Browse files Browse the repository at this point in the history
  • Loading branch information
anshgoyalevil committed Feb 24, 2024
1 parent a946795 commit f3e77d1
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/notify-triagers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,25 @@ jobs:
if: steps.md-pr-changes.outputs.any_changed == 'true' || steps.non-md-pr-changes.outputs.any_changed == 'true'
id: read-triagers-json
run: |
triagers=$(cat triagers.json)
echo "::set-output name=triagers::$triagers"
echo "\"$triagers\"" | jq -r '.mdTriagers | join(" ")' >> $GITHUB_ENV
echo "\"$triagers\"" | jq -r '.codeTriagers | join(" ")' >> $GITHUB_ENV
mdTriagers=$(jq -r '.mdTriagers[]' triagers.json)
codeTriagers=$(jq -r '.codeTriagers[]' triagers.json)
echo "{md-triagers}={$mdTriagers}" >> $GITHUB_OUTPUT
echo "{code-triagers}={$codeTriagers}" >> $GITHUB_OUTPUT
- 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: ${{ env.mdTriagers }}'
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.GITHUB_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: ${{ env.codeTriagers }}'
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.GITHUB_TOKEN }}

0 comments on commit f3e77d1

Please sign in to comment.