Skip to content

Conversation

avivkeller
Copy link
Member

@avivkeller avivkeller commented Sep 18, 2025

cc @ovflowd - This PR reduces the amount of times the GH API is called significantly by using advanced search

@Copilot Copilot AI review requested due to automatic review settings September 18, 2025 13:46
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the GitHub agenda issues functionality to use GitHub's advanced search API instead of iterating through all organization repositories individually. This change improves performance by making a single search query instead of multiple repository-specific queries.

  • Switched from repository iteration to GitHub search API with advanced_search: true
  • Updated data structure from array of repo objects to a key-value object mapping
  • Removed unused parameters and simplified function signatures

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

File Description
src/github.mjs Replaces repository iteration with GitHub search API and updates return type
src/meeting.mjs Updates function signature and data processing to handle new object structure
src/constants.mjs Adds constant for repository URL prefix length used in URL parsing
create-node-meeting-artifacts.mjs Removes unused meetingConfig parameter from function call

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +67 to +70
(obj[issue.repository_url.slice(REPOSITORY_URL_PREFIX_LENGTH)] ||= []).push(
issue
);
return obj;
Copy link
Preview

Copilot AI Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The repository name extraction from repository_url is fragile and assumes a specific URL format. Consider using issue.repository_url.split('/').slice(-2).join('/') to extract 'owner/repo' more reliably, or use the repository.full_name property if available in the search results.

Suggested change
(obj[issue.repository_url.slice(REPOSITORY_URL_PREFIX_LENGTH)] ||= []).push(
issue
);
return obj;
const repoFullName = issue.repository_url.split('/').slice(-2).join('/');
(obj[repoFullName] ||= []).push(
issue
);

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant