Skip to content

Commit 49bd3e0

Browse files
authored
ci: sync resource labels, auto-label issues, and consolidate bug report templates (#2628)
## Summary ### Sync GitHub labels from provider schema Adds a workflow (`sync-labels.yml`) that creates GitHub labels with `resource/` and `data-source/` prefixes for every resource and data source in the provider schema. Triggers on changes to `provider_schema.json` on `main` and via manual `workflow_dispatch`. Stale labels are intentionally kept to preserve historical context on older issues/PRs. ### Auto-label issues from bug report dropdown Adds a workflow (`issue-label-resources.yml`) that parses the "Affected Resource(s)" dropdown from the bug report template and applies the matching `resource/` and `data-source/` labels to the issue. When an issue is edited, old resource labels are removed first so the labels stay in sync with the selection. ### Consolidate bug report templates Removes the plain-text bug report template and promotes the enhanced version (with the resource dropdown) as the sole bug report template. Updates `generate_issue_template.go` and `update-schema.yml` to reference the new filename. ### Disable blank issues Disables blank issue creation for non-maintainers and adds a contact link pointing to GitHub Discussions for questions. ### Auto-approve and auto-merge schema update PRs The `update-schema.yml` workflow now approves and enables auto-merge (squash) on the PRs it creates. The GitHub App creates the PR and `GITHUB_TOKEN` (github-actions[bot]) approves it, satisfying the 1-review requirement. The PR merges automatically once required status checks pass. ## Test plan - [ ] Trigger `sync-labels.yml` manually via `gh workflow run sync-labels.yml` after merge - [ ] Verify labels are created with correct prefixes, colors, and descriptions - [ ] Create a test issue using the bug report template, select resources, and verify labels are applied - [ ] Edit the test issue to change selected resources and verify labels are updated - [ ] Verify blank issues are disabled for non-maintainers and the Discussions link appears - [ ] Verify schema update PRs are auto-approved and auto-merged after checks pass
1 parent ce716c6 commit 49bd3e0

7 files changed

Lines changed: 304 additions & 238 deletions

File tree

.github/ISSUE_TEMPLATE/1-bug-report.yml

Lines changed: 170 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
# NOTE: this template is automatically generated by scripts/generate_issue_template.go
2+
# DO NOT EDIT MANUALLY - run 'go run scripts/generate_issue_template.go --update-schema' instead
3+
14
name: Bug Report
25
description: File a bug report
36
type: "bug"
4-
projects: ["grafana/513"] # Platform Monitoring
7+
projects: ["grafana/513"]
58
body:
69
- type: input
710
id: terraform_version
@@ -15,13 +18,171 @@ body:
1518
id: grafana_version
1619
attributes:
1720
label: Grafana Version
18-
- type: textarea
21+
- type: dropdown
1922
id: affected_resources
2023
attributes:
2124
label: Affected Resource(s)
22-
placeholder: |
23-
* grafana_dashboard
24-
* grafana_folder
25+
description: |
26+
Select the terraform resources or data sources this issue relates to.
27+
💡 Tip: Click the dropdown and start typing to quickly find items
28+
multiple: true
29+
options:
30+
- Other (please describe in the issue)
31+
- grafana_annotation (resource)
32+
- grafana_apps_alertenrichment_alertenrichment_v1beta1 (resource)
33+
- grafana_apps_dashboard_dashboard_v1beta1 (resource)
34+
- grafana_apps_dashboard_dashboard_v2 (resource)
35+
- grafana_apps_dashboard_dashboard_v2beta1 (resource)
36+
- grafana_apps_generic_resource (resource)
37+
- grafana_apps_notifications_inhibitionrule_v1beta1 (resource)
38+
- grafana_apps_playlist_playlist_v0alpha1 (resource)
39+
- grafana_apps_playlist_playlist_v1 (resource)
40+
- grafana_apps_productactivation_appo11yconfig_v1alpha1 (resource)
41+
- grafana_apps_productactivation_k8so11yconfig_v1alpha1 (resource)
42+
- grafana_apps_provisioning_connection_v0alpha1 (resource)
43+
- grafana_apps_provisioning_repository_v0alpha1 (resource)
44+
- grafana_apps_rules_alertrule_v0alpha1 (resource)
45+
- grafana_apps_rules_recordingrule_v0alpha1 (resource)
46+
- grafana_apps_secret_keeper_activation_v1beta1 (resource)
47+
- grafana_apps_secret_keeper_v1beta1 (resource)
48+
- grafana_apps_secret_securevalue_v1beta1 (resource)
49+
- grafana_asserts_custom_model_rules (resource)
50+
- grafana_asserts_log_config (resource)
51+
- grafana_asserts_notification_alerts_config (resource)
52+
- grafana_asserts_profile_config (resource)
53+
- grafana_asserts_prom_rule_file (resource)
54+
- grafana_asserts_stack (resource)
55+
- grafana_asserts_suppressed_assertions_config (resource)
56+
- grafana_asserts_thresholds (resource)
57+
- grafana_asserts_trace_config (resource)
58+
- grafana_cloud_access_policies (data source)
59+
- grafana_cloud_access_policy (resource)
60+
- grafana_cloud_access_policy_rotating_token (resource)
61+
- grafana_cloud_access_policy_token (resource)
62+
- grafana_cloud_integration (resource)
63+
- grafana_cloud_ips (data source)
64+
- grafana_cloud_org_member (resource)
65+
- grafana_cloud_organization (data source)
66+
- grafana_cloud_plugin_installation (resource)
67+
- grafana_cloud_private_data_source_connect_network (resource)
68+
- grafana_cloud_private_data_source_connect_network_token (resource)
69+
- grafana_cloud_private_data_source_connect_networks (data source)
70+
- grafana_cloud_provider_aws_account (data source)
71+
- grafana_cloud_provider_aws_account (resource)
72+
- grafana_cloud_provider_aws_cloudwatch_scrape_job (data source)
73+
- grafana_cloud_provider_aws_cloudwatch_scrape_job (resource)
74+
- grafana_cloud_provider_aws_cloudwatch_scrape_jobs (data source)
75+
- grafana_cloud_provider_aws_resource_metadata_scrape_job (resource)
76+
- grafana_cloud_provider_azure_credential (data source)
77+
- grafana_cloud_provider_azure_credential (resource)
78+
- grafana_cloud_stack (data source)
79+
- grafana_cloud_stack (resource)
80+
- grafana_cloud_stack_service_account (resource)
81+
- grafana_cloud_stack_service_account_rotating_token (resource)
82+
- grafana_cloud_stack_service_account_token (resource)
83+
- grafana_connections_metrics_endpoint_scrape_job (data source)
84+
- grafana_connections_metrics_endpoint_scrape_job (resource)
85+
- grafana_contact_point (resource)
86+
- grafana_dashboard (data source)
87+
- grafana_dashboard (resource)
88+
- grafana_dashboard_permission (resource)
89+
- grafana_dashboard_permission_item (resource)
90+
- grafana_dashboard_public (resource)
91+
- grafana_dashboards (data source)
92+
- grafana_data_source (data source)
93+
- grafana_data_source (resource)
94+
- grafana_data_source_cache_config (resource)
95+
- grafana_data_source_config (resource)
96+
- grafana_data_source_config_lbac_rules (resource)
97+
- grafana_data_source_permission (resource)
98+
- grafana_data_source_permission_item (resource)
99+
- grafana_fleet_management_collector (data source)
100+
- grafana_fleet_management_collector (resource)
101+
- grafana_fleet_management_collectors (data source)
102+
- grafana_fleet_management_pipeline (resource)
103+
- grafana_folder (data source)
104+
- grafana_folder (resource)
105+
- grafana_folder_permission (resource)
106+
- grafana_folder_permission_item (resource)
107+
- grafana_folders (data source)
108+
- grafana_frontend_o11y_app (data source)
109+
- grafana_frontend_o11y_app (resource)
110+
- grafana_k6_installation (resource)
111+
- grafana_k6_load_test (data source)
112+
- grafana_k6_load_test (resource)
113+
- grafana_k6_load_tests (data source)
114+
- grafana_k6_project (data source)
115+
- grafana_k6_project (resource)
116+
- grafana_k6_project_allowed_load_zones (data source)
117+
- grafana_k6_project_allowed_load_zones (resource)
118+
- grafana_k6_project_limits (data source)
119+
- grafana_k6_project_limits (resource)
120+
- grafana_k6_projects (data source)
121+
- grafana_k6_schedule (data source)
122+
- grafana_k6_schedule (resource)
123+
- grafana_k6_schedules (data source)
124+
- grafana_library_panel (data source)
125+
- grafana_library_panel (resource)
126+
- grafana_library_panels (data source)
127+
- grafana_machine_learning_alert (resource)
128+
- grafana_machine_learning_holiday (resource)
129+
- grafana_machine_learning_job (resource)
130+
- grafana_machine_learning_outlier_detector (resource)
131+
- grafana_message_template (resource)
132+
- grafana_mute_timing (resource)
133+
- grafana_notification_policy (resource)
134+
- grafana_oncall_escalation (resource)
135+
- grafana_oncall_escalation_chain (data source)
136+
- grafana_oncall_escalation_chain (resource)
137+
- grafana_oncall_integration (data source)
138+
- grafana_oncall_integration (resource)
139+
- grafana_oncall_label (data source)
140+
- grafana_oncall_on_call_shift (resource)
141+
- grafana_oncall_outgoing_webhook (data source)
142+
- grafana_oncall_outgoing_webhook (resource)
143+
- grafana_oncall_route (resource)
144+
- grafana_oncall_schedule (data source)
145+
- grafana_oncall_schedule (resource)
146+
- grafana_oncall_slack_channel (data source)
147+
- grafana_oncall_team (data source)
148+
- grafana_oncall_user (data source)
149+
- grafana_oncall_user_group (data source)
150+
- grafana_oncall_user_notification_rule (resource)
151+
- grafana_oncall_users (data source)
152+
- grafana_organization (data source)
153+
- grafana_organization (resource)
154+
- grafana_organization_preferences (data source)
155+
- grafana_organization_preferences (resource)
156+
- grafana_organization_user (data source)
157+
- grafana_playlist (resource)
158+
- grafana_report (resource)
159+
- grafana_role (data source)
160+
- grafana_role (resource)
161+
- grafana_role_assignment (resource)
162+
- grafana_role_assignment_item (resource)
163+
- grafana_rule_group (resource)
164+
- grafana_scim_config (resource)
165+
- grafana_service_account (data source)
166+
- grafana_service_account (resource)
167+
- grafana_service_account_permission (resource)
168+
- grafana_service_account_permission_item (resource)
169+
- grafana_service_account_rotating_token (resource)
170+
- grafana_service_account_token (resource)
171+
- grafana_slo (resource)
172+
- grafana_slos (data source)
173+
- grafana_sso_settings (resource)
174+
- grafana_synthetic_monitoring_check (resource)
175+
- grafana_synthetic_monitoring_check_alerts (resource)
176+
- grafana_synthetic_monitoring_installation (resource)
177+
- grafana_synthetic_monitoring_probe (data source)
178+
- grafana_synthetic_monitoring_probe (resource)
179+
- grafana_synthetic_monitoring_probes (data source)
180+
- grafana_team (data source)
181+
- grafana_team (resource)
182+
- grafana_team_external_group (resource)
183+
- grafana_user (data source)
184+
- grafana_user (resource)
185+
- grafana_users (data source)
25186
- type: textarea
26187
id: terraform_configuration_files
27188
attributes:
@@ -34,14 +195,12 @@ body:
34195
id: expected_behavior
35196
attributes:
36197
label: Expected Behavior
37-
placeholder: |
38-
What should have happened?
198+
placeholder: What should have happened?
39199
- type: textarea
40200
id: actual_behavior
41201
attributes:
42202
label: Actual Behavior
43-
placeholder: |
44-
What actually happened?
203+
placeholder: What actually happened?
45204
- type: textarea
46205
id: steps_to_reproduce
47206
attributes:
@@ -54,10 +213,10 @@ body:
54213
attributes:
55214
label: Important Factoids
56215
placeholder: |
57-
Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?
216+
Are there anything atypical about your accounts that we should know?
58217
- type: textarea
59218
id: references
60219
attributes:
61220
label: References
62221
placeholder: |
63-
- GH-1234
222+
- GH-1234

0 commit comments

Comments
 (0)