From 99b63c4e91c92dc149c025fce56880556d2059be Mon Sep 17 00:00:00 2001 From: mackenziesnyder Date: Mon, 2 Jun 2025 15:32:56 -0400 Subject: [PATCH 1/4] github action to automatically assign reviewers --- .github/auto_assign.yml | 26 ++++++++++++++++++++++++++ .github/workflows/assign_reviewers.yml | 8 ++++++++ 2 files changed, 34 insertions(+) create mode 100644 .github/auto_assign.yml create mode 100644 .github/workflows/assign_reviewers.yml diff --git a/.github/auto_assign.yml b/.github/auto_assign.yml new file mode 100644 index 0000000..0ba2e3a --- /dev/null +++ b/.github/auto_assign.yml @@ -0,0 +1,26 @@ +--- +# Set to true to add reviewers to pull requests +addReviewers: true + +# Set to true to add assignees to pull requests +addAssignees: author +# A list of reviewers to be added to pull requests (GitHub user name) +reviewers: + - mackenziesnyder + - ataha24 + - Dhananjhay +# A number of reviewers added to the pull request +# Set 0 to add all the reviewers (default: 0) +numberOfReviewers: 0 +# A list of assignees, overrides reviewers if set +# assignees: +# - assigneeA + +# A number of assignees to add to the pull request +# Set to 0 to add all of the assignees. +# Uses numberOfReviewers if unset. +# numberOfAssignees: 2 + +# A list of keywords to be skipped the process that add reviewers if pull requests include it +# skipKeywords: +# - wip diff --git a/.github/workflows/assign_reviewers.yml b/.github/workflows/assign_reviewers.yml new file mode 100644 index 0000000..a131699 --- /dev/null +++ b/.github/workflows/assign_reviewers.yml @@ -0,0 +1,8 @@ +--- +name: Assign reviewer +on: + pull_request_target: + types: [opened, ready_for_review] +jobs: + assign-reviewer: + uses: khanlab/actions/.github/workflows/workflow-pr_task-assignReviewer.yml@v0.3.4 From c9d363ff3462d011628c1cae4dcf818c8bc1978c Mon Sep 17 00:00:00 2001 From: mackenziesnyder Date: Mon, 2 Jun 2025 15:44:24 -0400 Subject: [PATCH 2/4] change logic for auto assign reviewers --- .github/auto_assign.yml | 26 --------------------- .github/workflows/assign_reviewers.yml | 8 ------- .github/workflows/auto_assign_reviewers.yml | 21 +++++++++++++++++ 3 files changed, 21 insertions(+), 34 deletions(-) delete mode 100644 .github/auto_assign.yml delete mode 100644 .github/workflows/assign_reviewers.yml create mode 100644 .github/workflows/auto_assign_reviewers.yml diff --git a/.github/auto_assign.yml b/.github/auto_assign.yml deleted file mode 100644 index 0ba2e3a..0000000 --- a/.github/auto_assign.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -# Set to true to add reviewers to pull requests -addReviewers: true - -# Set to true to add assignees to pull requests -addAssignees: author -# A list of reviewers to be added to pull requests (GitHub user name) -reviewers: - - mackenziesnyder - - ataha24 - - Dhananjhay -# A number of reviewers added to the pull request -# Set 0 to add all the reviewers (default: 0) -numberOfReviewers: 0 -# A list of assignees, overrides reviewers if set -# assignees: -# - assigneeA - -# A number of assignees to add to the pull request -# Set to 0 to add all of the assignees. -# Uses numberOfReviewers if unset. -# numberOfAssignees: 2 - -# A list of keywords to be skipped the process that add reviewers if pull requests include it -# skipKeywords: -# - wip diff --git a/.github/workflows/assign_reviewers.yml b/.github/workflows/assign_reviewers.yml deleted file mode 100644 index a131699..0000000 --- a/.github/workflows/assign_reviewers.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: Assign reviewer -on: - pull_request_target: - types: [opened, ready_for_review] -jobs: - assign-reviewer: - uses: khanlab/actions/.github/workflows/workflow-pr_task-assignReviewer.yml@v0.3.4 diff --git a/.github/workflows/auto_assign_reviewers.yml b/.github/workflows/auto_assign_reviewers.yml new file mode 100644 index 0000000..39dd161 --- /dev/null +++ b/.github/workflows/auto_assign_reviewers.yml @@ -0,0 +1,21 @@ +name: Auto Assign Reviewers + +on: + pull_request_target: + types: [opened, ready_for_review] + +permissions: + pull-requests: write + +jobs: + assign-reviewers: + runs-on: ubuntu-latest + steps: + - name: Assign reviewers + uses: hmarr/auto-assign-action@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + reviewers: | + mackenziesnyder + Dhananjhay + ataha24 From 664b227872ece0c966126c6bfe9332fb584c11ed Mon Sep 17 00:00:00 2001 From: mackenziesnyder Date: Mon, 2 Jun 2025 15:48:48 -0400 Subject: [PATCH 3/4] added logic for not just forked repos --- .github/workflows/auto_assign_reviewers.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/auto_assign_reviewers.yml b/.github/workflows/auto_assign_reviewers.yml index 39dd161..cab9382 100644 --- a/.github/workflows/auto_assign_reviewers.yml +++ b/.github/workflows/auto_assign_reviewers.yml @@ -1,6 +1,8 @@ name: Auto Assign Reviewers on: + pull_request: + types: [opened, ready_for_review] pull_request_target: types: [opened, ready_for_review] From f1bdd073b59013d6465b823f52392e93bd768a5c Mon Sep 17 00:00:00 2001 From: mackenziesnyder Date: Mon, 2 Jun 2025 15:54:04 -0400 Subject: [PATCH 4/4] use khanlab logic instead of hmarr --- .github/auto_assign.yml | 26 +++++++++++++++++++++ .github/workflows/auto_assign_reviewers.yml | 17 +++----------- 2 files changed, 29 insertions(+), 14 deletions(-) create mode 100644 .github/auto_assign.yml diff --git a/.github/auto_assign.yml b/.github/auto_assign.yml new file mode 100644 index 0000000..f284363 --- /dev/null +++ b/.github/auto_assign.yml @@ -0,0 +1,26 @@ +--- +# Set to true to add reviewers to pull requests +addReviewers: true + +# Set to true to add assignees to pull requests +addAssignees: author +# A list of reviewers to be added to pull requests (GitHub user name) +reviewers: + - mackenziesnyder + - ataha24 + - Dhananjhay +# A number of reviewers added to the pull request +# Set 0 to add all the reviewers (default: 0) +numberOfReviewers: 0 +# A list of assignees, overrides reviewers if set +# assignees: +# - assigneeA + +# A number of assignees to add to the pull request +# Set to 0 to add all of the assignees. +# Uses numberOfReviewers if unset. +# numberOfAssignees: 2 + +# A list of keywords to be skipped the process that add reviewers if pull requests include it +# skipKeywords: +# - wip \ No newline at end of file diff --git a/.github/workflows/auto_assign_reviewers.yml b/.github/workflows/auto_assign_reviewers.yml index cab9382..a5ef41d 100644 --- a/.github/workflows/auto_assign_reviewers.yml +++ b/.github/workflows/auto_assign_reviewers.yml @@ -6,18 +6,7 @@ on: pull_request_target: types: [opened, ready_for_review] -permissions: - pull-requests: write - jobs: - assign-reviewers: - runs-on: ubuntu-latest - steps: - - name: Assign reviewers - uses: hmarr/auto-assign-action@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - reviewers: | - mackenziesnyder - Dhananjhay - ataha24 + assign-reviewer: + uses: khanlab/actions/.github/workflows/workflow-pr_task-assignReviewer.yml@v0.3.4 +