Skip to content

Commit

Permalink
fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
anshgoyalevil committed Feb 24, 2024
1 parent 6689668 commit 0747b69
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 29 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/notify-docs-triager.yml

This file was deleted.

55 changes: 55 additions & 0 deletions .github/workflows/notify-triager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Notify Triagers

on:
pull_request:
push:
branches:
- master

jobs:
Notify-triagers:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/[email protected]

- name: Check PR Changes for .md files
id: md-pr-changes
uses: tj-actions/changed-files@v42
with:
files: |
**.md
- name: Check PR Changes for non-.md files
id: non-md-pr-changes
uses: tj-actions/changed-files@v42
with:
files: |
!**.md
- name: Read triagers.json
if: steps.md-pr-changes.outputs.any_changed == 'true' || steps.non-md-pr-changes.outputs.any_changed == 'true'
id: read-triagers-json
run: |
mdTriagers=$(jq -r '.mdTriagers[]' triagers.json | tr '\n' ' ')
codeTriagers=$(jq -r '.codeTriagers[]' triagers.json | tr '\n' ' ')
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: ${{ 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: ${{ steps.read-triagers-json.outputs.code-triagers }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions triagers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"mdTriagers": ["@TRohit20", "@octonawish-akcodes", "@BhaswatiRoy", "@VaishnaviNandakumar", "@Arya-Gupta", "@J0SAL"],
"codeTriagers": ["@sambhavgupta0705"]
}

0 comments on commit 0747b69

Please sign in to comment.