Skip to content

Commit

Permalink
Always allow assigning author (#744)
Browse files Browse the repository at this point in the history
Fixes #359

Co-authored-by: Daniel Kiss <[email protected]>
  • Loading branch information
jay4ay and Daniel Kiss authored May 6, 2024
1 parent a675dcf commit b25b9a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
CHANGELOG
=====================================
| April 29, 2024: fix: Always allow assigning author `#744 <https://github.com/mergeability/mergeable/pull/744>`_
| Mar 11, 2024: fix: bump dependencies probot, jest and nock to latest versions and update ci workflow to use node 20 `#738 <https://github.com/mergeability/mergeable/pull/738>`_
| Feb 27, 2024: fix: search and replace of special annotations `#735 <https://github.com/mergeability/mergeable/pull/735>`_
| May 12, 2023: fix: Loading teams for team option of author filter/validator `#713 <https://github.com/mergeability/mergeable/pull/713>`_
Expand Down
5 changes: 4 additions & 1 deletion lib/actions/assign.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ class Assign extends Action {
const payload = this.getPayload(context)
const issueNumber = payload.number
const assignees = settings.assignees.map(assignee => searchAndReplaceSpecialAnnotations(assignee, payload))
const checkResults = await Promise.all(assignees.map(assignee => this.githubAPI.checkUserCanBeAssigned(context, issueNumber, assignee)))
const checkResults = await Promise.all(assignees.map(
assignee => assignee === payload.user.login
? assignee
: this.githubAPI.checkUserCanBeAssigned(context, issueNumber, assignee)))

const authorizedAssignees = checkResults.filter(assignee => assignee !== null)

Expand Down

0 comments on commit b25b9a7

Please sign in to comment.