@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.
@@ -35,6 +35,7 @@ export async function runSearch(options) {
35
35
  return {
36
36
  issue: {
37
37
  repo: c.issue.repo,
38
+ repoUrl: `https://github.com/${c.issue.repo}`,
38
39
  number: c.issue.number,
39
40
  title: c.issue.title,
40
41
  url: c.issue.url,
@@ -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`);
@@ -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`);
@@ -171,6 +171,7 @@ export interface SearchOutput {
171
171
  candidates: Array<{
172
172
  issue: {
173
173
  repo: string;
174
+ repoUrl: string;
174
175
  number: number;
175
176
  title: string;
176
177
  url: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oss-autopilot/core",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "CLI and core library for managing open source contributions",
5
5
  "type": "module",
6
6
  "bin": {