Skip to content

Commit

Permalink
feat: Replace enabling by refreshing concept on Bitbucket integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Cláudia Carpinteiro committed Apr 17, 2024
1 parent 5595364 commit 48cd6fb
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ To fix this issue and avoid future disruptions, re-enable the GitLab or Bitbucke

- [Enabling the GitLab integration](../../repositories-configure/integrations/gitlab-integration.md#refreshing)

- [Enabling the Bitbucket integration](../../repositories-configure/integrations/bitbucket-integration.md#enabling)
- [Enabling the Bitbucket integration](../../repositories-configure/integrations/bitbucket-integration.md#refreshing)

{%
include-markdown "../../assets/includes/default-git-provider-settings-tip.md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ To integrate Codacy with your Git workflow, follow these steps:

## 2. Activating the Git provider integration {: id="git-provider-integration"}

Follow the instructions for [GitHub](../repositories-configure/integrations/github-integration.md#configuring), [GitLab](../repositories-configure/integrations/gitlab-integration.md#refreshing), or [Bitbucket](../repositories-configure/integrations/bitbucket-integration.md#enabling) depending on your Git provider, and make sure that you:
Follow the instructions for [GitHub](../repositories-configure/integrations/github-integration.md#configuring), [GitLab](../repositories-configure/integrations/gitlab-integration.md#refreshing), or [Bitbucket](../repositories-configure/integrations/bitbucket-integration.md#refreshing) depending on your Git provider, and make sure that you:

1. Enable the Git provider integration
1. Enable the option **Status checks** (GitHub) or **Pull request status** (GitLab and Bitbucket)
Expand Down
31 changes: 18 additions & 13 deletions docs/repositories-configure/integrations/bitbucket-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,14 @@ description: Enable the Bitbucket integration to have pull request status, comme

The Bitbucket integration incorporates Codacy on your existing Git provider workflows by reporting issues and the analysis status directly on your pull requests.

## Enabling the Bitbucket integration {: id="enabling"}

<!--TODO CY-6642 Review this section considering the new behaviour to refresh/re-assign integration-->

To enable the Bitbucket integration, open your repository **Settings**, tab **Integrations**. When you add a new repository, Codacy enables the integration using the [default settings for your organization](../../organizations/integrations/default-git-provider-integration-settings.md).
When you add a new repository, Codacy sets the Bitbucket integration using the [default settings for your organization](../../organizations/integrations/default-git-provider-integration-settings.md). You can then [customize the settings](#configuring) for the repository.

![Bitbucket integration](images/bitbucket-integration.png)<!--TODO CY-6642 Update screenshot-->

If you remove the integration, you can enable it again as follows:<!--TODO CY-6642 This will change, as we won't allow users to delete the integration-->

1. Click the button **Add integration** and select **Bitbucket** on the list.
1. Click the button **Enable** and follow the instructions.
!!! important
Codacy uses the Bitbucket user who added the repository to create comments on pull requests. If that user loses access to the repository, a repository admin must [refresh the Bitbucket integration](#refreshing).

!!! important
The user that enables the integration [must have administrator access to the repository](../../organizations/roles-and-permissions-for-organizations.md#permissions-for-bitbucket). Codacy uses this Bitbucket user to create comments on pull requests.

{% include-markdown "../../assets/includes/service-account-integration.md" %}
{% include-markdown "../../assets/includes/service-account-integration.md" %}

## Configuring the Bitbucket integration {: id="configuring"}

Expand Down Expand Up @@ -66,6 +57,20 @@ Shows an overall view of the changes in the pull request, including new issues a

![Pull request summary on Bitbucket](images/bitbucket-integration-pr-summary.png)

## Refreshing the Bitbucket integration {: id="refreshing"}

If the user who added the repository to Codacy loses access to the repository, which may happen when the user leaves the team or the organization, Codacy won't be able to create comments on pull requests.

In this situation, another user with [administrator access to the repository](../../organizations/roles-and-permissions-for-organizations.md#permissions-for-bitbucket) needs to refresh the Bitbucket integration:

1. Open the repository **Settings**, tab **Integrations**.

1. On the Bitbucket integration area, click the link **Refresh integration**.

![Refresh Bitbucket integration](images/bitbucket-integration-refresh.png)<!--TODO CY-6642 Update screenshot-->

After refreshing the integration, Codacy will use the logged in Bitbucket user to create comments on pull requests.

## See also

- [Integrating Codacy with your Git workflow](../../getting-started/integrating-codacy-with-your-git-workflow.md)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 48cd6fb

Please sign in to comment.