Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion github/resource_github_repository_custom_property.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ func resourceGithubRepositoryCustomPropertyRead(d *schema.ResourceData, meta int
return err
}

if wantedCustomPropertyValue == nil {
d.SetId("")
return nil
}

d.SetId(buildThreePartID(owner, repoName, propertyName))
d.Set("repository", repoName)
d.Set("property_name", propertyName)
Expand Down Expand Up @@ -154,7 +159,7 @@ func readRepositoryCustomPropertyValue(ctx context.Context, client *github.Clien
}

if wantedCustomProperty == nil {
return nil, fmt.Errorf("could not find a custom property with name: %s", propertyName)
return nil, nil
}

wantedPropertyValue, err := parseRepositoryCustomPropertyValueToStringSlice(wantedCustomProperty)
Expand Down
Loading