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

Out of sync remote repositories when they are trasfered from another organization #8715

Closed
stsewd opened this issue Nov 24, 2021 · 0 comments · Fixed by #9178
Closed

Out of sync remote repositories when they are trasfered from another organization #8715

stsewd opened this issue Nov 24, 2021 · 0 comments · Fixed by #9178
Assignees
Labels
Accepted Accepted issue on our roadmap Bug A bug

Comments

@stsewd
Copy link
Member

stsewd commented Nov 24, 2021

Looks like on github, when a repo is transferred from another organization, they keep the same ID, and in our code these repositories will still be attached to the old organization. They are never updated, because they hit this

if repo.organization and organization and repo.organization != organization:
log.debug(
'Not importing %s because mismatched orgs',
fields['name'],
)
return None

(their current organization doesn't match the one they say to be coming from)

We need to improve that check to look for cases like this.

Front logo Front conversations

@stsewd stsewd added the Bug A bug label Nov 24, 2021
@humitos humitos added the Accepted Accepted issue on our roadmap label Nov 30, 2021
stsewd added a commit that referenced this issue May 10, 2022
…ser.

We were doing some checks to avoid removing the remote organization
from a remote repo when this is listed from the /users/repos/ endpoint
or changing the organization when the project was moved.

But, since we are hitting the GitHub API directly,
we can always trust the result from there,
which includes the type of owner of the repository,
we can use that to decide if the repository belongs to an organization or not.

Fixes #8715
stsewd added a commit that referenced this issue May 10, 2022
…ser.

We were doing some checks to avoid removing the remote organization
from a remote repo when this is listed from the /users/repos/ endpoint
or changing the organization when the project was moved.

But, since we are hitting the GitHub API directly,
we can always trust the result from there,
which includes the type of owner of the repository,
we can use that to decide if the repository belongs to an organization or not.

Fixes #8715
stsewd added a commit that referenced this issue May 10, 2022
…ser.

We were doing some checks to avoid removing the remote organization
from a remote repo when this is listed from the /users/repos/ endpoint
or changing the organization when the project was moved.

But, since we are hitting the GitHub API directly,
we can always trust the result from there,
which includes the type of owner of the repository,
we can use that to decide if the repository belongs to an organization or not.

Fixes #8715
stsewd added a commit that referenced this issue May 31, 2022
…sers (#9178)

We were doing some checks to avoid removing the remote organization
from a remote repo when this is listed from the /users/repos/ endpoint
or changing the organization when the project was moved.

But, since we are hitting the GitHub API directly,
we can always trust the result from there,
which includes the type of owner of the repository,
we can use that to decide if the repository belongs to an organization or not.

Fixes #8715
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Bug A bug
Projects
Archived in project
2 participants