Skip to content

Commit 8be27f8

Browse files
jorgebrazclaude
andauthored
docs: document automatic cleanup on GitHub repository transfer TAROT-3749 (#2696)
* docs: document automatic cleanup on GitHub repository transfer TAROT-3749 GitHub only notifies the destination organization when a repository is transferred, so Codacy previously had no way to detect and remove it from the original organization. Document the new automatic cleanup behavior and its requirements (both orgs added to Codacy), including the common "archive org" use case. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * docs: remove the moved-repository FAQ page TAROT-3749 The manual GitLab/Bitbucket workaround it described doesn't belong on this page. Point the nav entry, old redirects, and the remaining cross-link to the existing removing-your-repository doc instead. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * docs: address review feedback on repo transfer cleanup docs TAROT-3749 The automatic cleanup actually fails to trigger when the destination organization isn't added to Codacy (that's what installs the app and lets the transfer webhook reach Codacy), not the original one, which is already guaranteed to exist since the repository is tracked there. Also fix the "GitHub Enterprise" row in the provider table: it refers to GitHub Enterprise Server, which is Codacy Self-hosted only and can't reach the Cloud-only transfer webhook handler, so it should read "No" rather than "Yes*". Fixes a pre-existing "Se also" typo nearby. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
1 parent b6061de commit 8be27f8

4 files changed

Lines changed: 36 additions & 24 deletions

File tree

docs/faq/repositories/i-moved-my-repository-on-the-git-provider.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/organizations/managing-repositories.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,26 @@ To follow or unfollow repositories on Codacy:
6868
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.
6969

7070
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.
71-
71+
72+
## Transferring a repository to another organization {: id="transferring-repository"}
73+
74+
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.
75+
76+
Codacy automatically removes the repository from its original organization when both of the following organizations are added to Codacy:
77+
78+
- 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.
79+
- 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.
80+
81+
!!! note
82+
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.
83+
84+
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.
85+
86+
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.
87+
88+
!!! important
89+
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).
90+
7291
## Finding your repositories with Segments {: id="provider-segments"}
7392

7493
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
84103
## See also
85104
- [How to setup Segments?](../segments)
86105
- [Which metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate.md)
106+
- [How does Codacy support GitHub Enterprise?](../faq/general/how-does-codacy-support-github-enterprise.md)

docs/organizations/what-are-organizations.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,19 @@ If you update your organization or repository information on your Git provider,
3131
!!! note
3232
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.
3333

34-
| Git provider | Rename repository | Change repository visibility | Delete repository | Rename organization or group | Remove member from organization or group | Delete organization or group |
35-
|---|---|---|---|---|---|---|
36-
| GitHub Cloud | Yes | Yes | Yes | Yes | Yes | Yes |
37-
| GitHub Enterprise | Yes | Yes | Yes | Yes | Yes | Yes |
38-
| GitLab Cloud | No | No | No | No | No | No |
39-
| GitLab Enterprise | Yes | Yes | Yes | Yes | Yes | Yes |
40-
| Bitbucket Cloud | Yes | Yes | No | No | No | No |
41-
| Bitbucket Server | Yes | Yes | No | No | No | No |
42-
43-
Se also the [roles and permission mapping from the Git providers](roles-and-permissions-for-organizations.md).
34+
| 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 |
35+
|---|---|---|---|---|---|---|---|
36+
| GitHub Cloud | Yes | Yes | Yes | Yes | Yes | Yes | Yes* |
37+
| GitHub Enterprise | Yes | Yes | Yes | Yes | Yes | Yes | No |
38+
| GitLab Cloud | No | No | No | No | No | No | No |
39+
| GitLab Enterprise | Yes | Yes | Yes | Yes | Yes | Yes | No |
40+
| Bitbucket Cloud | Yes | Yes | No | No | No | No | No |
41+
| Bitbucket Server | Yes | Yes | No | No | No | No | No |
42+
43+
!!! note
44+
\* 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).
45+
46+
See also the [roles and permission mapping from the Git providers](roles-and-permissions-for-organizations.md).
4447

4548
## Deleting an organization
4649

mkdocs.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,8 @@ plugins:
321321
"hc/en-us/articles/360012973060-How-does-Codacy-support-Bitbucket-Cloud-.md": "faq/general/how-does-codacy-support-bitbucket-cloud.md"
322322
"hc/en-us/articles/360013142699.md": "repositories-configure/local-analysis/client-side-tools.md"
323323
"hc/en-us/articles/360013142699-Client-side-tools.md": "repositories-configure/local-analysis/client-side-tools.md"
324-
"hc/en-us/articles/360013560819.md": "faq/repositories/i-moved-my-repository-on-the-git-provider.md"
325-
"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"
324+
"hc/en-us/articles/360013560819.md": "organizations/managing-repositories.md"
325+
"hc/en-us/articles/360013560819-I-moved-my-repository-on-the-Git-provider.md": "organizations/managing-repositories.md"
326326
"hc/en-us/articles/360013926899.md": "faq/troubleshooting/why-arent-duplication-metrics-being-calculated.md"
327327
"hc/en-us/articles/360013926899-Why-aren-t-duplication-metrics-being-calculated-.md": "faq/troubleshooting/why-arent-duplication-metrics-being-calculated.md"
328328
"hc/en-us/articles/360015300100.md": "faq/general/how-does-codacy-support-gitlab-enterprise.md"
@@ -669,7 +669,6 @@ nav:
669669
- Repositories:
670670
- faq/repositories/how-do-i-reanalyze-my-repository.md
671671
- faq/repositories/i-renamed-my-repository-on-the-git-provider.md
672-
- faq/repositories/i-moved-my-repository-on-the-git-provider.md
673672
- Code analysis:
674673
- faq/code-analysis/which-metrics-does-codacy-calculate.md
675674
- faq/code-analysis/why-does-codacy-show-unexpected-coverage-changes.md

0 commit comments

Comments
 (0)