Skip to content

fix: Re-enable creation of the new repositories #833

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main-enterprise
Choose a base branch
from

Conversation

strainovic
Copy link

Hi all,

This PR fixes issue safe-settings/issues/780.

The code that returns the list of all repositories does not include one that does not exist.

Cheers! 👋

@Copilot Copilot AI review requested due to automatic review settings May 23, 2025 15:33
Copy link
Contributor

@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 fixes the repository-fetch logic to include repos defined in the config but missing from the API response.

  • Introduces tracking of processed repos to avoid duplicates
  • Splits processing into existing and missing repos batches
  • Concatenates and filters both result sets before returning

@klutchell
Copy link
Contributor

This change still requires force_create: true, correct? Just making sure that repo creation is still opt-in and not the default behaviour.

@strainovic
Copy link
Author

Hi @klutchell.

Yes, it requires force_create: true. It is here:

if (this.force_create) {

Thanks

Copy link
Contributor

@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

A fix to ensure newly configured repositories that aren’t returned by the installation API still get processed.

  • Split repository handling into “existing” (via GitHub paginate) and “missing” (from configuration) batches
  • Track which repos have been processed to avoid duplicates
  • Concatenate results from both batches and filter out nulls
Comments suppressed due to low confidence (1)

lib/settings.js:508

  • [nitpick] Rename repoInConfigs to something like configuredRepos or reposFromConfig to more clearly express its purpose.
const repoInConfigs = Object.values(this.repoConfigs)

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.

2 participants