From af937c5079b66453b3504806ed3114ad11297944 Mon Sep 17 00:00:00 2001 From: VineetBavniya Date: Fri, 17 Apr 2026 16:06:30 +0530 Subject: [PATCH 1/5] ci: update pr-auto-assignee workflow --- .github/workflows/pr-auto-assignee.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-auto-assignee.yml b/.github/workflows/pr-auto-assignee.yml index 88dd3165..0d78b436 100644 --- a/.github/workflows/pr-auto-assignee.yml +++ b/.github/workflows/pr-auto-assignee.yml @@ -12,6 +12,10 @@ on: description: 'A list of reviewers(GitHub user name) to be added to PRs' required: false type: string + assign_yourself: + description: 'Whether to assign the PR opener as an assignee' + required: true + type: boolean secrets: GITHUB: description: 'Your GitHub token for authentication.' @@ -27,4 +31,18 @@ jobs: assignees: ${{ inputs.assignees }} reviewers: ${{ inputs.reviewers }} skipKeywords: wip, draft -... + + - uses: actions/github-script@v7 + if: ${{ inputs.assign_yourself }} + with: + github-token: ${{ secrets.GITHUB }} + script: | + const opener = context.payload.pull_request.user.login; + + await github.rest.issues.addAssignees({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + assignees:[ opener ] + }); +... \ No newline at end of file From 594c09aacf4773f497f4165054d32a70534e8b39 Mon Sep 17 00:00:00 2001 From: VineetBavniya Date: Mon, 20 Apr 2026 14:10:25 +0530 Subject: [PATCH 2/5] ci: enhance documentation for pr-auto-assignee workflow --- docs/pr-auto-assignee.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/pr-auto-assignee.md b/docs/pr-auto-assignee.md index 4092a2c7..0a6d344c 100644 --- a/docs/pr-auto-assignee.md +++ b/docs/pr-auto-assignee.md @@ -3,7 +3,16 @@ This workflow automates process for assigning assignees to the PR which would opened or reopened from a users list. Workflows have been added in `.github/workflows/pr-auto-assignee.yml` #### Usage -Below workflow can be used to automatically assign the assignee to a pull request (PR) when the request is opened or reopened from the specified branch. If we provide a list of users, it will randomly select one user and assign as assignee to the PR. +This workflow can be used to automatically assign assignees to a PR when it is opened or reopened. +* If a list of users is provided, one user will be randomly selected and assigned. +* You can also enable assigning the PR opener to themselves using the `assign_yourself` flag. + +| Name | Description | Required | Type | +| ----------------- | ----------------------------------------------------- | -------- | ------- | +| `assignees` | List of GitHub usernames to randomly assign to the PR | No | String | +| `assign_yourself` | Whether to assign the PR creator as an assignee | Yes | Boolean | + + #### Example ```yaml @@ -20,5 +29,6 @@ jobs: secrets: GITHUB: ${{ secrets.TOKEN_GITHUB }} with: - assignees: #list of usernames of assignees + assignees: user1,user2,user3 # List of usernames + assign_yourself: true # Assign PR creator as assignee ``` \ No newline at end of file From bc6e2beb45bc908c1b97649819206e3710737f68 Mon Sep 17 00:00:00 2001 From: CloudDrove CI <84795582+clouddrove-ci@users.noreply.github.com> Date: Thu, 23 Apr 2026 05:33:33 -0400 Subject: [PATCH 3/5] Update PR auto-assignee workflow configuration Changed 'required' property for 'assign_yourself' to false and added default values for 'assignees' and 'reviewers'. --- .github/workflows/pr-auto-assignee.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-auto-assignee.yml b/.github/workflows/pr-auto-assignee.yml index 0d78b436..113adfc2 100644 --- a/.github/workflows/pr-auto-assignee.yml +++ b/.github/workflows/pr-auto-assignee.yml @@ -8,14 +8,17 @@ on: description: 'A list of assignees(GitHub user name) to be added to PR' required: true type: string + default: true reviewers: description: 'A list of reviewers(GitHub user name) to be added to PRs' required: false type: string + default: true assign_yourself: description: 'Whether to assign the PR opener as an assignee' - required: true + required: false type: boolean + default: true secrets: GITHUB: description: 'Your GitHub token for authentication.' @@ -45,4 +48,4 @@ jobs: issue_number: context.payload.pull_request.number, assignees:[ opener ] }); -... \ No newline at end of file +... From 6f1ffed88bd645e4dc1612ccba2d21d0a58de2b2 Mon Sep 17 00:00:00 2001 From: VineetBavniya Date: Thu, 23 Apr 2026 15:09:28 +0530 Subject: [PATCH 4/5] fix: remove default value from assignees --- .github/workflows/pr-auto-assignee.yml | 1 - docs/pr-auto-assignee.md | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pr-auto-assignee.yml b/.github/workflows/pr-auto-assignee.yml index 113adfc2..971443da 100644 --- a/.github/workflows/pr-auto-assignee.yml +++ b/.github/workflows/pr-auto-assignee.yml @@ -8,7 +8,6 @@ on: description: 'A list of assignees(GitHub user name) to be added to PR' required: true type: string - default: true reviewers: description: 'A list of reviewers(GitHub user name) to be added to PRs' required: false diff --git a/docs/pr-auto-assignee.md b/docs/pr-auto-assignee.md index 0a6d344c..df3a908c 100644 --- a/docs/pr-auto-assignee.md +++ b/docs/pr-auto-assignee.md @@ -10,7 +10,7 @@ This workflow can be used to automatically assign assignees to a PR when it is o | Name | Description | Required | Type | | ----------------- | ----------------------------------------------------- | -------- | ------- | | `assignees` | List of GitHub usernames to randomly assign to the PR | No | String | -| `assign_yourself` | Whether to assign the PR creator as an assignee | Yes | Boolean | +| `assign_yourself` | Whether to assign the PR creator as an assignee | No | Boolean | From fee6f840f41248df99540574f9b247ed1030f21c Mon Sep 17 00:00:00 2001 From: VineetBavniya Date: Thu, 23 Apr 2026 15:10:56 +0530 Subject: [PATCH 5/5] fix: remove default value from reviewers --- .github/workflows/pr-auto-assignee.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr-auto-assignee.yml b/.github/workflows/pr-auto-assignee.yml index 971443da..c7af8571 100644 --- a/.github/workflows/pr-auto-assignee.yml +++ b/.github/workflows/pr-auto-assignee.yml @@ -12,7 +12,6 @@ on: description: 'A list of reviewers(GitHub user name) to be added to PRs' required: false type: string - default: true assign_yourself: description: 'Whether to assign the PR opener as an assignee' required: false