Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assign pr #99

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
```markdown
### PR Description
<!-- Provide a brief summary of the changes you have made. Explain the purpose and motivation behind these changes. -->

Expand Down Expand Up @@ -47,4 +46,3 @@ shader PerlinNoise {
- [ ] Are all tests passing?


```
7 changes: 7 additions & 0 deletions .github/workflows/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
* @NripeshN

crosstl/* @samthakur587

tests/* @samthakur587

crosstl/* @vaatsalya123
36 changes: 36 additions & 0 deletions .github/workflows/assign_pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Assign PR to Code Owner

on:
pull_request:
types: [opened]

jobs:
assign_pr:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Set up GitHub CLI
run: |
sudo apt-get update
sudo apt-get install gh -y

- name: Get Code Owners
id: get-code-owners
run: |
CODEOWNERS_FILE=.github/CODEOWNERS
if [ -f "$CODEOWNERS_FILE" ]; then
CODE_OWNER=$(grep -v '^#' $CODEOWNERS_FILE | grep -Eo '@[a-zA-Z0-9_-]+' | head -n 1)
echo "code_owner=${CODE_OWNER#@}" >> $GITHUB_ENV
else
echo "No CODEOWNERS file found."
exit 1
fi

- name: Assign PR to Code Owner
if: env.code_owner != ''
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr edit ${{ github.event.pull_request.number }} --add-assignee "${{ env.code_owner }}"
Loading