Skip to content

Commit

Permalink
fix: updated docTriagers and triager workflow (#2806)
Browse files Browse the repository at this point in the history
Co-authored-by: Ansh Goyal <[email protected]>
  • Loading branch information
akshatnema and anshgoyalevil authored Mar 31, 2024
1 parent 5ce827d commit 533366d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/notify-triager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,25 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/[email protected]
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Get commit message
id: commit-message
run: |
commit_message=$(git log --format=%B -n 1 ${{ github.event.pull_request.head.sha }})
echo "commit_message=$commit_message" >> $GITHUB_OUTPUT
- name: Check if last commit is a merge commit
id: check-merge-branch
run: |
if [[ "${{ steps.commit-message.outputs.commit_message }}" == *"Merge branch"* ]]; then
echo "Last commit is a merge commit"
echo "isMergeCommit=true" >> $GITHUB_OUTPUT
else
echo "Last commit message does not contain Merge branch"
echo "isMergeCommit=false" >> $GITHUB_OUTPUT
fi
- name: Check PR Changes for .md files
id: md-pr-changes
Expand Down Expand Up @@ -45,7 +64,7 @@ jobs:
echo "codeTriagers=$codeTriagers" >> $GITHUB_ENV
- name: Add Reviewers for code files
if: steps.non-md-pr-changes.outputs.any_changed == 'true'
if: steps.check-merge-branch.outputs.isMergeCommit == 'false' && steps.non-md-pr-changes.outputs.any_changed == 'true'
run: |
IFS=' ' read -r -a codeTriagers <<< "${{ env.codeTriagers }}"
reviewers=$(printf ', "%s"' "${codeTriagers[@]}")
Expand All @@ -60,7 +79,7 @@ jobs:
}"
- name: Add Reviewers for doc files
if: steps.md-pr-changes.outputs.any_changed == 'true'
if: steps.check-merge-branch.outputs.isMergeCommit == 'false' && steps.md-pr-changes.outputs.any_changed == 'true'
run: |
IFS=' ' read -r -a docTriagers <<< "${{ env.docTriagers }}"
reviewers=$(printf ', "%s"' "${docTriagers[@]}")
Expand Down
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ pages/blog/*.md @thulieblack @alequetzalli
pages/community/*.md @thulieblack @alequetzalli

README.md @alequetzalli @derberg @akshatnema @magicmatatjahu @mayaleeeee @asyncapi-bot-eve
#docTriagers: TRohit20 octonawish-akcodes BhaswatiRoy VaishnaviNandakumar Arya-Gupta J0SAL
#docTriagers: TRohit20 octonawish-akcodes BhaswatiRoy VaishnaviNandakumar J0SAL
#codeTriagers: sambhavgupta0705

0 comments on commit 533366d

Please sign in to comment.