@oss-scout/core 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.bundle.cjs +36 -36
- package/dist/commands/config.js +2 -0
- package/dist/core/issue-discovery.js +7 -0
- package/dist/core/schemas.d.ts +2 -0
- package/dist/core/schemas.js +1 -0
- package/package.json +1 -1
package/dist/commands/config.js
CHANGED
|
@@ -11,6 +11,7 @@ const ARRAY_FIELDS = new Set([
|
|
|
11
11
|
'preferredOrgs',
|
|
12
12
|
'projectCategories',
|
|
13
13
|
'excludeRepos',
|
|
14
|
+
'excludeOrgs',
|
|
14
15
|
'aiPolicyBlocklist',
|
|
15
16
|
]);
|
|
16
17
|
const NUMBER_FIELDS = new Set(['minStars', 'maxIssueAgeDays', 'minRepoScoreThreshold']);
|
|
@@ -95,6 +96,7 @@ export function runConfigShow(options) {
|
|
|
95
96
|
console.log(` preferredOrgs: ${formatArray(prefs.preferredOrgs)}`);
|
|
96
97
|
console.log(` projectCategories: ${formatArray(prefs.projectCategories)}`);
|
|
97
98
|
console.log(` excludeRepos: ${formatArray(prefs.excludeRepos)}`);
|
|
99
|
+
console.log(` excludeOrgs: ${formatArray(prefs.excludeOrgs)}`);
|
|
98
100
|
console.log(` aiPolicyBlocklist: ${formatArray(prefs.aiPolicyBlocklist)}`);
|
|
99
101
|
console.log(` persistence: ${prefs.persistence}`);
|
|
100
102
|
console.log();
|
|
@@ -148,6 +148,7 @@ export class IssueDiscovery {
|
|
|
148
148
|
const lowScoringRepos = new Set(this.deriveLowScoringRepos(minRepoScoreThreshold));
|
|
149
149
|
// Common filters
|
|
150
150
|
const excludedRepos = new Set(config.excludeRepos);
|
|
151
|
+
const excludeOrgs = new Set((config.excludeOrgs ?? []).map(o => o.toLowerCase()));
|
|
151
152
|
const maxAgeDays = config.maxIssueAgeDays || 90;
|
|
152
153
|
const now = new Date();
|
|
153
154
|
// Build query parts
|
|
@@ -168,6 +169,12 @@ export class IssueDiscovery {
|
|
|
168
169
|
const repoFullName = item.repository_url.split('/').slice(-2).join('/');
|
|
169
170
|
if (excludedRepos.has(repoFullName))
|
|
170
171
|
return false;
|
|
172
|
+
// Filter out entire orgs
|
|
173
|
+
if (excludeOrgs.size > 0) {
|
|
174
|
+
const orgName = repoFullName.split('/')[0]?.toLowerCase();
|
|
175
|
+
if (orgName && excludeOrgs.has(orgName))
|
|
176
|
+
return false;
|
|
177
|
+
}
|
|
171
178
|
// Filter repos with known anti-AI contribution policies
|
|
172
179
|
if (aiBlocklisted.has(repoFullName))
|
|
173
180
|
return false;
|
package/dist/core/schemas.d.ts
CHANGED
|
@@ -183,6 +183,7 @@ export declare const ScoutPreferencesSchema: z.ZodObject<{
|
|
|
183
183
|
intermediate: "intermediate";
|
|
184
184
|
}>>>;
|
|
185
185
|
excludeRepos: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
186
|
+
excludeOrgs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
186
187
|
aiPolicyBlocklist: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
187
188
|
preferredOrgs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
188
189
|
projectCategories: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
@@ -222,6 +223,7 @@ export declare const ScoutStateSchema: z.ZodObject<{
|
|
|
222
223
|
intermediate: "intermediate";
|
|
223
224
|
}>>>;
|
|
224
225
|
excludeRepos: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
226
|
+
excludeOrgs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
225
227
|
aiPolicyBlocklist: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
226
228
|
preferredOrgs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
227
229
|
projectCategories: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
package/dist/core/schemas.js
CHANGED
|
@@ -111,6 +111,7 @@ export const ScoutPreferencesSchema = z.object({
|
|
|
111
111
|
labels: z.array(z.string()).default(['good first issue', 'help wanted']),
|
|
112
112
|
scope: z.array(IssueScopeSchema).optional(),
|
|
113
113
|
excludeRepos: z.array(z.string()).default([]),
|
|
114
|
+
excludeOrgs: z.array(z.string()).default([]),
|
|
114
115
|
aiPolicyBlocklist: z.array(z.string()).default(['matplotlib/matplotlib']),
|
|
115
116
|
preferredOrgs: z.array(z.string()).default([]),
|
|
116
117
|
projectCategories: z.array(ProjectCategorySchema).default([]),
|