@oss-autopilot/core 1.4.0 → 1.5.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/commands/search.js
CHANGED
|
@@ -34,6 +34,8 @@ export declare function fetchUserClosedPRCounts(octokit: Octokit, githubUsername
|
|
|
34
34
|
*/
|
|
35
35
|
export declare function fetchRecentlyClosedPRs(octokit: Octokit, config: {
|
|
36
36
|
githubUsername: string;
|
|
37
|
+
excludeRepos?: string[];
|
|
38
|
+
excludeOrgs?: string[];
|
|
37
39
|
}, days?: number): Promise<ClosedPR[]>;
|
|
38
40
|
/**
|
|
39
41
|
* Fetch PRs merged in the last N days.
|
|
@@ -41,6 +43,8 @@ export declare function fetchRecentlyClosedPRs(octokit: Octokit, config: {
|
|
|
41
43
|
*/
|
|
42
44
|
export declare function fetchRecentlyMergedPRs(octokit: Octokit, config: {
|
|
43
45
|
githubUsername: string;
|
|
46
|
+
excludeRepos?: string[];
|
|
47
|
+
excludeOrgs?: string[];
|
|
44
48
|
}, days?: number): Promise<MergedPR[]>;
|
|
45
49
|
/**
|
|
46
50
|
* Fetch merged PRs since a watermark date for incremental storage.
|
|
@@ -198,6 +198,15 @@ async function fetchRecentPRs(octokit, config, query, label, days, mapItem) {
|
|
|
198
198
|
// Skip own repos
|
|
199
199
|
if (isOwnRepo(parsed.owner, config.githubUsername))
|
|
200
200
|
continue;
|
|
201
|
+
// Exclude configured repos and orgs (#792)
|
|
202
|
+
if (config.excludeRepos?.includes(repo)) {
|
|
203
|
+
debug(MODULE, `Skipping excluded repo: ${repo}`);
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
206
|
+
if (config.excludeOrgs?.some((org) => org.toLowerCase() === parsed.owner.toLowerCase())) {
|
|
207
|
+
debug(MODULE, `Skipping excluded org: ${parsed.owner}`);
|
|
208
|
+
continue;
|
|
209
|
+
}
|
|
201
210
|
results.push(mapItem(item, { owner: parsed.owner, repo, number: parsed.number }));
|
|
202
211
|
}
|
|
203
212
|
debug(MODULE, `Found ${results.length} recently ${label} PRs`);
|
package/dist/core/pr-monitor.js
CHANGED
|
@@ -124,6 +124,15 @@ export class PRMonitor {
|
|
|
124
124
|
}
|
|
125
125
|
if (isOwnRepo(parsed.owner, config.githubUsername))
|
|
126
126
|
return false;
|
|
127
|
+
// Exclude configured repos and orgs (#792)
|
|
128
|
+
if (config.excludeRepos.includes(`${parsed.owner}/${parsed.repo}`)) {
|
|
129
|
+
debug('pr-monitor', `Skipping excluded repo: ${parsed.owner}/${parsed.repo}`);
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
if (config.excludeOrgs?.some((org) => org.toLowerCase() === parsed.owner.toLowerCase())) {
|
|
133
|
+
debug('pr-monitor', `Skipping excluded org: ${parsed.owner}`);
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
127
136
|
return true;
|
|
128
137
|
});
|
|
129
138
|
debug('pr-monitor', `Filtered to ${filteredItems.length} PRs after excluding own repos`);
|