Skip to content

feat: Add /unassign command to allow contributors to unassign themselves#1246

Merged
rwalworth merged 1 commit intohiero-ledger:mainfrom
darshit2308:feature/unassign-command
Mar 19, 2026
Merged

feat: Add /unassign command to allow contributors to unassign themselves#1246
rwalworth merged 1 commit intohiero-ledger:mainfrom
darshit2308:feature/unassign-command

Conversation

@darshit2308
Copy link
Copy Markdown
Contributor

Description:
Add support for the /unassign command to allow contributors to drop issues they no longer have bandwidth for, reducing manual maintainer overhead.

  • Add removeAssignees helper to helpers/api.js
  • Implement /unassign core logic (commands/unassign.js) validating issue state, authorization, and label reversion
  • Create dedicated comment builders (commands/unassign-comments.js)
  • Update /assign welcome comment to inform users about the new /unassign feature
  • Hook /unassign route into the comment event dispatcher (bot-on-comment.js)

Related issue(s):
Fixes #1239

Notes for reviewer:

  • Tested locally using a new test-unassign-bot.js suite that mirrors the existing custom mock framework.
  • The new tests provide full coverage for happy paths, authorization gates (including case-insensitive username matching), edge cases, and API failures.
  • API label failures are logged server-side rather than silently failing to ensure system observability.

Checklist

  • Documented (Code comments)
  • Tested (unit, integration, etc.)

@darshit2308 darshit2308 requested a review from a team as a code owner March 17, 2026 18:14
@darshit2308 darshit2308 requested a review from leninmehedy March 17, 2026 18:14
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 17, 2026

Hey @darshit2308 👋 thanks for the PR!
I'm your friendly PR Helper Bot 🤖 and I'll be riding shotgun on this one, keeping track of your PR's status to help you get it approved and merged.

This comment updates automatically as you push changes -- think of it as your PR's live scoreboard!
Here's the latest:


PR Checks

DCO Sign-off -- All commits have valid sign-offs. Nice work!


GPG Signature -- All commits have verified GPG signatures. Locked and loaded!


Merge Conflicts -- No merge conflicts detected. Smooth sailing!


Issue Link -- Linked to #1239 (assigned to you).


🎉 All checks passed! Your PR is ready for review. Great job!

@github-actions github-actions bot added the status: needs revision A pull request that requires changes before merge label Mar 17, 2026
Signed-off-by: darshit2308 <darshit2308@gmail.com>
@darshit2308 darshit2308 force-pushed the feature/unassign-command branch from fd8acfb to eb5d6e8 Compare March 17, 2026 18:40
@github-actions github-actions bot added status: needs review The pull request is ready for maintainer review and removed status: needs revision A pull request that requires changes before merge labels Mar 17, 2026
Copy link
Copy Markdown
Contributor

@rwalworth rwalworth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - clean, well-structured implementation that follows the existing patterns nicely. All the requirements from #1239 are covered (authorization gates, edge cases, removeAssignees helper, file structure, welcome comment update) and the test suite is thorough.

A few overall formatting items to clean up:

  • Several files are missing the trailing newline at end of file (bot-on-comment.js, unassign.js, unassign-comments.js, test-assign-bot.js, test-unassign-bot.js). Note that bot-on-comment.js and test-assign-bot.js previously had trailing newlines - please restore those, and add them to the new files as well.
  • There's trailing whitespace on a few lines (bot-on-comment.js lines 12 and 36, unassign.js line 89, test-unassign-bot.js line 13). A quick pass should catch these.

I left a couple more notes below - nothing blocking. Running workflows now and will merge once they pass!

Congratulations on your first contribution to the Hiero C++ SDK @darshit2308! 🎉 Thank you for taking the time to contribute!

Copy link
Copy Markdown
Member

@PavelSBorisov PavelSBorisov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rwalworth rwalworth merged commit 32b9bda into hiero-ledger:main Mar 19, 2026
12 checks passed
@rwalworth rwalworth removed the status: needs review The pull request is ready for maintainer review label Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Intermediate]: Add /unassign command to allow contributors to unassign themselves

3 participants