pozil / auto-assign-issue

GitHub Action that auto-assigns issues or PRs to one or more users
Creative Commons Zero v1.0 Universal
52 stars 27 forks source link

Permitting duplicate entries in `assignees` to effect a weighted rotation #120

Closed jeremystretch closed 3 months ago

jeremystretch commented 3 months ago

Thank you this is excellent tool! It has been very helpful in improving our issue triage process.

I'd like to propose allowing the assignees parameter to have duplicate entries when numOfAssignee is 1, to enable weighting of individual assignees.

We currently have four maintainers on our team: two full-time and two volunteers, and we'd like to proportionately assign new issues more frequently to the full-time maintainers. Our rough target is 4:1, such that a full-time maintainer is randomly assigned to a new issue on average four times more frequently than a volunteer.

My strategy to effect this was to define assignees with 10 total entries:

assignees: user1, user1, user1, user1, user2, user2, user2, user2, user3, user4

However, this line reduces the assignees list to a set of unique names, defeating the purpose and effecting an equal weighting for all users.

I appreciate the need to determine unique names when assigning multiple users, but could the logic be tweaked to avoid this when numOfAssignee is 1?

pozil commented 3 months ago

Hi @jeremystretch, thanks for the feedback. This is a good feature request. I just released a new version that addresses this need but I decided to adopt a slightly different syntax to make it more readable (see readme). Enjoy!

jeremystretch commented 3 months ago

Excellent, thank you so much!