From facac8474ea0ac547954a89c6b80206c54a5cae5 Mon Sep 17 00:00:00 2001 From: Ben Ahmady <32935794+subatoi@users.noreply.github.com> Date: Thu, 16 Oct 2025 10:49:10 +0100 Subject: [PATCH] Adds workflow for assigning DIY docs PR/issues openers to their creators (#57995) Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/assign-diy-docs.yml | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/assign-diy-docs.yml diff --git a/.github/workflows/assign-diy-docs.yml b/.github/workflows/assign-diy-docs.yml new file mode 100644 index 0000000000..ca9b04ea6a --- /dev/null +++ b/.github/workflows/assign-diy-docs.yml @@ -0,0 +1,30 @@ +name: Assign DIY docs issues + +on: + issues: + types: labeled + workflow_call: + +permissions: + contents: read +jobs: + assign_diy_docs_issues: + name: Assign issues labelled with "DIY docs" to the issue creator + if: >- + github.repository_owner == 'github' && github.repository != 'github/docs' && + github.event.label.name == 'DIY docs' + runs-on: ubuntu-latest + steps: + - name: Assign to creator + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd + with: + script: | + const item = context.payload.issue; + const creator = item.user.login; + const issueNumber = item.number; + await github.rest.issues.addAssignees({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issueNumber, + assignees: [creator] + });