Skip to content
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

Fix 422 errors which might be do to Archive changes #806

Merged
merged 4 commits into from
Apr 6, 2025

Conversation

decyjphr
Copy link
Collaborator

@decyjphr decyjphr commented Apr 6, 2025

Undo the Archive plugin changes to resolve the 422 errors

resolves #794

@Copilot Copilot bot review requested due to automatic review settings April 6, 2025 17:02
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 reverts Archive plugin changes in an effort to resolve the 422 errors. Key changes include:

  • Removing the creation of shallow copies for repository configurations, now directly modifying them.
  • Eliminating the Archive.sync call and related processing.
  • Simplifying repository processing by removing missing repository handling.

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more

if (repoConfig) {
repoConfig = Object.assign({}, repoConfig, { name: repo.repo, org: repo.owner })
repoConfig = Object.assign(repoConfig, { name: repo.repo, org: repo.owner })
Copy link
Preview

Copilot AI Apr 6, 2025

Choose a reason for hiding this comment

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

Directly modifying repoConfig may introduce unintended side effects. Consider using a shallow clone (e.g., Object.assign({}, repoConfig, ...)) to avoid mutating the base configuration.

Suggested change
repoConfig = Object.assign(repoConfig, { name: repo.repo, org: repo.owner })
repoConfig = Object.assign({}, repoConfig, { name: repo.repo, org: repo.owner })

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

@decyjphr decyjphr requested a review from Copilot April 6, 2025 17:12
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 reverts the Archive plugin changes to resolve the 422 errors by modifying how repository configurations are managed and streamlining repository processing.

  • Removed the Archive plugin sync call and its result handling.
  • Changed the handling of repository and sub-org configuration objects by eliminating the creation of fresh copies.
  • Simplified the repository fetching loop by removing duplicate tracking logic.
Comments suppressed due to low confidence (1)

lib/settings.js:485

  • The deduplication logic using 'processedRepos' has been removed, which might lead to processing duplicate repositories. Verify that repository deduplication is no longer required or add back the logic if duplicates are possible.
const processedRepos = new Set()

Tip: Leave feedback on Copilot's review comments with the 👎 and 👍 buttons to help improve review quality. Learn more

@decyjphr decyjphr merged commit ff7a656 into main-enterprise Apr 6, 2025
5 checks passed
@decyjphr decyjphr deleted the fix-422-errors branch April 6, 2025 18:18
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.

A lot of HTTP 422 errors are happening in the repository plugin with the latest code
1 participant