Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Always allow assigning author #744

Merged
merged 1 commit into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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