Skip to content

Daisyui

Daisyui #2

Workflow file for this run

name: Auto Assign PR Creator
on:
pull_request:
types:
- opened
jobs:
auto_assign:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set Assignee
run: |
# Get the username of the pull request creator
PR_CREATOR=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}" | jq -r '.user.login')
# Assign the pull request to the creator
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/assignees" \
-d "{\"assignees\":[\"$PR_CREATOR\"]}"