Skip to content

Commit ebc1554

Browse files
committed
Incorporated Dominika's comments and rebased branch
1 parent ca62bde commit ebc1554

File tree

2 files changed

+19
-24
lines changed

2 files changed

+19
-24
lines changed

modules/observe/scorecards/proc-configuring-github-scorecards-in-rhdh-instance.adoc

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,25 @@ You can view GitHub metrics for software components registered in the {product-v
1313
* You must have {configuring-book-link}[added a custom {product-very-short} application configuration] and have enough permissions to change it.
1414

1515
.Procedure
16+
To configure GitHub Scorecards in your RHDH instance, complete the following steps:
1617

17-
. Create and configure a GitHub App.
18-
.. Create the GitHub App with **Read-only** permissions for **Contents** to allow reading repositories.
18+
. To allow {product-very-short} to access the GitHub API, you must create and configure a GitHub App and add the necessary integration to your configuration file by completing the following steps:
19+
.. Create a https://docs.github.com/en/apps/overview[GitHub App] with the required permissions (Read-only for Contents to allow reading repositories).
1920
.. Generate a client secret and a private key.
20-
.. Install the app on the desired account or organization.
21-
.. Save the following credential values:
21+
.. Install the app on the desired account/organization.
22+
.. Save the following values:
2223
*** `App ID`
2324
*** `Client ID`
2425
*** `Client secret`
2526
*** `Private key`
27+
.. Add your GitHub credentials to {configuring-book-link}#provisioning-your-custom-configuration[your {product-very-short} secrets] using the following key/value pairs. You can use these secrets in the {product-very-short} configuration files by using their respective environment variable names.
28+
*** `GITHUB_INTEGRATION_APP_ID`
29+
*** `GITHUB_INTEGRATION_CLIENT_ID`
30+
*** `GITHUB_INTEGRATION_CLIENT_SECRET`
31+
*** `GITHUB_INTEGRATION_HOST_DOMAIN` (e.g., `github.com`)
32+
*** `GITHUB_INTEGRATION_PRIVATE_KEY_FILE`
2633

27-
. Add GitHub credentials to your {product-very-short} secrets.
28-
+
29-
Set the following key/value pairs as environment variables in your secrets store:
30-
+
31-
* `GITHUB_INTEGRATION_APP_ID`
32-
* `GITHUB_INTEGRATION_CLIENT_ID`
33-
* `GITHUB_INTEGRATION_CLIENT_SECRET`
34-
* `GITHUB_INTEGRATION_HOST_DOMAIN` (e.g., `github.com`)
35-
* `GITHUB_INTEGRATION_PRIVATE_KEY_FILE`
36-
37-
. Configure the GitHub integration in your `{product-very-short} app-config.yaml`.
38-
+
39-
Add the `integrations.github` section to your custom `{product-very-short} app-config.yaml` configuration file using the environment variables:
34+
. Configure the GitHub integration in your `{product-very-short} app-config.yaml`, by adding the `integrations.github` section to your custom `{product-very-short} app-config.yaml` configuration file:
4035
+
4136
[source,yaml]
4237
----
@@ -51,9 +46,7 @@ integrations:
5146
${GITHUB_INTEGRATION_PRIVATE_KEY_FILE}
5247
----
5348

54-
. Annotate the component entity in `catalog-info.yaml`.
55-
+
56-
Link a software component to the GitHub data source by adding the required annotations to its `catalog-info.yaml` file as shown in the following example:
49+
. In your {product-very-short} entity that you want to configure for the GitHub Scorecard plugin, in the `catalog-info.yaml` file, link a component to the data source by adding the required annotations as shown in the following code:
5750
+
5851
[source,yaml]
5952
----
@@ -82,9 +75,10 @@ Where:
8275
====
8376
You must add the team entity to the Catalog to ensure the provided permissions are applicable.
8477
====
78+
8579
. (Optional) Configure metric threshold values.
86-
+
87-
To customize the thresholds for the **GitHub Open Pull Requests** (`github.open_prs`) metric, add the following section to your `app-config.yaml` file:
80+
81+
.. To customize the thresholds for the **GitHub Open Pull Requests** (`github.open_prs`) metric, add the following section to your `app-config.yaml` file:
8882
+
8983
[source,yaml]
9084
----
@@ -101,7 +95,8 @@ scorecard:
10195
- key: error
10296
expression: '>50'
10397
----
104-
+
98+
where:
99+
105100
`scorecard:plugins:github:open_prs:thresholds`:: Lists the default threshold values for the GitHub open PRs metric.
106101

107102
[NOTE]

modules/observe/scorecards/proc-configuring-jira-scorecards-in-rhdh-instance.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ plugins:
4444
where:
4545

4646
`baseUrl`:: Enter the Jira URL.
47-
`token`:: Enter the Jira token (Base64 string for Cloud, PAT for Data Center).
47+
`token`:: Enter the Jira token (Base64 string for Cloud, PAT for Data Center). The Jira token must be added as a secret file in your {configuring-book-link}#provisioning-your-custom-configuration[`{product} app-config.yaml` file].
4848
`product`:: Enter the supported product: `cloud` or `datacenter`.
4949

5050
.. Use a proxy setup: In your `{product-very-short} dynamic-plugins-config.yaml`, add the following code:

0 commit comments

Comments
 (0)