Skip to content

Commit 9235e4c

Browse files
committed
Add more debug logging and fix validation
Signed-off-by: Timo Sand <[email protected]>
1 parent cd3a680 commit 9235e4c

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

github/resource_github_repository_pages.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ func resourceGithubRepositoryPages() *schema.Resource {
117117
}
118118

119119
func resourceGithubRepositoryPagesCreate(ctx context.Context, d *schema.ResourceData, m any) diag.Diagnostics {
120+
tflog.Debug(ctx, "Creating GitHub Pages")
120121
meta := m.(*Owner)
121122
client := meta.v3client
122123

@@ -277,6 +278,7 @@ func resourceGithubRepositoryPagesRead(ctx context.Context, d *schema.ResourceDa
277278
}
278279

279280
func resourceGithubRepositoryPagesUpdate(ctx context.Context, d *schema.ResourceData, m any) diag.Diagnostics {
281+
tflog.Debug(ctx, "Updating GitHub Pages")
280282
meta := m.(*Owner)
281283
client := meta.v3client
282284

@@ -338,6 +340,7 @@ func resourceGithubRepositoryPagesUpdate(ctx context.Context, d *schema.Resource
338340
}
339341

340342
func resourceGithubRepositoryPagesDelete(ctx context.Context, d *schema.ResourceData, m any) diag.Diagnostics {
343+
tflog.Debug(ctx, "Deleting GitHub Pages")
341344
meta := m.(*Owner)
342345
client := meta.v3client
343346

@@ -382,9 +385,7 @@ func resourceGithubRepositoryPagesImport(ctx context.Context, d *schema.Resource
382385
}
383386

384387
func resourceGithubRepositoryPagesDiff(ctx context.Context, d *schema.ResourceDiff, _ any) error {
385-
if d.Id() == "" {
386-
return nil
387-
}
388+
tflog.Debug(ctx, "Diffing GitHub Pages")
388389

389390
buildType := d.Get("build_type").(string)
390391
_, ok := d.GetOk("source")

0 commit comments

Comments
 (0)