Skip to content

Commit d745c9f

Browse files
committed
fix(templates): readme
1 parent f40b900 commit d745c9f

File tree

5 files changed

+18
-3
lines changed

5 files changed

+18
-3
lines changed

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.md

templates/example/.github/workflows/deploy.example.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
run: |
3434
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} --profile default
3535
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} --profile default
36+
aws configure set aws_region ${{ env.AWS_REGION }} --profile default
3637
3738
- name: Terraform Format
3839
id: fmt

templates/example/README.example.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
# Indent + {{ runtime }} and {{ integration }}
22

3-
This repository contains {{ numIntegrations }} integration(s) ({{runtime}}) to pull and apply updates to {{integration}} using [Indent](https://indent.com/docs).
3+
This repository contains an integration between {{integration}} and [Indent](https://indent.com). Once deployed, you will be able to use this integration with Indent to:
4+
5+
{{#capabilities}}
6+
- {{{.}}}
7+
{{/capabilities}}
48

59
## Quicklinks
610

11+
- [Indent Documentation](https://indent.com/docs)
712
- [Indent Support](https://support.indent.com)
13+
14+
**In this repo**
15+
816
- [GitHub Secrets](./settings/secrets/actions)
917
- [GitHub Actions](./actions/workflows/deploy.yaml)
1018

templates/scripts/steps/catalog.ts

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export interface CatalogItem {
44
runtimes: string[]
55
integrations: string[]
66
environmentVariables: string[]
7+
capabilities: string[]
78
links: {
89
repoSource: string
910
}
@@ -29,6 +30,7 @@ export const catalog: CatalogItem[] = [
2930
'OKTA_CLIENT_ID',
3031
'OKTA_PRIVATE_KEY',
3132
],
33+
capabilities: ['PullUpdate', 'ApplyUpdate'],
3234
readme: {
3335
connection: [
3436
'[Go to Okta > Security > API > Tokens](https://help.okta.com/en-us/Content/Topics/Security/API.htm#create-okta-api-token) and create a new API Token, then give the token a descriptive name like `Indent Auto Approvals`',
@@ -45,6 +47,7 @@ export const catalog: CatalogItem[] = [
4547
runtimes: ['AWS Lambda'],
4648
integrations: ['PagerdutyDecisionIntegration'],
4749
environmentVariables: ['PAGERDUTY_KEY'],
50+
capabilities: ['GetDecision'],
4851
links: {
4952
repoSource: 'packages/stable/indent-integration-pagerduty',
5053
},
@@ -63,6 +66,7 @@ export const catalog: CatalogItem[] = [
6366
integrations: ['TailscaleGroupIntegration'],
6467
runtimes: ['AWS Lambda'],
6568
environmentVariables: ['TAILSCALE_TAILNET', 'TAILSCALE_API_KEY'],
69+
capabilities: ['PullUpdate', 'ApplyUpdate'],
6670
links: {
6771
repoSource: 'packages/stable/indent-integration-tailscale',
6872
},

templates/scripts/steps/readme.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@ export async function writeReadme(item: CatalogItem, path) {
77
const template = await readFile(path + '/README.example.md', 'utf-8')
88

99
// destructure catalogItem
10-
const { name, runtimes, integrations, readme } = item
10+
const { displayName, runtimes, integrations, readme, capabilities } = item
1111

1212
const { connection, docsLink } = readme
1313
// render template
1414
const rendered = Mustache.render(template, {
1515
runtime: runtimes[0],
16-
integration: name,
16+
integration: displayName,
1717
numIntegrations: integrations.length,
1818
connection,
1919
docsLink,
20+
capabilities,
2021
})
2122
await unlink(path + '/README.example.md')
2223
return await writeFile(path + '/README.md', rendered, 'utf-8')

0 commit comments

Comments
 (0)