From bb6eab19c6b959e1e7187d7bd678572474e0b7bd Mon Sep 17 00:00:00 2001
From: blam
Date: Mon, 25 Apr 2022 14:56:01 +0200
Subject: [PATCH 1/4] chore: some small minor changes here about generating a
token
Signed-off-by: blam
---
docs/getting-started/configuration.md | 5 ++---
.../create-app/templates/default-app/app-config.yaml.hbs | 2 ++
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/docs/getting-started/configuration.md b/docs/getting-started/configuration.md
index e7d100f410..4c8a65553f 100644
--- a/docs/getting-started/configuration.md
+++ b/docs/getting-started/configuration.md
@@ -217,8 +217,7 @@ for 7 days, it's a lucky number.
-Set the scope to your likings. For this tutorial, selecting "repo" and "workflow" is required as the scaffolding job in this guide configures a GitHub actions workflow for the newly created project.
-enough.
+Set the scope to your likings. For this tutorial, selecting `repo` and `workflow` is required as the scaffolding job in this guide configures a GitHub actions workflow for the newly created project.
In the `app-config.yaml`, search for `integrations:` and add your token, like we
did in below example:
@@ -227,7 +226,7 @@ did in below example:
integrations:
github:
- host: github.com
- token: ghp_urtokendeinfewinfiwebfweb
+ token: $GITHUB_TOKEN
```
That's settled. This information will be leveraged by other plugins.
diff --git a/packages/create-app/templates/default-app/app-config.yaml.hbs b/packages/create-app/templates/default-app/app-config.yaml.hbs
index d56a1beb76..e274ffeaf2 100644
--- a/packages/create-app/templates/default-app/app-config.yaml.hbs
+++ b/packages/create-app/templates/default-app/app-config.yaml.hbs
@@ -54,6 +54,8 @@ backend:
integrations:
github:
- host: github.com
+ # This is a Personal Access Token or PAT from GitHub. You can find out how to generate this token, and more information
+ # about setting up the GitHub integration here: https://backstage.io/docs/getting-started/configuration#setting-up-a-github-integration
token: ${GITHUB_TOKEN}
### Example for how to add your GitHub Enterprise instance using the API:
# - host: ghe.example.net
From 806427545ff14046cf6d6074f1c8d673ac7caea7 Mon Sep 17 00:00:00 2001
From: blam
Date: Mon, 25 Apr 2022 15:04:17 +0200
Subject: [PATCH 2/4] chore: added changeset
Signed-off-by: blam
---
.changeset/stale-pigs-reply.md | 5 +++++
1 file changed, 5 insertions(+)
create mode 100644 .changeset/stale-pigs-reply.md
diff --git a/.changeset/stale-pigs-reply.md b/.changeset/stale-pigs-reply.md
new file mode 100644
index 0000000000..0495b30a36
--- /dev/null
+++ b/.changeset/stale-pigs-reply.md
@@ -0,0 +1,5 @@
+---
+'@backstage/create-app': patch
+---
+
+Addding a link to the `$GITHUB_TOKEN` to document how to generate a token
From 92b1bb4057855824cb02fb26346391e8a59a6fda Mon Sep 17 00:00:00 2001
From: blam
Date: Tue, 26 Apr 2022 10:38:52 +0200
Subject: [PATCH 3/4] docs: rework the wording a ltitle bit
Signed-off-by: blam
---
docs/getting-started/configuration.md | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/docs/getting-started/configuration.md b/docs/getting-started/configuration.md
index 4c8a65553f..9db1f7f958 100644
--- a/docs/getting-started/configuration.md
+++ b/docs/getting-started/configuration.md
@@ -203,7 +203,7 @@ could read:
The GitHub integration supports loading catalog entities from GitHub or GitHub
Enterprise. Entities can be added to static catalog configuration, registered
with the catalog-import plugin, or discovered from a GitHub organization. Users
-and Groups can also be loaded from an organization. While using GitHub Apps
+and Groups can also be loaded from an organization. While using [GitHub Apps](../integrations/github/github-apps.md)
might be the best way to set up integrations, for this tutorial you'll use a
Personal Access Token.
@@ -219,18 +219,29 @@ for 7 days, it's a lucky number.
Set the scope to your likings. For this tutorial, selecting `repo` and `workflow` is required as the scaffolding job in this guide configures a GitHub actions workflow for the newly created project.
-In the `app-config.yaml`, search for `integrations:` and add your token, like we
-did in below example:
+For this tutorial, we will be writing the token to `app-config.local.yaml`. This file might not exist for you, so if it doesn't go ahead and create it alongside the `app-config.yaml` at the root of the project.
+This file should also be excluded in `.gitignore`, to avoid accidental committing of this file.
+
+In your `app-config.local.yaml` go ahead and add the following:
```yaml
integrations:
github:
- host: github.com
- token: $GITHUB_TOKEN
+ token: ghp_urtokendeinfewinfiwebfweb # this should be the token from GitHub
```
That's settled. This information will be leveraged by other plugins.
+If you're looking for a more production way to manage this secret, then you can do the following with the token being stored in an environment variable called `GITHUB_TOKEN`.
+
+```yaml
+integrations:
+ github:
+ - host: github.com
+ token: ${GITHUB_TOKEN} # this will use the environment variable GITHUB_TOKEN
+```
+
Some helpful links, for if you want to learn more about:
- [Other available integrations](../integrations/)
From e9fc1d02a0f3f7d89817cdc0c4577d53270f3735 Mon Sep 17 00:00:00 2001
From: blam
Date: Tue, 26 Apr 2022 10:39:42 +0200
Subject: [PATCH 4/4] chore: spelling mistake
Signed-off-by: blam
---
.changeset/stale-pigs-reply.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.changeset/stale-pigs-reply.md b/.changeset/stale-pigs-reply.md
index 0495b30a36..645648c93f 100644
--- a/.changeset/stale-pigs-reply.md
+++ b/.changeset/stale-pigs-reply.md
@@ -2,4 +2,4 @@
'@backstage/create-app': patch
---
-Addding a link to the `$GITHUB_TOKEN` to document how to generate a token
+Added a link to the `${GITHUB_TOKEN}` to document how to generate a token