Skip to content

Commit 594edea

Browse files
chore: Edit .github/scripts/bot-assignment-check.sh so max assignment limit only applies to issues, it excludes PRs (hiero-ledger#1739)
Signed-off-by: AkshayKumarSahu <akshaykumar15031999@gmail.com> Signed-off-by: Akshay Kumar <akshaykumar15031999@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent e2ced6d commit 594edea

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ issue_has_gfi() {
3636
}
3737

3838
assignments_count() {
39-
gh issue list --repo "${REPO}" --assignee "${ASSIGNEE}" --state open --limit 100 --json number --jq 'length'
39+
# Count only issues (not PRs) assigned to the user, using structured isPullRequest field
40+
gh issue list --repo "${REPO}" --assignee "${ASSIGNEE}" --state open --limit 100 --json number,isPullRequest --jq '[.[] | select(.isPullRequest | not)] | length'
4041
}
4142

4243
remove_assignee() {
@@ -75,7 +76,7 @@ Hi @$ASSIGNEE, this is the Assignment Bot.
7576
7677
:warning: **Assignment Limit Exceeded**
7778
78-
Your account currently has limited assignment privileges with a maximum of **1 open assignment** at a time.
79+
Your account currently has limited assignment privileges with a maximum of **1 open issue assignment** at a time.
7980
8081
You currently have $count open issue(s) assigned. Please complete and merge your existing assignment before requesting a new one.
8182
@@ -96,7 +97,7 @@ msg_normal_limit_exceeded() {
9697
cat <<EOF
9798
Hi @$ASSIGNEE, this is the Assignment Bot.
9899
99-
Assigning you to this issue would exceed the limit of 2 open assignments.
100+
Assigning you to this issue would exceed the limit of 2 open issue assignments.
100101
101102
Please resolve and merge your existing assigned issues before requesting new ones.
102103
EOF

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
257257
- chore: update MAINTAINERS.md to include new maintainer Manish Dait and sort maintainers by GitHub ID. (#1691)
258258

259259
### Fixed
260+
- Fixed assignment limit check to only count issues (not PRs) towards the maximum 2 concurrent assignments, allowing users to be assigned to PRs without affecting their issue assignment capacity. (#1717)
260261
- Updated Good First Issue recommendations to supported Hiero repositories. (#1689)
261262
- Fix the next-issue recommendation bot to post the correct issue recommendation comment. (#1593)
262263
- Ensured that the GFI assignment bot skips posting `/assign` reminders for repository collaborators to avoid unnecessary notifications.(#1568).

0 commit comments

Comments
 (0)