Skip to content

Commit 27443a7

Browse files
committed
convert all imports to mdx
1 parent cde4753 commit 27443a7

13 files changed

+65
-224
lines changed
Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
import Admonition from '@theme/Admonition';
2-
3-
export default function AdminAccessControlInfo() {
4-
return (
5-
<Admonition type="note">
6-
<p>
7-
Organization admins can{' '}
8-
<a href="/organizations/roles-and-permissions-for-organizations#change-analysis-configuration">
9-
manage access to this feature
10-
</a>
11-
.
12-
</p>
13-
</Admonition>
14-
);
15-
}
1+
:::note
2+
Organization admins can [manage access to this feature](/organizations/roles-and-permissions-for-organizations#change-analysis-configuration)
3+
:::
Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
import Admonition from '@theme/Admonition';
2-
3-
export default function AdminAccessInfo() {
4-
return (
5-
<Admonition type="note">
6-
<p>Only organization admins can update this setting.</p>
7-
</Admonition>
8-
);
9-
}
1+
:::note
2+
Only organization admins can update this setting.
3+
:::
Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,5 @@
1-
import Admonition from '@theme/Admonition';
2-
3-
export default function AiInfo() {
4-
return (
5-
<Admonition type="note">
6-
<ul>
7-
<li>
8-
This feature is compatible with most programming languages and requires
9-
no additional setup.
10-
</li>
11-
<li>
12-
Comments are generated using the description of the static analysis
13-
issue, information about the tool that detected the issue, and a few
14-
lines of surrounding code to provide the AI with extra context and
15-
improve its accuracy.
16-
</li>
17-
<li>
18-
This feature leverages the OpenAI API. No information is shared with
19-
other third parties or used to train AI models. Refer to the{' '}
20-
<a href="https://openai.com/policies/api-data-usage-policies">
21-
OpenAI API data usage policies
22-
</a>{' '}
23-
for more information.
24-
</li>
25-
</ul>
26-
</Admonition>
27-
);
28-
}
1+
:::note
2+
- This feature is compatible with most programming languages and requires no additional setup.
3+
- Comments are generated using the description of the static analysis issue, information about the tool that detected the issue, and a few lines of surrounding code to provide the AI with extra context and improve its accuracy.
4+
- This feature leverages the OpenAI API. No information is shared with other third parties or used to train AI models. Refer to the [OpenAI API data usage policies](https://openai.com/policies/api-data-usage-policies) for more information.
5+
:::
Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,3 @@
1-
import Admonition from '@theme/Admonition';
2-
3-
export default function ApiExamplePaginationImportant({ github = false }) {
4-
return (
5-
<Admonition type="caution">
6-
<p>
7-
For the sake of simplicity, the example doesn't consider paginated
8-
results obtained from the Codacy API.{' '}
9-
<a href="/codacy-api/using-the-codacy-api#using-pagination">
10-
Learn how to use pagination
11-
</a>{' '}
12-
to ensure that you process all results returned by the API.
13-
</p>
14-
{github && (
15-
<p>
16-
Besides this, the script doesn’t consider paginated results obtained
17-
from the GitHub API.{' '}
18-
<a href="https://docs.github.com/en/rest/using-the-rest-api/using-pagination-in-the-rest-api">
19-
Learn how to use pagination on the GitHub API
20-
</a>{' '}
21-
to ensure that you obtain all the repositories in your organization.
22-
</p>
23-
)}
24-
</Admonition>
25-
);
26-
}
1+
:::caution
2+
[Learn how to use pagination](/codacy-api/using-the-codacy-api#using-pagination) to ensure that you process all results returned by the API.
3+
:::
Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
1-
import Admonition from '@theme/Admonition';
1+
:::caution
2+
**Never write API tokens to your configuration files** and keep your API tokens well protected, as they grant owner permissions to your projects on Codacy.
23

3-
export default function ApiTokenWarning() {
4-
return (
5-
<Admonition type="caution">
6-
<p>
7-
<strong>Never write API tokens to your configuration files</strong> and
8-
keep your API tokens well protected, as they grant owner permissions to
9-
your projects on Codacy.
10-
</p>
11-
<p>
12-
It's a best practice to store API tokens as environment variables. Check
13-
the documentation of your CI/CD platform on how to do this.
14-
</p>
15-
</Admonition>
16-
);
17-
}
4+
It's a best practice to store API tokens as environment variables. Check the documentation of your CI/CD platform on how to do this.
5+
:::
Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
import Admonition from '@theme/Admonition';
2-
3-
export default function CoverageGithubAcceptPermissions() {
4-
return (
5-
<Admonition type="note">
6-
<p>
7-
GitHub only: this feature requires updated app permissions. If you
8-
haven't done so yet, please{' '}
9-
<a href="https://docs.github.com/en/enterprise-cloud@latest/apps/using-github-apps/reviewing-and-modifying-installed-github-apps#reviewing-permissions">
10-
review and accept the updated Codacy app permissions
11-
</a>{' '}
12-
on GitHub.
13-
</p>
14-
</Admonition>
15-
);
16-
}
1+
:::note
2+
GitHub only: this feature requires updated app permissions. If you haven't done so yet, please [review and accept the updated Codacy app permissions](https://docs.github.com/en/enterprise-cloud@latest/apps/using-github-apps/reviewing-and-modifying-installed-github-apps#reviewing-permissions) on GitHub.
3+
:::
Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1 @@
1-
export default function CoverageIgnore() {
2-
return (
3-
<span>
4-
To exclude files from coverage analysis only, you must ignore them directly
5-
in the tool you're using to generate coverage reports and ensure that the
6-
reports you upload to Codacy don't include coverage information for those
7-
files.
8-
</span>
9-
);
10-
}
1+
To exclude files from coverage analysis only, you must ignore them directly in the tool you're using to generate coverage reports and ensure that the reports you upload to Codacy don't include coverage information for those files.
Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,11 @@
1-
import Admonition from '@theme/Admonition';
1+
:::note
2+
You can use the Codacy API to generate reports or obtain information
3+
about the code quality of your repositories in a more flexible way.
24

3-
export default function DashboardApiReportNote() {
4-
return (
5-
<Admonition type="note">
6-
<p>
7-
You can use the Codacy API to generate reports or obtain information
8-
about the code quality of your repositories in a more flexible way.
9-
</p>
10-
<p>
11-
For more information see the list of{' '}
12-
<a href="https://api.codacy.com/api/api-docs#codacy-api-analysis">
13-
available API endpoints
14-
</a>{' '}
15-
and the following examples:
16-
</p>
17-
<ul>
18-
<li>
19-
<a href="/codacy-api/examples/obtaining-current-issues-in-repositories">
20-
Obtaining current issues in repositories
21-
</a>
22-
</li>
23-
<li>
24-
<a href="/codacy-api/examples/obtaining-code-quality-metrics-for-files">
25-
Obtaining code quality metrics for files
26-
</a>
27-
</li>
28-
</ul>
29-
</Admonition>
30-
);
31-
}
5+
For more information see the list of
6+
[available API endpoints](https://api.codacy.com/api/api-docs#codacy-api-analysis)
7+
and the following examples:
8+
9+
- [Obtaining current issues in repositories](/codacy-api/examples/obtaining-current-issues-in-repositories)
10+
- [Obtaining code quality metrics for files](/codacy-api/examples/obtaining-code-quality-metrics-for-files)
11+
:::
Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
1-
export default function IssueDetails() {
2-
return (
3-
<>
4-
<p>Click the title of an issue card to expand it and see the following information:</p>
5-
<ul>
6-
<li>The committer and date of the commit that introduced the issue, if available</li>
7-
<li>The estimated time to fix the issue</li>
8-
<li>What the issue is and how to solve it</li>
9-
<li>
10-
The <a href="/getting-started/supported-languages-and-tools/">tool that reported the issue</a> and the related code pattern
11-
</li>
12-
<li>Where's this pattern enabled: coding standard, repository rules, or configuration file</li>
13-
</ul>
14-
</>
15-
);
16-
}
1+
Click the title of an issue card to expand it and see the following information:
2+
3+
- The committer and date of the commit that introduced the issue, if available
4+
- The estimated time to fix the issue
5+
- What the issue is and how to solve it
6+
- The [tool that reported the issue](/getting-started/supported-languages-and-tools/) and the related code pattern
7+
- Where this pattern is enabled: coding standard, repository rules, or configuration file
8+
Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
1-
import Admonition from '@theme/Admonition';
1+
:::tip
2+
Use a dedicated service account to integrate Codacy with your
3+
repositories. This prevents disruption of service if the user who
4+
originally enabled the integration loses access to the repositories,
5+
which may happen when a user leaves the team or the organization.
26

3-
export default function ServiceAccountIntegration() {
4-
return (
5-
<Admonition type="tip">
6-
<p>
7-
Use a dedicated service account to integrate Codacy with your
8-
repositories. This prevents disruption of service if the user who
9-
originally enabled the integration loses access to the repositories,
10-
which may happen when a user leaves the team or the organization.
11-
</p>
12-
<p>
13-
For more information and instructions on how to set up a dedicated
14-
service account see{' '}
15-
<a href="/faq/troubleshooting/why-did-codacy-stop-commenting-on-pull-requests#outdated-permissions">
16-
Why did Codacy stop commenting on pull requests?
17-
</a>
18-
</p>
19-
</Admonition>
20-
);
21-
}
7+
For more information and instructions on how to set up a dedicated
8+
service account see
9+
[Why did Codacy stop commenting on pull requests?](/faq/troubleshooting/why-did-codacy-stop-commenting-on-pull-requests#outdated-permissions)
10+
:::

0 commit comments

Comments
 (0)