diff --git a/docs/faq/repositories/i-moved-my-repository-on-the-git-provider.md b/docs/faq/repositories/i-moved-my-repository-on-the-git-provider.md deleted file mode 100644 index 201c2941f8..0000000000 --- a/docs/faq/repositories/i-moved-my-repository-on-the-git-provider.md +++ /dev/null @@ -1,10 +0,0 @@ -# I moved my repository on the Git provider - -Currently, Codacy doesn't automatically detect moves of repositories between two organizations. - -To ensure that Codacy continues to analyze a repository that was moved to another organization on your Git provider: - -1. Delete the repository from the original organization on Codacy, taking note of the settings for this repository -1. Add the repository to the new organization on Codacy and reconfigure the repository with the same settings as the original one - -If you can't find your repository in the original Codacy organization or if you need more help with this process, please contact us at . diff --git a/docs/organizations/managing-repositories.md b/docs/organizations/managing-repositories.md index 42b943a7e7..9ab047c3e7 100644 --- a/docs/organizations/managing-repositories.md +++ b/docs/organizations/managing-repositories.md @@ -68,7 +68,26 @@ To follow or unfollow repositories on Codacy: You automatically **start following** a repository as soon as you access any page from that repository. For example, when you access the repository using a direct link on your Git provider UI. Conversely, you automatically **stop following** a repository as soon as you try accessing any page from that repository but you don't have permissions to see that repository anymore. - + +## Transferring a repository to another organization {: id="transferring-repository"} + +On GitHub, when you transfer a repository to a different organization, GitHub only notifies the **destination** organization about the transfer — the original organization doesn't receive any notification. Because of this, Codacy needs some information from both organizations to keep track of the repository. + +Codacy automatically removes the repository from its original organization when both of the following organizations are added to Codacy: + +- The **original** organization that the repository is being transferred from. Since the repository is already tracked on Codacy under this organization, this is normally already the case. +- The **destination** organization that the repository is being transferred to. This is usually the step you need to take: adding the destination organization to Codacy is what installs the Codacy GitHub App there, allowing Codacy to receive the transfer notification. + +!!! note + The destination organization doesn't need a paid plan or any repositories added to Codacy — simply [adding the organization to Codacy](what-are-organizations.md#adding-an-organization) so that the Codacy GitHub App is installed is enough for Codacy to detect the transfer. + + This is commonly used to set up a dedicated "archive" organization on GitHub, to which repositories are transferred when they're decommissioned, so that Codacy automatically cleans them up from their original organization. + + Codacy only removes the repository from its original organization — it doesn't automatically add it to the destination organization on Codacy. If you want to keep analyzing the repository after the transfer, you still need to add it to the destination organization on Codacy yourself. + +!!! important + This is currently supported for **GitHub Cloud** and **GitHub Enterprise Cloud** only. For GitLab and Bitbucket, or if the destination organization isn't added to Codacy, [remove the repository manually](../repositories-configure/removing-your-repository.md). + ## Finding your repositories with Segments {: id="provider-segments"} Codacy allows you to utilise [**Segments**](../segments) to categorize and filter repositories more effectively within the Codacy platform. @@ -84,3 +103,4 @@ Codacy allows you to utilise [**Segments**](../segments) to categorize and filte ## See also - [How to setup Segments?](../segments) - [Which metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate.md) +- [How does Codacy support GitHub Enterprise?](../faq/general/how-does-codacy-support-github-enterprise.md) diff --git a/docs/organizations/what-are-organizations.md b/docs/organizations/what-are-organizations.md index d2de34d645..28b2f2aa87 100644 --- a/docs/organizations/what-are-organizations.md +++ b/docs/organizations/what-are-organizations.md @@ -31,16 +31,19 @@ If you update your organization or repository information on your Git provider, !!! note If an update to your organization name isn't automatically reflected on Codacy, navigate to the organization **Settings** page, tab **Profile**, and click the **Synchronize** button. -| Git provider | Rename repository | Change repository visibility | Delete repository | Rename organization or group | Remove member from organization or group | Delete organization or group | -|---|---|---|---|---|---|---| -| GitHub Cloud | Yes | Yes | Yes | Yes | Yes | Yes | -| GitHub Enterprise | Yes | Yes | Yes | Yes | Yes | Yes | -| GitLab Cloud | No | No | No | No | No | No | -| GitLab Enterprise | Yes | Yes | Yes | Yes | Yes | Yes | -| Bitbucket Cloud | Yes | Yes | No | No | No | No | -| Bitbucket Server | Yes | Yes | No | No | No | No | - -Se also the [roles and permission mapping from the Git providers](roles-and-permissions-for-organizations.md). +| Git provider | Rename repository | Change repository visibility | Delete repository | Rename organization or group | Remove member from organization or group | Delete organization or group | Transfer repository to a different organization | +|---|---|---|---|---|---|---|---| +| GitHub Cloud | Yes | Yes | Yes | Yes | Yes | Yes | Yes* | +| GitHub Enterprise | Yes | Yes | Yes | Yes | Yes | Yes | No | +| GitLab Cloud | No | No | No | No | No | No | No | +| GitLab Enterprise | Yes | Yes | Yes | Yes | Yes | Yes | No | +| Bitbucket Cloud | Yes | Yes | No | No | No | No | No | +| Bitbucket Server | Yes | Yes | No | No | No | No | No | + +!!! note + \* Only for GitHub Cloud, including organizations added through GitHub Enterprise Cloud, and only when both the original and destination organizations are added to Codacy. See [Transferring a repository to another organization](managing-repositories.md#transferring-repository). + +See also the [roles and permission mapping from the Git providers](roles-and-permissions-for-organizations.md). ## Deleting an organization diff --git a/mkdocs.yml b/mkdocs.yml index 736489c3b7..e3abebfcaa 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -321,8 +321,8 @@ plugins: "hc/en-us/articles/360012973060-How-does-Codacy-support-Bitbucket-Cloud-.md": "faq/general/how-does-codacy-support-bitbucket-cloud.md" "hc/en-us/articles/360013142699.md": "repositories-configure/local-analysis/client-side-tools.md" "hc/en-us/articles/360013142699-Client-side-tools.md": "repositories-configure/local-analysis/client-side-tools.md" - "hc/en-us/articles/360013560819.md": "faq/repositories/i-moved-my-repository-on-the-git-provider.md" - "hc/en-us/articles/360013560819-I-moved-my-repository-on-the-Git-provider.md": "faq/repositories/i-moved-my-repository-on-the-git-provider.md" + "hc/en-us/articles/360013560819.md": "organizations/managing-repositories.md" + "hc/en-us/articles/360013560819-I-moved-my-repository-on-the-Git-provider.md": "organizations/managing-repositories.md" "hc/en-us/articles/360013926899.md": "faq/troubleshooting/why-arent-duplication-metrics-being-calculated.md" "hc/en-us/articles/360013926899-Why-aren-t-duplication-metrics-being-calculated-.md": "faq/troubleshooting/why-arent-duplication-metrics-being-calculated.md" "hc/en-us/articles/360015300100.md": "faq/general/how-does-codacy-support-gitlab-enterprise.md" @@ -669,7 +669,6 @@ nav: - Repositories: - faq/repositories/how-do-i-reanalyze-my-repository.md - faq/repositories/i-renamed-my-repository-on-the-git-provider.md - - faq/repositories/i-moved-my-repository-on-the-git-provider.md - Code analysis: - faq/code-analysis/which-metrics-does-codacy-calculate.md - faq/code-analysis/why-does-codacy-show-unexpected-coverage-changes.md