Skip to content

[Beginner]: Edit .github/scripts/bot-assignment-check.sh so triage members max assignment is protected from being a mentor #1718

@exploreriii

Description

@exploreriii

🐥 Beginner Friendly

This issue is intended for contributors who have previously completed a Good First Issue in Hiero and are at a beginner level.
We recognize that gaining confidence and building skills are equally important steps in the open-source contributor journey.
The purpose of this issue—and others listed under Find a beginner issue—is to provide a supportive, low-pressure environment where you can learn, practice, and grow your contribution skills with confidence.

👾 Description of the issue

Right now all users below write permissions

which include:

  • regular users
  • triage members
    are limited to a max of 2 assignments to avoid getting spread too thinly

I want to refactor the mentor assignment workflow to literally 'assign' a mentor, not just comment that they have a mentor assigned. This will create a problem because a mentor will now have one of their two assignments used up, even though they are just mentoring and not actually working on an issue.

One way to solve this is to give triage members unlimited assignments, but this trains bad habits - users should assign to the minimum possible number of assignments, focusing on getting them done, rather than doing a lot of different issues.

New proposal:
Mentors (who have triage)
can be assigned to issues or PRs for mentoring
BUT those mentorship assignments should not count toward their personal issue limit

To solve this, I have created a 'mentor-assigned' label to help us filter out infomration.

💡 Proposed Solution

edit .github/scripts/bot-assignment-check.sh

for triage permission users, we will:

  • enable unlimited assignments for issues with label 'mentor-duty'

👩‍💻 Implementation Steps

To do this edit:

assignments_count() {
  gh issue list --repo "${REPO}" --assignee "${ASSIGNEE}" --state open --limit 100 --json number --jq 'length'
}

add some kind of triage check eg

  if [[ "$permission" == "triage" ]]; then
    echo "Triage user detected — excluding mentor-duty issues from count."

to make sure we only exclude triage members from issues with a mentor getting counted towards the max assignment

then we can exclude from the max assignemnt count

           | select([.labels[].name] | index("mentor-duty") | not)
           ] | length'

else we proceed with the normal logic, that currently exists

You can run local scripts to check the assignment counts of triage users
see docs/maintainers/team.md for triage users

Name GitHub ID
Emiliyan Kadiyski @emiliyank
Priyanshu @tech0priyanshu
Akshat @Akshat8510
Mounil2005 @Mounil2005
parvninama @parvninama
drtoxic69 @drtoxic69
prajeeta15 @prajeeta15
undefinedIsMyLife @undefinedIsMyLife
cheese-cakee @cheese-cakee

and check that if assgined as a mentor, it does not impact the count

✅ Acceptance Criteria

  • The issue is solved:
    My changes do exactly what the issue asked for.

  • I did not add extra changes:
    I did not modify anything that was not mentioned in the issue description.

  • Nothing else was broken:
    All existing features still work the same as before.

  • All checks pass:
    The automated tests (unit and integration tests) run successfully.

📋 Step-by-Step Contribution Guide

  • Assignment: You must be assigned to the issue, comment: /assign in the issue to get assigned see guide
  • Fork, Branch and Work on the issue: Create a copy of the repository, create a branch for the issue and solve the problem. For instructions, please read our Contributing guide file. Further help can be found at Set-up Training (including the Windows Setup Guide for Windows users) and Workflow Training.
  • DCO and GPG key sign each commit : each commit must be -s and -S signed. An explanation on how to do this is at Signing Guide
  • Add a Changelog Entry : your pull request will require a changelog. Read Changelog Entry Guide to learn how.
  • Push and Create a Pull Request : Once your issue is resolved, and your commits are signed, and you have a changelog entry, push your changes and create a pull request. Detailed instructions can be found at Submit PR Training, part of Workflow Training.
  • You did it 🎉: A maintainer or committer will review your pull request and provide feedback. If approved, we will merge the fix in the main branch. Thanks for being part of the Hiero community as an open-source contributor ❤️

IMPORTANT You will ONLY be assigned to the issue if you comment: /assign
IMPORTANT Your pull request CANNOT BE MERGED until you add a changelog entry AND sign your commits each with git commit -S -s -m "chore: your commit message" with a GPG key setup.

🤖 AI Usage Guidelines

You are welcome to use AI to help you understand and solve this issue.

Because AI tools can sometimes make mistakes, please take care to:

  • Only implement what is described in this issue
  • Avoid changing anything else in the file
  • Be careful when modifying parameters or return statements, as this may affect runtime behavior

If you're unsure, ask your mentor or the maintainers for help — they can provide expert Python SDK guidance and point you to the right examples or methods.

🤔 Additional Information

For more help, we have extensive documentation:

Additionally, we invite you to join our community on our Discord server.

We also invite you to attend each Wednesday, 2pm UTC our Python SDK Office Hour and Community Calls. The Python SDK Office hour is for hands-on-help and the Community Call for general community discussion.

You can also ask for help in a comment below!

Metadata

Metadata

Labels

beginnerAchievable by a fairly new comer that has already completed a couple of good first issuesgithub_actionsPull requests that update Github Actions code.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions