Skip to content

Commit 9e0f87c

Browse files
committed
refactor: make intermediate issue requirement configurable
Signed-off-by: Parv Ninama <[email protected]>
1 parent 5246fc6 commit 9e0f87c

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ log() {
88
echo "[advanced-check] $1"
99
}
1010

11+
#######################################
12+
# Configuration
13+
#######################################
14+
REQUIRED_INTERMEDIATE_COUNT=1
15+
1116
#######################################
1217
# Validate required environment variables
1318
#######################################
@@ -135,7 +140,7 @@ if [[ "${DRY_RUN:-false}" == "true" ]]; then
135140
echo
136141
log "Intermediate Issues (closed): $INT_COUNT"
137142

138-
if (( INT_COUNT >= 1 )); then
143+
if (( INT_COUNT >= REQUIRED_INTERMEDIATE_COUNT )); then
139144
log "Result: USER QUALIFIED"
140145
else
141146
log "Result: USER NOT QUALIFIED"
@@ -178,7 +183,7 @@ check_user() {
178183

179184
log "Counts → Intermediate: $INT_COUNT"
180185

181-
if (( INT_COUNT >= 1 )); then
186+
if (( INT_COUNT >= REQUIRED_INTERMEDIATE_COUNT )); then
182187
log "User @$user qualified."
183188
return 0
184189
fi
@@ -196,7 +201,7 @@ check_user() {
196201
Advanced issues involve high-risk changes to the core codebase and require prior experience in this repository.
197202
198203
**Requirement:**
199-
- Complete at least **1** 'intermediate' issue (You have: **$INT_COUNT**)
204+
- Complete at least **$REQUIRED_INTERMEDIATE_COUNT** 'intermediate' issue (You have: **$INT_COUNT**)
200205
201206
Please check out our **$SUGGESTION** to build your experience first!
202207

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
173173
- Enhance TopicInfo `__str__` method and tests with additional coverage, and update the format_key function in `key_format.py` to handle objects with a _to_proto method.
174174

175175
### Fixed
176+
- Refactored the advanced issue assignment guard to use a single configurable variable for the required number of completed intermediate issues. (#1479)
176177
- Prevent LinkBot from posting duplicate “missing linked issue” comments on pull requests. (#1475)
177178
- Refined intermediate assignment guard to validate Beginner issue completion with improved logging and GraphQL-based counting. (#1424)
178179
- Improved filename-related error handling with clearer and more descriptive error messages.(#1413)

0 commit comments

Comments
 (0)