Skip to content

Commit 5a05b1a

Browse files
JoannaaKLCopilot
andauthored
Update pkg/lockdown/lockdown.go
Co-authored-by: Copilot <[email protected]>
1 parent 89f62f0 commit 5a05b1a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pkg/lockdown/lockdown.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ import (
88
"github.com/shurcooL/githubv4"
99
)
1010

11-
func ShouldRemoveContent(ctx context.Context, client *githubv4.Client, username, owner, repo string) bool {
11+
func ShouldRemoveContent(ctx context.Context, client *githubv4.Client, username, owner, repo string) (bool, error) {
1212
isPrivate, err := IsPrivateRepo(ctx, client, owner, repo)
1313
if err != nil {
14-
return false
14+
return false, err
1515
}
1616

1717
// Do not filter content for private repositories
1818
if isPrivate {
19-
return false
19+
return false, nil
2020
}
2121
hasPushAccess, err := HasPushAccess(ctx, client, username, owner, repo)
2222
if err != nil {
23-
return false
23+
return false, err
2424
}
2525

26-
return !hasPushAccess
26+
return !hasPushAccess, nil
2727
}
2828

2929
func HasPushAccess(ctx context.Context, client *githubv4.Client, username, owner, repo string) (bool, error) {

0 commit comments

Comments
 (0)