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

clean: Create a dedicated section for the service account procedure DOCS-680 #2103

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions docs/assets/includes/service-account-integration.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
!!! tip
Use a dedicated service account to integrate Codacy with your repositories. This prevents disruption of service if the user who originally enabled the integration loses access to the repositories, which may happen when a user leaves the team or the organization.

For more information and instructions on how to set up a dedicated service account see [Why did Codacy stop commenting on pull requests?](../../faq/troubleshooting/why-did-codacy-stop-commenting-on-pull-requests.md#outdated-permissions)
Use a [dedicated service account](../../faq/troubleshooting/why-did-codacy-stop-commenting-on-pull-requests.md#service-account) to integrate Codacy with your repositories. This prevents disruption of service if the user who originally enabled the integration loses access to the repositories, which may happen when a user leaves the team or the organization.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ If you stopped receiving coverage summaries on your pull requests, please [revie

Different reasons can cause Codacy to stop analyzing and commenting on pull requests, but the most common is that the user who initially enabled the GitLab or Bitbucket integration no longer has permissions on the repository or that the SSH key is no longer valid.

To fix this issue and avoid future disruptions, refresh the GitLab or Bitbucket integration on Codacy using a dedicated service account on your Git provider:
To fix this issue and avoid future disruptions, refresh the GitLab or Bitbucket integration on Codacy [using a dedicated service account](#service-account) on your Git provider.

## Using a dedicated service account to integrate with your Git provider {: id="service-account"}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nicklem This is the option of isolating the service account procedure on a dedicated section within the same troubleshooting page.

However, I decided to try out a second option - isolating the procedure on a dedicated page. 🤓

The page title is a bit long, but it might work... Thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

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

I like the idea of the separate page, but for completeness, I'd also add one sentence to explain the concept of "service account" (e.g., I like this explanation). I didn't even know it had a name 😅


!!! info "This section applies to GitLab and Bitbucket"

Using a dedicated service account to integrate Codacy with your repositories prevents disruption of service if the user who originally enabled the integration loses access to the repositories.

To integrate Codacy with GitLab or Bitbucket using a dedicated service account, do the following:

1. Create a service account on your Git provider exclusively dedicated to integrating Codacy with your repositories.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Integrate with your Git provider using a service account

!!! info "This page applies only to GitLab and Bitbucket"

Using a dedicated service account to integrate Codacy with your repositories prevents disruption of service if the user who originally enabled the integration loses access to the repositories.

To integrate Codacy with GitLab or Bitbucket using a dedicated service account, do the following:

1. Create a service account on your Git provider exclusively dedicated to integrating Codacy with your repositories.

!!! note
The service account must:

- [Have administrator permissions](../../organizations/roles-and-permissions-for-organizations.md) on the repositories to integrate with Codacy
- Not be shared by other systems to ensure that Codacy doesn't hit the API rate limits of the Git provider when using this account

!!! tip
Using a dedicated service account also has the advantage of any pull request comments made by Codacy appearing as authored by the service account instead of by a regular organization member. You can name this account "Codacy" and use [this Codacy logo](https://avatars.githubusercontent.com/u/1834093) as the account picture so that your pull request comments look like the following example:

![Codacy comment on a GitLab merge request](images/gitlab-integration-pr-comment.png)

1. Log out of both your Git provider and of Codacy.

1. Log in to Codacy using the new service account.

1. Open your repository **Settings**, tab **Integrations**, and click the link **Refresh connection** to refresh the existing Git provider integration:

![Refresh Git provider integration](images/gitlab-integration-refresh.png)

1. Make sure the Git provider integration is configured as needed:

- [Configuring the GitLab integration](gitlab-integration.md#configuring)

- [Configuring the Bitbucket integration](bitbucket-integration.md#configuring)
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@ nav:
- repositories-configure/integrations/github-integration.md
- repositories-configure/integrations/gitlab-integration.md
- repositories-configure/integrations/bitbucket-integration.md
- repositories-configure/integrations/using-a-dedicated-service-account.md
- repositories-configure/integrations/post-commit-hooks.md
- repositories-configure/ignoring-files.md
- repositories-configure/languages.md
Expand Down
Loading