Skip to content

Commit 68e65ac

Browse files
committed
Improve descriptions to make interactions slightly clearer
Signed-off-by: Timo Sand <[email protected]>
1 parent 81a9234 commit 68e65ac

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

github/resource_github_repository.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ func resourceGithubRepository() *schema.Resource {
391391
Type: schema.TypeBool,
392392
Optional: true,
393393
Computed: true,
394-
Description: "Set to 'true' to enable security alerts for vulnerable dependencies. Enabling requires alerts to be enabled on the owner level. (Note for importing: GitHub enables the alerts on public repos but disables them on private repos by default). Note that vulnerability alerts have not been successfully tested on any GitHub Enterprise instance and may be unavailable in those settings.",
394+
Description: "Set to 'true' to enable security alerts for vulnerable dependencies. Enabling requires alerts to be enabled on the owner level. (Note for importing: GitHub enables the alerts on all repos by default). Note that vulnerability alerts have not been successfully tested on any GitHub Enterprise instance and may be unavailable in those settings.",
395395
},
396396
"ignore_vulnerability_alerts_during_read": {
397397
Type: schema.TypeBool,
@@ -1245,6 +1245,9 @@ func resourceGithubParseFullName(resourceDataLike interface {
12451245
func updateVulnerabilityAlerts(d *schema.ResourceData, client *github.Client, ctx context.Context, owner, repoName string) error {
12461246
updateVulnerabilityAlertsSDK := client.Repositories.DisableVulnerabilityAlerts
12471247
vulnerabilityAlerts, ok := d.GetOk("vulnerability_alerts")
1248+
1249+
// Only if the vulnerability alerts are specifically set to true, enable them.
1250+
// Otherwise, disable them as GitHub defaults to enabled and we have not wanted to introduce a breaking change for this yet.
12481251
if ok && vulnerabilityAlerts.(bool) {
12491252
updateVulnerabilityAlertsSDK = client.Repositories.EnableVulnerabilityAlerts
12501253
}

0 commit comments

Comments
 (0)