Skip to content

Commit ffe34a8

Browse files
committed
fix: make intermediate guard required beginner count configurable
Signed-off-by: Parv Ninama <ninamaparv@gmail.com>
1 parent a240efe commit ffe34a8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/scripts/bot-intermediate-assignment.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const EXEMPT_PERMISSION_LEVELS = (process.env.INTERMEDIATE_EXEMPT_PERMISSIONS ||
66
.map((entry) => entry.trim().toLowerCase())
77
.filter(Boolean);
88
const DRY_RUN = /^true$/i.test(process.env.DRY_RUN || '');
9+
const REQUIRED_BEGINNER_ISSUE_COUNT = 0 ;
910

1011
function isSafeSearchToken(value) {
1112
return typeof value === 'string' && /^[a-zA-Z0-9._/-]+$/.test(value);
@@ -177,7 +178,11 @@ module.exports = async ({ github, context }) => {
177178
return console.log(`Skipping guard for @${mentee} on issue #${issue.number} due to API error when verifying Beginner issues.`);
178179
}
179180

180-
if (completedCount >= 1) {
181+
if(REQUIRED_BEGINNER_ISSUE_COUNT === 0){
182+
return console.log(`Skipping guard for @${mentee} on issue #${issue.number}: beginner requirement temporarily disabled`)
183+
}
184+
185+
if (completedCount >= REQUIRED_BEGINNER_ISSUE_COUNT) {
181186
console.log(`✅ ${mentee} has completed ${completedCount} Beginner issues. Assignment allowed.`);
182187
return;
183188
}

0 commit comments

Comments
 (0)