From 6d7fa3cfb242f3ca8dfcd1f8b366cb76f2d90259 Mon Sep 17 00:00:00 2001 From: Viacheslav Kudinov Date: Sat, 9 May 2026 13:09:38 +0200 Subject: [PATCH 1/2] doc: Add missed ID attribute on data github_app --- docs/data-sources/app.md | 23 +++++++-------- .../data-source-1.tf} | 0 github/data_source_github_app.go | 26 ++++++++++++----- templates/data-sources/app.md.tmpl | 29 +++++++------------ 4 files changed, 39 insertions(+), 39 deletions(-) rename examples/data-sources/{app/example_1.tf => github_app/data-source-1.tf} (100%) diff --git a/docs/data-sources/app.md b/docs/data-sources/app.md index 7c254bda12..a5984fd5ac 100644 --- a/docs/data-sources/app.md +++ b/docs/data-sources/app.md @@ -1,12 +1,13 @@ --- page_title: "github_app (Data Source) - GitHub" +subcategory: "" description: |- Get information about an app. --- # github_app (Data Source) -Use this data source to retrieve information about an app. +Get information about an app. ## Example Usage @@ -16,18 +17,16 @@ data "github_app" "foobar" { } ``` -## Argument Reference + +## Schema -The following arguments are supported: +### Required -- `slug` - (Required) The URL-friendly name of your GitHub App. +- `slug` (String) The URL-friendly name of your GitHub App. -## Attribute Reference +### Read-Only -The following additional attributes are exported: - -- `description` - The app's description. - -- `name` - The app's full name. - -- `node_id` - The Node ID of the app. +- `description` (String) The app's description. +- `id` (String) The ID of the app. +- `name` (String) The app's full name. +- `node_id` (String) The Node ID of the app. diff --git a/examples/data-sources/app/example_1.tf b/examples/data-sources/github_app/data-source-1.tf similarity index 100% rename from examples/data-sources/app/example_1.tf rename to examples/data-sources/github_app/data-source-1.tf diff --git a/github/data_source_github_app.go b/github/data_source_github_app.go index b4dd3eebb4..1c77b6c72c 100644 --- a/github/data_source_github_app.go +++ b/github/data_source_github_app.go @@ -11,23 +11,33 @@ import ( func dataSourceGithubApp() *schema.Resource { return &schema.Resource{ ReadContext: dataSourceGithubAppRead, + Description: "Get information about an app.", Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + Description: "The ID of the app.", + }, "slug": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: "The URL-friendly name of your GitHub App.", }, "description": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: "The app's description.", }, "name": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: "The app's full name.", }, "node_id": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: "The Node ID of the app.", }, }, } diff --git a/templates/data-sources/app.md.tmpl b/templates/data-sources/app.md.tmpl index 9dc87e98e9..d914116495 100644 --- a/templates/data-sources/app.md.tmpl +++ b/templates/data-sources/app.md.tmpl @@ -1,29 +1,20 @@ --- page_title: "{{.Name}} ({{.Type}}) - {{.RenderedProviderName}}" +subcategory: "" description: |- - Get information about an app. +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} --- # {{.Name}} ({{.Type}}) -Use this data source to retrieve information about an app. +{{ .Description | trimspace }} -## Example Usage - -{{ tffile "examples/data-sources/app/example_1.tf" }} - -## Argument Reference - -The following arguments are supported: - -- `slug` - (Required) The URL-friendly name of your GitHub App. +{{- if .HasExamples }} -## Attribute Reference - -The following additional attributes are exported: - -- `description` - The app's description. - -- `name` - The app's full name. +## Example Usage +{{ range .ExampleFiles }} +{{ tffile . }} +{{- end }} +{{- end }} -- `node_id` - The Node ID of the app. +{{ .SchemaMarkdown | trimspace }} From 8baf2817c4ab2803039dac5c62617fdf6e197ddb Mon Sep 17 00:00:00 2001 From: Viacheslav Kudinov Date: Sat, 9 May 2026 13:09:38 +0200 Subject: [PATCH 2/2] doc: Add missed ID attribute on data github_app --- docs/data-sources/app.md | 23 +++++++-------- .../data-source-1.tf} | 0 github/data_source_github_app.go | 26 ++++++++++++----- templates/data-sources/app.md.tmpl | 29 +++++++------------ 4 files changed, 39 insertions(+), 39 deletions(-) rename examples/data-sources/{app/example_1.tf => github_app/data-source-1.tf} (100%) diff --git a/docs/data-sources/app.md b/docs/data-sources/app.md index 7c254bda12..a5984fd5ac 100644 --- a/docs/data-sources/app.md +++ b/docs/data-sources/app.md @@ -1,12 +1,13 @@ --- page_title: "github_app (Data Source) - GitHub" +subcategory: "" description: |- Get information about an app. --- # github_app (Data Source) -Use this data source to retrieve information about an app. +Get information about an app. ## Example Usage @@ -16,18 +17,16 @@ data "github_app" "foobar" { } ``` -## Argument Reference + +## Schema -The following arguments are supported: +### Required -- `slug` - (Required) The URL-friendly name of your GitHub App. +- `slug` (String) The URL-friendly name of your GitHub App. -## Attribute Reference +### Read-Only -The following additional attributes are exported: - -- `description` - The app's description. - -- `name` - The app's full name. - -- `node_id` - The Node ID of the app. +- `description` (String) The app's description. +- `id` (String) The ID of the app. +- `name` (String) The app's full name. +- `node_id` (String) The Node ID of the app. diff --git a/examples/data-sources/app/example_1.tf b/examples/data-sources/github_app/data-source-1.tf similarity index 100% rename from examples/data-sources/app/example_1.tf rename to examples/data-sources/github_app/data-source-1.tf diff --git a/github/data_source_github_app.go b/github/data_source_github_app.go index b4dd3eebb4..1c77b6c72c 100644 --- a/github/data_source_github_app.go +++ b/github/data_source_github_app.go @@ -11,23 +11,33 @@ import ( func dataSourceGithubApp() *schema.Resource { return &schema.Resource{ ReadContext: dataSourceGithubAppRead, + Description: "Get information about an app.", Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + Description: "The ID of the app.", + }, "slug": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: "The URL-friendly name of your GitHub App.", }, "description": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: "The app's description.", }, "name": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: "The app's full name.", }, "node_id": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: "The Node ID of the app.", }, }, } diff --git a/templates/data-sources/app.md.tmpl b/templates/data-sources/app.md.tmpl index 9dc87e98e9..d914116495 100644 --- a/templates/data-sources/app.md.tmpl +++ b/templates/data-sources/app.md.tmpl @@ -1,29 +1,20 @@ --- page_title: "{{.Name}} ({{.Type}}) - {{.RenderedProviderName}}" +subcategory: "" description: |- - Get information about an app. +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} --- # {{.Name}} ({{.Type}}) -Use this data source to retrieve information about an app. +{{ .Description | trimspace }} -## Example Usage - -{{ tffile "examples/data-sources/app/example_1.tf" }} - -## Argument Reference - -The following arguments are supported: - -- `slug` - (Required) The URL-friendly name of your GitHub App. +{{- if .HasExamples }} -## Attribute Reference - -The following additional attributes are exported: - -- `description` - The app's description. - -- `name` - The app's full name. +## Example Usage +{{ range .ExampleFiles }} +{{ tffile . }} +{{- end }} +{{- end }} -- `node_id` - The Node ID of the app. +{{ .SchemaMarkdown | trimspace }}